diff --git a/tests/test-mrbtree.c b/tests/test-mrbtree.c index f8c27918..fe3b6cf3 100644 --- a/tests/test-mrbtree.c +++ b/tests/test-mrbtree.c @@ -98,6 +98,7 @@ static void test_uint(void) for M_EACH(item, tree, UINT_OPLIST) { assert (*item == tab2[k] ); k ++; + assert(k <= 2); } assert(k == 2); @@ -109,6 +110,7 @@ static void test_uint(void) for M_EACH(item, tree, UINT_OPLIST) { assert (*item == tab3[k] ); k ++; + assert(k <= 3); } assert(k == 3); diff --git a/tests/test-msnapshot.c b/tests/test-msnapshot.c index edbc8722..63374501 100644 --- a/tests/test-msnapshot.c +++ b/tests/test-msnapshot.c @@ -354,7 +354,9 @@ static void test_double(void) double *p = SnapshotDouble_get_write_buffer(s); *p = 42.0; p = SnapshotDouble_write(s); + assert(p != NULL); const double *q = SnapshotDouble_read(s); + assert(q != NULL); assert (*q == 42.0); SnapshotDouble_clear(s); } @@ -364,9 +366,12 @@ static void test_doubleSPMC(void) SnapshotDoubleSPMC s; SnapshotDoubleSPMC_init(s, 1); double *p = SnapshotDoubleSPMC_get_write_buffer(s); + assert(p != NULL); *p = 42.0; p = SnapshotDoubleSPMC_write(s); + assert(p != NULL); const double *q = SnapshotDoubleSPMC_read_start(s); + assert(q != NULL); assert (*q == 42.0); SnapshotDoubleSPMC_read_end(s, q); SnapshotDoubleSPMC_clear(s); @@ -377,9 +382,11 @@ static void test_doubleMPMC(void) SnapshotDoubleMPMC s; SnapshotDoubleMPMC_init(s, 1, 1); double *p = SnapshotDoubleMPMC_write_start(s); + assert(p != NULL); *p = 42.0; SnapshotDoubleMPMC_write_end(s, p); const double *q = SnapshotDoubleMPMC_read_start(s); + assert(q != NULL); assert (*q == 42.0); SnapshotDoubleMPMC_read_end(s, q); SnapshotDoubleMPMC_clear(s); diff --git a/tests/test-mtree.c b/tests/test-mtree.c index 7b1cb0bf..06f54d27 100644 --- a/tests/test-mtree.c +++ b/tests/test-mtree.c @@ -467,7 +467,7 @@ static void test_io(void) tree_insert_down(root, 1); tree_insert_left(it, 3); tree_it_t it4 = tree_insert_right(it, 4); - root = tree_insert_up(root, -1); + tree_insert_up(root, -1); tree_insert_up(it, 5); tree_insert_child(it4, 6); tree_it_t it7 = tree_insert_child(it4, 7);