| 25 | #include "common.h" |
| 26 | |
| 27 | static cJSON_bool compare_from_string(const char * const a, const char * const b, const cJSON_bool case_sensitive) |
| 28 | { |
| 29 | cJSON *a_json = NULL; |
| 30 | cJSON *b_json = NULL; |
| 31 | cJSON_bool result = false; |
| 32 | |
| 33 | a_json = cJSON_Parse(a); |
| 34 | TEST_ASSERT_NOT_NULL_MESSAGE(a_json, "Failed to parse a."); |
| 35 | b_json = cJSON_Parse(b); |
| 36 | TEST_ASSERT_NOT_NULL_MESSAGE(b_json, "Failed to parse b."); |
| 37 | |
| 38 | result = cJSON_Compare(a_json, b_json, case_sensitive); |
| 39 | |
| 40 | cJSON_Delete(a_json); |
| 41 | cJSON_Delete(b_json); |
| 42 | |
| 43 | return result; |
| 44 | } |
| 45 | |
| 46 | static void cjson_compare_should_compare_null_pointer_as_not_equal(void) |
| 47 | { |
no test coverage detected
searching dependent graphs…