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

Function cjson_minify_should_remove_single_line_comments

tests/minify_tests.c:44–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44static void cjson_minify_should_remove_single_line_comments(void)
45{
46 const char to_minify[] = "{// this is {} \"some kind\" of [] comment /*, don't you see\n}";
47
48 char* minified = (char*) malloc(sizeof(to_minify));
49 TEST_ASSERT_NOT_NULL(minified);
50 strcpy(minified, to_minify);
51
52 cJSON_Minify(minified);
53 TEST_ASSERT_EQUAL_STRING("{}", minified);
54
55 free(minified);
56}
57
58static void cjson_minify_should_remove_spaces(void)
59{

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…