test/test_allocator.c

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

mercurial