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

Function main

ccan/ccan/ptrint/test/run.c:12–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10};
11
12int main(void)
13{
14 int i;
15
16 /* This is how many tests you plan to run */
17 plan_tests(2 * ARRAY_SIZE(testvals));
18
19 for (i = 0; i < ARRAY_SIZE(testvals); i++) {
20 ptrdiff_t val = testvals[i];
21 void *ptr = int2ptr(val);
22
23 ok1(ptr2int(ptr) == val);
24 ok1(!val == !ptr);
25 }
26
27 /* This exits depending on whether all tests passed */
28 return exit_status();
29}

Callers

nothing calls this directly

Calls 2

int2ptrFunction · 0.85
ptr2intFunction · 0.85

Tested by

no test coverage detected