--- a/tests/test_list.c Sun Jan 05 18:19:42 2025 +0100 +++ b/tests/test_list.c Mon Jan 06 23:29:41 2025 +0100 @@ -1010,7 +1010,7 @@ CX_TEST_ASSERT(cxListSize(list) == 0); CX_TEST_ASSERT(list->collection.allocator == alloc); CX_TEST_ASSERT(list->collection.cmpfunc == cx_cmp_int); - CX_TEST_ASSERT(!cxListIsStoringPointers(list)); + CX_TEST_ASSERT(!list->collection.store_pointer); cxListFree(list); CX_TEST_ASSERT(cx_testing_allocator_verify(&talloc)); } @@ -1028,24 +1028,7 @@ CX_TEST_ASSERT(cxListSize(list) == 0); CX_TEST_ASSERT(list->collection.allocator == cxDefaultAllocator); CX_TEST_ASSERT(list->collection.cmpfunc == NULL); - CX_TEST_ASSERT(!cxListIsStoringPointers(list)); - } - cxListFree(list); -} - -CX_TEST(test_list_ll_store_pointers) { - CxList *list = cxLinkedListCreateSimple(47); - CX_TEST_DO { - CX_TEST_ASSERT(!cxListIsStoringPointers(list)); - cxListStorePointers(list); - CX_TEST_ASSERT(list->collection.elem_size == sizeof(void *)); - CX_TEST_ASSERT(list->cl != NULL); - CX_TEST_ASSERT(list->climpl != NULL); - CX_TEST_ASSERT(cxListIsStoringPointers(list)); - cxListStoreObjects(list); - CX_TEST_ASSERT(list->cl != NULL); - CX_TEST_ASSERT(list->climpl == NULL); - CX_TEST_ASSERT(!cxListIsStoringPointers(list)); + CX_TEST_ASSERT(!list->collection.store_pointer); } cxListFree(list); } @@ -1061,7 +1044,7 @@ CX_TEST_ASSERT(cxListSize(list) == 0); CX_TEST_ASSERT(list->collection.allocator == cxDefaultAllocator); CX_TEST_ASSERT(list->collection.cmpfunc == cx_cmp_ptr); - CX_TEST_ASSERT(cxListIsStoringPointers(list)); + CX_TEST_ASSERT(list->collection.store_pointer); } cxListFree(list); } @@ -1080,7 +1063,7 @@ CX_TEST_ASSERT(cxListSize(list) == 0); CX_TEST_ASSERT(list->collection.allocator == alloc); CX_TEST_ASSERT(list->collection.cmpfunc == cx_cmp_int); - CX_TEST_ASSERT(!cxListIsStoringPointers(list)); + CX_TEST_ASSERT(!list->collection.store_pointer); cxListFree(list); CX_TEST_ASSERT(cx_testing_allocator_verify(&talloc)); } @@ -1098,7 +1081,7 @@ CX_TEST_ASSERT(cxListSize(list) == 0); CX_TEST_ASSERT(list->collection.allocator == cxDefaultAllocator); CX_TEST_ASSERT(list->collection.cmpfunc == NULL); - CX_TEST_ASSERT(!cxListIsStoringPointers(list)); + CX_TEST_ASSERT(!list->collection.store_pointer); } cxListFree(list); } @@ -1114,7 +1097,7 @@ CX_TEST_ASSERT(cxListSize(list) == 0); CX_TEST_ASSERT(list->collection.allocator == cxDefaultAllocator); CX_TEST_ASSERT(list->collection.cmpfunc == cx_cmp_ptr); - CX_TEST_ASSERT(cxListIsStoringPointers(list)); + CX_TEST_ASSERT(list->collection.store_pointer); } cxListFree(list); } @@ -1862,7 +1845,7 @@ const int *testdata, size_t testdata_len) { destr_test_ctr = 0; - int off = cxListIsStoringPointers(list) ? 1 : 0; + int off = list->collection.store_pointer ? 1 : 0; cxListRemove(list, 15); CX_TEST_ASSERT(1 == destr_test_ctr); @@ -2025,7 +2008,6 @@ cx_test_register(suite, test_list_ll_create); cx_test_register(suite, test_list_ll_create_simple); - cx_test_register(suite, test_list_ll_store_pointers); cx_test_register(suite, test_list_ll_create_simple_for_pointers); cx_test_register(suite, test_list_pll_destroy_no_destr); cx_test_register(suite, test_list_pll_destroy_simple_destr);