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

Function test_basic_alloc

ccan/ccan/bitmap/test/run-alloc.c:18–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16#define NTESTS_REALLOC 10
17
18static void test_basic_alloc(int nbits)
19{
20 bitmap *bitmap;
21
22 bitmap = bitmap_alloc0(nbits);
23 ok1(bitmap != NULL);
24 ok1(bitmap_empty(bitmap, nbits));
25
26 free(bitmap);
27
28 bitmap = bitmap_alloc1(nbits);
29 ok1(bitmap != NULL);
30 ok1(bitmap_full(bitmap, nbits));
31
32 free(bitmap);
33}
34
35static void test_realloc(int obits, int nbits)
36{

Callers 1

mainFunction · 0.85

Calls 4

bitmap_alloc0Function · 0.85
bitmap_emptyFunction · 0.85
bitmap_alloc1Function · 0.85
bitmap_fullFunction · 0.85

Tested by

no test coverage detected