test/test_list.c

changeset 503
a89857072ace
parent 500
eb9e7bd40a8e
child 506
18782bbe3607
--- a/test/test_list.c	Tue Feb 15 19:07:14 2022 +0100
+++ b/test/test_list.c	Tue Feb 15 19:41:48 2022 +0100
@@ -568,7 +568,7 @@
     CU_ASSERT_EQUAL(list->itemsize, sizeof(int))
     CU_ASSERT_PTR_EQUAL(list->cmpfunc, cmp_int)
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -583,7 +583,7 @@
     CU_ASSERT_EQUAL(list->itemsize, sizeof(void *))
     CU_ASSERT_PTR_EQUAL(list->cmpfunc, cmp_int)
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -599,8 +599,8 @@
 
     CU_ASSERT_TRUE(0 == cxListCompare(list, expected))
 
-    cxLinkedListDestroy(list);
-    cxLinkedListDestroy(expected);
+    cxListDestroy(list);
+    cxListDestroy(expected);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -624,8 +624,8 @@
     CxList *expected = cxLinkedListFromArray(cxTestingAllocator, cmp_int, sizeof(int), 3, exp);
     CU_ASSERT_TRUE(0 == cxListCompare(list, expected))
 
-    cxLinkedListDestroy(list);
-    cxLinkedListDestroy(expected);
+    cxListDestroy(list);
+    cxListDestroy(expected);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -655,7 +655,7 @@
     CU_ASSERT_EQUAL(*(int *) cxListAt(list, 1), 10)
     CU_ASSERT_EQUAL(*(int *) cxListAt(list, 2), 11)
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -686,8 +686,8 @@
     CxList *expected = cxLinkedListFromArray(cxTestingAllocator, cmp_int, sizeof(int), 4, exp);
     CU_ASSERT_TRUE(0 == cxListCompare(list, expected))
 
-    cxLinkedListDestroy(list);
-    cxLinkedListDestroy(expected);
+    cxListDestroy(list);
+    cxListDestroy(expected);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -716,7 +716,7 @@
     CU_ASSERT_EQUAL(*(int *) cxListAt(list, 2), 5)
     CU_ASSERT_EQUAL(*(int *) cxListAt(list, 3), 42)
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -756,7 +756,7 @@
 
     CU_ASSERT_NOT_EQUAL(cxListRemove(list, 0), 0)
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -800,7 +800,7 @@
 
     CU_ASSERT_NOT_EQUAL(cxListRemove(list, 0), 0)
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -816,7 +816,7 @@
     CU_ASSERT_EQUAL(*(int *) cxListAt(list, 2), 13)
     CU_ASSERT_PTR_NULL(cxListAt(list, 3))
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -835,7 +835,7 @@
     CU_ASSERT_EQUAL(*(int *) cxListAt(list, 2), 13)
     CU_ASSERT_PTR_NULL(cxListAt(list, 3))
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -861,7 +861,7 @@
     criteria = -5;
     CU_ASSERT_EQUAL(cxListFind(list, &criteria), 3)
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -891,7 +891,7 @@
     b = -5;
     CU_ASSERT_EQUAL(cxListFind(list, &criteria), 1)
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -921,8 +921,8 @@
     cxListSort(list);
     CU_ASSERT_TRUE(0 == cxListCompare(list, exp))
 
-    cxLinkedListDestroy(list);
-    cxLinkedListDestroy(exp);
+    cxListDestroy(list);
+    cxListDestroy(exp);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -958,7 +958,7 @@
         CU_ASSERT_EQUAL(*(int *) cxListAt(list, i), expected[i])
     }
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -978,7 +978,7 @@
     CU_ASSERT_EQUAL(*(int *) cxListAt(list, 2), 4)
     CU_ASSERT_EQUAL(*(int *) cxListAt(list, 3), 6)
     CU_ASSERT_EQUAL(*(int *) cxListAt(list, 4), 8)
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -1041,8 +1041,8 @@
                                              cmp_int, sizeof(int), 10, expdata);
 
     CU_ASSERT_EQUAL(0, cxListCompare(list, expected))
-    cxLinkedListDestroy(list);
-    cxLinkedListDestroy(expected);
+    cxListDestroy(list);
+    cxListDestroy(expected);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 
@@ -1083,7 +1083,7 @@
         CU_ASSERT_EQUAL(*(int *) cxListAt(list, i), expdata[i])
     }
 
-    cxLinkedListDestroy(list);
+    cxListDestroy(list);
     CU_ASSERT_TRUE(cxTestingAllocatorVerify())
 }
 

mercurial