1 #include <ccan/idtree/idtree.c>
2 #include <ccan/tap/tap.h>
5 int main(int argc, char *argv[])
11 idtree = idtree_new(NULL);
13 ok1(idtree_add_above(idtree, &i, INT_MAX-1, INT_MAX) == INT_MAX-1);
14 ok1(idtree_add_above(idtree, &i, INT_MAX-1, INT_MAX) == INT_MAX);
15 ok1(idtree_add_above(idtree, &i, INT_MAX-1, INT_MAX) == -1);
17 ok1(idtree_remove(idtree, INT_MAX-1) == true);
18 ok1(idtree_add_above(idtree, &i, INT_MAX-1, INT_MAX) == INT_MAX-1);
19 ok1(idtree_add_above(idtree, &i, INT_MAX-1, INT_MAX) == -1);