summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-31 20:28:54 +0100
committerDavid Robillard <d@drobilla.net>2020-12-31 20:28:54 +0100
commit5edd99c6619328b479ecf25c21997b133e7c6dee (patch)
tree5a497bf4987b8432e073bacc7c9ed31d807408f5 /test
parent53e9bd0f9ea02c47510a47ab37901f2a284a3632 (diff)
downloadzix-5edd99c6619328b479ecf25c21997b133e7c6dee.tar.gz
zix-5edd99c6619328b479ecf25c21997b133e7c6dee.tar.bz2
zix-5edd99c6619328b479ecf25c21997b133e7c6dee.zip
Fix zix_sorted_array_iter_is_end()
Diffstat (limited to 'test')
-rw-r--r--test/sorted_array_test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/sorted_array_test.c b/test/sorted_array_test.c
index e62a635..fc92933 100644
--- a/test/sorted_array_test.c
+++ b/test/sorted_array_test.c
@@ -121,6 +121,14 @@ stress(unsigned test_num, unsigned n_elems)
last = iter_data;
}
+ if (i != zix_sorted_array_size(t)) {
+ fprintf(stderr,
+ "Iterated over only %u/%" PRIuPTR " elements\n",
+ i,
+ zix_sorted_array_size(t));
+ return test_fail();
+ }
+
srand(seed);
// Delete all elements