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

Function main

ccan/ccan/cppmagic/test/run-map-empty-arg.c:32–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#define EMPTY
31
32int main(void)
33{
34 alarm(10);
35
36 plan_tests(4);
37
38 /* An expands-to-nothing argument reads as "absent": NONEMPTY
39 * reports 0, and iteration stops before it. */
40 CHECK1(CPPMAGIC_NONEMPTY(EMPTY), "0");
41 CHECK1(CPPMAGIC_MAP(TESTMAP, a, EMPTY, b), "[a]");
42 CHECK1(CPPMAGIC_JOIN(;, a, EMPTY, b), "a");
43
44 /* A textually empty argument has the same behavior. */
45 CHECK1(CPPMAGIC_MAP(TESTMAP, a, , b), "[a]");
46
47 return exit_status();
48}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected