1 #include <ccan/bitops/bitops.h>
2 #include <ccan/intmap/intmap.c>
3 #include <ccan/tap/tap.h>
12 plan_tests((1 << ELEMENTS) * ELEMENTS);
14 /* Run through every combination of elements */
15 for (int i = 0; i < (1 << ELEMENTS); i++) {
18 for (int j = 0; j < ELEMENTS; j++) {
20 uintmap_add(&umap, j, &umap);
23 /* Try each uintmap_after value */
24 for (int j = 0; j < ELEMENTS; j++) {
25 intmap_index_t idx = j, next;
27 if ((i >> (j + 1)) == 0)
30 next = j + 1 + bitops_ls32(i >> (j + 1));
32 if (!uintmap_after(&umap, &idx))
39 /* This exits depending on whether all tests passed */