Fix _min & _max for B+Tree
Make code match the documentation if there is no element in the tree.
This commit is contained in:
1 parent
5cd6c1dd36
commit
8e9aa9cac4
2 files changed
+7
-1
No files matched your search
@@ -350,6 +350,9 @@ static void test5(void)
|
||||
btree_t b;
|
||||
btree_init(b);
|
||||
|
||||
assert (btree_cmin(b) == NULL);
|
||||
assert (btree_cmax(b) == NULL);
|
||||
|
||||
for(int i = 0; i < 1000; i+=3)
|
||||
btree_set_at(b, i, 1000*i);
|
||||
for(int i = 1; i < 1000; i+=3)
|
||||
|
||||
Reference in new issue
Block a user