| 30 | #include "../cJSON_Utils.h" |
| 31 | |
| 32 | static cJSON *parse_test_file(const char * const filename) |
| 33 | { |
| 34 | char *file = NULL; |
| 35 | cJSON *json = NULL; |
| 36 | |
| 37 | file = read_file(filename); |
| 38 | TEST_ASSERT_NOT_NULL_MESSAGE(file, "Failed to read file."); |
| 39 | |
| 40 | json = cJSON_Parse(file); |
| 41 | TEST_ASSERT_NOT_NULL_MESSAGE(json, "Failed to parse test json."); |
| 42 | TEST_ASSERT_TRUE_MESSAGE(cJSON_IsArray(json), "Json is not an array."); |
| 43 | |
| 44 | free(file); |
| 45 | |
| 46 | return json; |
| 47 | } |
| 48 | |
| 49 | static cJSON_bool test_apply_patch(const cJSON * const test) |
| 50 | { |
no test coverage detected
searching dependent graphs…