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

Function remove_all

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

Source from the content-addressed store, hash-verified

327}
328
329static void remove_all(void)
330{
331 struct json *j = json_parse(tmpctx, "['a', 'b', 'c', 'd', 'e']");
332 json_tok_remove(&j->toks, j->toks, j->toks + 1, 5);
333 assert(tal_count(j->toks) == 1);
334
335 j = json_parse(tmpctx, "{'1':'one', '2':'two', '3':'three', '4':'four'}");
336 json_tok_remove(&j->toks, j->toks, j->toks + 1, 4);
337 assert(tal_count(j->toks) == 1);
338}
339
340static void remove_complex(void)
341{

Callers 1

mainFunction · 0.85

Calls 2

json_tok_removeFunction · 0.85
json_parseFunction · 0.70

Tested by

no test coverage detected