test/test_allocator.c

changeset 396
3539dd99ab92
parent 394
80c31ebd66c1
child 397
cfc1193b1e65
--- a/test/test_allocator.c	Sun Feb 07 16:52:21 2021 +0100
+++ b/test/test_allocator.c	Sun Feb 07 17:17:46 2021 +0100
@@ -31,11 +31,11 @@
 #include <CUnit/Basic.h>
 
 void test_default_allocator_available(void) {
-    struct cx_allocator_class clazz = cxDefaultAllocator->allocatorClass;
-    CU_ASSERT_PTR_EQUAL(clazz.malloc, cx_malloc_stdlib)
-    CU_ASSERT_PTR_EQUAL(clazz.realloc, cx_realloc_stdlib)
-    CU_ASSERT_PTR_EQUAL(clazz.calloc, cx_calloc_stdlib)
-    CU_ASSERT_PTR_EQUAL(clazz.free, cx_free_stdlib)
+    cx_allocator_class* clazz = cxDefaultAllocator->cl;
+    CU_ASSERT_PTR_EQUAL(clazz->malloc, cx_malloc_stdlib)
+    CU_ASSERT_PTR_EQUAL(clazz->realloc, cx_realloc_stdlib)
+    CU_ASSERT_PTR_EQUAL(clazz->calloc, cx_calloc_stdlib)
+    CU_ASSERT_PTR_EQUAL(clazz->free, cx_free_stdlib)
 }
 
 void test_default_malloc(void) {

mercurial