Improve coverage of test suite.
This commit is contained in:
1 parent
4052d3794b
commit
693b09387f
2 files changed
+21
No files matched your search
@@ -384,6 +384,9 @@ static void test_coverage(void)
|
||||
int_pqueue_array_push_back(b, 12);
|
||||
int_pqueue_array_push_back(b, 12);
|
||||
int_pqueue_array_set(a,b);
|
||||
int_pqueue_array_push_back(a, 13);
|
||||
int_pqueue_array_push_back(b, 14);
|
||||
assert(!int_pqueue_array_equal_p(a, b));
|
||||
int_pqueue_array_clear(a);
|
||||
int_pqueue_array_clear(b);
|
||||
|
||||
|
||||
@@ -424,6 +424,24 @@ static void test_gen(void)
|
||||
tree_init_move(t0, t);
|
||||
tree_init_set(t, t0);
|
||||
assert(tree_equal_p(t, t0));
|
||||
for(size_t i = 0; i < tree_size(t0); i++) {
|
||||
tree_set(t, t0);
|
||||
size_t j = 0;
|
||||
for(tree_it_t it = tree_it(t); j <= i && !tree_end_p(it); tree_next(&it), j++) {
|
||||
if (i ==j)
|
||||
*tree_ref(it) = 147852369;
|
||||
}
|
||||
assert(!tree_equal_p(t, t0));
|
||||
tree_set(t, t0);
|
||||
j = 0;
|
||||
for(tree_it_t it = tree_it(t); j <= i && !tree_end_p(it); tree_next(&it), j++) {
|
||||
if (i ==j)
|
||||
tree_remove(it);
|
||||
}
|
||||
tree_insert_right(tree_it(t), 185555569);
|
||||
assert(!tree_equal_p(t, t0));
|
||||
assert(!tree_equal_p(t0, t));
|
||||
}
|
||||
tree_move(t, t0);
|
||||
tree_clear(t);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user