MCPcopy Create free account
hub / github.com/ElementsProject/lightning / remove_complex

Function remove_complex

common/test/run-json_remove.c:309–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309static void remove_complex(void)
310{
311 struct json *j = json_parse(tmpctx,
312 "{'1':'one', '2':'two',"
313 "'3': { '3.1': 'a', '3.2':'b', '3.3':'c' }, "
314 "'4': { '4.1': 'a', '4.2':'b', '4.3':'c' }, "
315 "'5':'five'}");
316
317 json_tok_remove(&j->toks, j->toks, j->toks + 5, 2);
318 test_toks(j, "1", "one", "2", "two", "5", "five", NULL);
319}
320
321static void remove_inside_obj(void)
322{

Callers 1

mainFunction · 0.85

Calls 3

json_tok_removeFunction · 0.85
test_toksFunction · 0.85
json_parseFunction · 0.70

Tested by

no test coverage detected