MCPcopy Create free account
hub / github.com/acl-dev/acl / test_full_input

Function test_full_input

test/json/json_check.c:32–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32static int test_full_input(void)
33{
34 ACL_JSON *json = acl_json_alloc();
35 const char *data =
36 "{\"text\":\"\\u4F60\\u597D\","
37 "\"emoji\":\"\\uD83D\\uDE00\","
38 "\"key\\u4F60\":\"v\\u597D\"}";
39 int ok;
40
41 acl_json_update(json, data);
42 ok = acl_json_finish(json)
43 && check_tag_value(json, "text", UTF8_NI_HAO)
44 && check_tag_value(json, "emoji", UTF8_EMOJI)
45 && check_tag_value(json, UTF8_KEY_NI, UTF8_V_HAO);
46
47 acl_json_free(json);
48 return ok;
49}
50
51static int test_stream_input(void)
52{

Callers 1

mainFunction · 0.85

Calls 5

acl_json_allocFunction · 0.85
acl_json_updateFunction · 0.85
acl_json_finishFunction · 0.85
check_tag_valueFunction · 0.85
acl_json_freeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…