summaryrefslogtreecommitdiffstats
path: root/test/tree_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-05 17:01:05 +0000
committerDavid Robillard <d@drobilla.net>2011-09-05 17:01:05 +0000
commit968b903a84465ba7c36b45dea809c806b3bd3a16 (patch)
treeecc8aaa999ac5183cc7e9e43924ad1c18816dcfa /test/tree_test.c
parent7f70df52fafb1bbb01926ef0732f80aeb3ef90c2 (diff)
downloadzix-968b903a84465ba7c36b45dea809c806b3bd3a16.tar.gz
zix-968b903a84465ba7c36b45dea809c806b3bd3a16.tar.bz2
zix-968b903a84465ba7c36b45dea809c806b3bd3a16.zip
Benchmark iteration and deletion.
Better error detection. git-svn-id: http://svn.drobilla.net/zix/trunk@5 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'test/tree_test.c')
-rw-r--r--test/tree_test.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/tree_test.c b/test/tree_test.c
index 6433193..c352fc0 100644
--- a/test/tree_test.c
+++ b/test/tree_test.c
@@ -68,9 +68,7 @@ stress(int test_num, size_t n_elems)
for (size_t i = 0; i < n_elems; ++i) {
r = ith_elem(test_num, n_elems, i);
int status = zix_tree_insert(t, (void*)r, &ti);
- if (status == ZIX_STATUS_EXISTS) {
- continue;
- } else if (status != ZIX_STATUS_SUCCESS) {
+ if (status) {
fprintf(stderr, "Insert failed\n");
return test_fail();
}