diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_allocator.c | 2 | ||||
-rw-r--r-- | test/test_btree.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/test/test_allocator.c b/test/test_allocator.c index 425cc41..3474533 100644 --- a/test/test_allocator.c +++ b/test/test_allocator.c @@ -107,6 +107,8 @@ test_bump_allocator(void) assert(aligned <= buffer + sizeof(buffer)); assert((uintptr_t)aligned % 128 == 0U); + assert(!zix_aligned_alloc(&allocator.base, 8, 896)); + zix_aligned_free(&allocator.base, aligned); zix_free(&allocator.base, reclaimed); // Correct, but a noop zix_free(&allocator.base, malloced); // Correct, but a noop diff --git a/test/test_btree.c b/test/test_btree.c index 9694a7b..7392ff8 100644 --- a/test/test_btree.c +++ b/test/test_btree.c @@ -221,9 +221,9 @@ test_remove_cases(void) even multiples. This spreads the load around to hit as many cases as possible. */ - static const uintptr_t s1 = 2U; - static const uintptr_t s2 = 255U; - const size_t n_insertions = s1 * s2 * 1000U; + static const uintptr_t s1 = 3U; + static const uintptr_t s2 = 511U; + const size_t n_insertions = s1 * s2 * 450U; ZixBTree* const t = zix_btree_new(NULL, int_cmp, NULL); @@ -628,9 +628,9 @@ main(int argc, char** argv) test_remove_cases(); test_failed_alloc(); - const unsigned n_tests = 3U; + const unsigned n_tests = 2U; const size_t n_elems = - (argc > 1) ? zix_test_size_arg(argv[1], 4U, 1U << 20U) : 131072U; + (argc > 1) ? zix_test_size_arg(argv[1], 4U, 1U << 20U) : (1U << 16U); printf("Running %u tests with %zu elements", n_tests, n_elems); for (unsigned i = 0; i < n_tests; ++i) { |