summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-11 12:34:13 +0100
committerDavid Robillard <d@drobilla.net>2020-11-11 12:34:31 +0100
commit3988cda6564cdb5a9bca91bc263bfbc7510b91b0 (patch)
tree1aa7fc9dd6856bca5fd3e5bbb79d843be73c1624 /test
parentd822163cd48e00f54541567990a8b80ada85b3e3 (diff)
downloadzix-3988cda6564cdb5a9bca91bc263bfbc7510b91b0.tar.gz
zix-3988cda6564cdb5a9bca91bc263bfbc7510b91b0.tar.bz2
zix-3988cda6564cdb5a9bca91bc263bfbc7510b91b0.zip
Add configure option to disable test malloc implementation
Diffstat (limited to 'test')
-rw-r--r--test/btree_test.c2
-rw-r--r--test/hash_test.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/btree_test.c b/test/btree_test.c
index df44081..ad6b6b7 100644
--- a/test/btree_test.c
+++ b/test/btree_test.c
@@ -460,7 +460,7 @@ main(int argc, char** argv)
}
printf("\n");
-#ifndef _WIN32
+#ifdef ZIX_WITH_TEST_MALLOC
const size_t total_n_allocs = test_malloc_get_n_allocs();
const size_t fail_n_elems = 1000;
printf("Testing 0 ... %zu failed allocations\n", total_n_allocs);
diff --git a/test/hash_test.c b/test/hash_test.c
index ea808e6..91c0127 100644
--- a/test/hash_test.c
+++ b/test/hash_test.c
@@ -208,7 +208,7 @@ main(void)
return 1;
}
-#ifndef _WIN32
+#ifdef ZIX_WITH_TEST_MALLOC
const size_t total_n_allocs = test_malloc_get_n_allocs();
printf("Testing 0 ... %zu failed allocations\n", total_n_allocs);
expect_failure = true;