MCPcopy Create free account
hub / github.com/DaveGamble/cJSON / cjson_minify_should_not_modify_strings

Function cjson_minify_should_not_modify_strings

tests/minify_tests.c:86–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86static void cjson_minify_should_not_modify_strings(void)
87{
88 const char to_minify[] = "\"this is a string \\\" \\t bla\"";
89
90 char* minified = (char*) malloc(sizeof(to_minify));
91 TEST_ASSERT_NOT_NULL(minified);
92 strcpy(minified, to_minify);
93
94 cJSON_Minify(minified);
95 TEST_ASSERT_EQUAL_STRING(to_minify, minified);
96
97 free(minified);
98}
99
100static void cjson_minify_should_minify_json(void) {
101 const char to_minify[] =

Callers

nothing calls this directly

Calls 1

cJSON_MinifyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…