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

Function cjson_minify_should_remove_multiline_comments

tests/minify_tests.c:72–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72static void cjson_minify_should_remove_multiline_comments(void)
73{
74 const char to_minify[] = "{/* this is\n a /* multi\n //line \n {comment \"\\\" */}";
75
76 char* minified = (char*) malloc(sizeof(to_minify));
77 TEST_ASSERT_NOT_NULL(minified);
78 strcpy(minified, to_minify);
79
80 cJSON_Minify(minified);
81 TEST_ASSERT_EQUAL_STRING("{}", minified);
82
83 free(minified);
84}
85
86static void cjson_minify_should_not_modify_strings(void)
87{

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…