From 8903d7a5263a7f3ab12d85dd31ea8410ef36f122 Mon Sep 17 00:00:00 2001 From: daan Date: Mon, 9 Sep 2019 08:21:35 -0700 Subject: [PATCH] fix tests for aligned allocation --- test/test-api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test-api.c b/test/test-api.c index a5f61074..5f3395fb 100644 --- a/test/test-api.c +++ b/test/test-api.c @@ -124,13 +124,13 @@ int main() { void* p = mi_malloc_aligned(32,24); result = (p != NULL && (uintptr_t)(p) % 24 == 0); mi_free(p); }); CHECK_BODY("malloc-aligned2", { - void* p = mi_malloc_aligned(8,24); result = (p != NULL && (uintptr_t)(p) % 24 == 0); mi_free(p); + void* p = mi_malloc_aligned(48,24); result = (p != NULL && (uintptr_t)(p) % 24 == 0); mi_free(p); }); CHECK_BODY("malloc-aligned-at1", { - void* p = mi_malloc_aligned_at(8,24,0); result = (p != NULL && ((uintptr_t)(p) + 0) % 24 == 0); mi_free(p); + void* p = mi_malloc_aligned_at(48,24,0); result = (p != NULL && ((uintptr_t)(p) + 0) % 24 == 0); mi_free(p); }); CHECK_BODY("malloc-aligned-at2", { - void* p = mi_malloc_aligned_at(5,24,8); result = (p != NULL && ((uintptr_t)(p) + 8) % 24 == 0); mi_free(p); + void* p = mi_malloc_aligned_at(50,24,8); result = (p != NULL && ((uintptr_t)(p) + 8) % 24 == 0); mi_free(p); }); // ---------------------------------------------------