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

Function remove_all

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

Source from the content-addressed store, hash-verified

296}
297
298static void remove_all(void)
299{
300 struct json *j = json_parse(tmpctx, "['a', 'b', 'c', 'd', 'e']");
301 json_tok_remove(&j->toks, j->toks, j->toks + 1, 5);
302 assert(tal_count(j->toks) == 1);
303
304 j = json_parse(tmpctx, "{'1':'one', '2':'two', '3':'three', '4':'four'}");
305 json_tok_remove(&j->toks, j->toks, j->toks + 1, 4);
306 assert(tal_count(j->toks) == 1);
307}
308
309static void remove_complex(void)
310{

Callers 1

mainFunction · 0.85

Calls 2

json_tok_removeFunction · 0.85
json_parseFunction · 0.70

Tested by

no test coverage detected