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

Function main

ccan/ccan/utf8/test/run-encode-decode.c:25–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25int main(int argc, char **argv)
26{
27 int i;
28 char dest[UTF8_MAX_LEN];
29
30 plan_tests(0x10FFFF - (0xDFFF - 0xD7FF + 2));
31
32 for (i = 1; i < 0x10FFFF; i++) {
33 int len;
34 if (i >= 0xD7FF && i <= 0xDFFF)
35 continue;
36 len = utf8_encode(i, dest);
37 assert(len != 0);
38 ok1(utf8_check(dest, len));
39 }
40
41 return exit_status();
42}

Callers

nothing calls this directly

Calls 2

utf8_encodeFunction · 0.85
utf8_checkFunction · 0.70

Tested by

no test coverage detected