diff --git a/core-test/core-units.c b/core-test/core-units.c index a2fb24a..c202392 100644 --- a/core-test/core-units.c +++ b/core-test/core-units.c @@ -66,6 +66,7 @@ void test_btree_iterate(CuTest *tc) b_btree tree = {0}; struct test_tree_node *nodes = calloc(nr_nodes, sizeof *nodes); + CuAssertPtrNotNull(tc, nodes); for (int i = 0; i < nr_nodes; i++) { nodes[i].value = rand(); @@ -84,7 +85,7 @@ void test_btree_iterate(CuTest *tc) continue; } - CuAssertTrue(tc, prev < node->value); + CuAssertTrue(tc, prev <= node->value); prev = node->value; }