test/test_allocator.c

changeset 396
3539dd99ab92
parent 394
80c31ebd66c1
child 397
cfc1193b1e65
     1.1 --- a/test/test_allocator.c	Sun Feb 07 16:52:21 2021 +0100
     1.2 +++ b/test/test_allocator.c	Sun Feb 07 17:17:46 2021 +0100
     1.3 @@ -31,11 +31,11 @@
     1.4  #include <CUnit/Basic.h>
     1.5  
     1.6  void test_default_allocator_available(void) {
     1.7 -    struct cx_allocator_class clazz = cxDefaultAllocator->allocatorClass;
     1.8 -    CU_ASSERT_PTR_EQUAL(clazz.malloc, cx_malloc_stdlib)
     1.9 -    CU_ASSERT_PTR_EQUAL(clazz.realloc, cx_realloc_stdlib)
    1.10 -    CU_ASSERT_PTR_EQUAL(clazz.calloc, cx_calloc_stdlib)
    1.11 -    CU_ASSERT_PTR_EQUAL(clazz.free, cx_free_stdlib)
    1.12 +    cx_allocator_class* clazz = cxDefaultAllocator->cl;
    1.13 +    CU_ASSERT_PTR_EQUAL(clazz->malloc, cx_malloc_stdlib)
    1.14 +    CU_ASSERT_PTR_EQUAL(clazz->realloc, cx_realloc_stdlib)
    1.15 +    CU_ASSERT_PTR_EQUAL(clazz->calloc, cx_calloc_stdlib)
    1.16 +    CU_ASSERT_PTR_EQUAL(clazz->free, cx_free_stdlib)
    1.17  }
    1.18  
    1.19  void test_default_malloc(void) {

mercurial