test/test_list.c

changeset 503
a89857072ace
parent 500
eb9e7bd40a8e
child 506
18782bbe3607
     1.1 --- a/test/test_list.c	Tue Feb 15 19:07:14 2022 +0100
     1.2 +++ b/test/test_list.c	Tue Feb 15 19:41:48 2022 +0100
     1.3 @@ -568,7 +568,7 @@
     1.4      CU_ASSERT_EQUAL(list->itemsize, sizeof(int))
     1.5      CU_ASSERT_PTR_EQUAL(list->cmpfunc, cmp_int)
     1.6  
     1.7 -    cxLinkedListDestroy(list);
     1.8 +    cxListDestroy(list);
     1.9      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
    1.10  }
    1.11  
    1.12 @@ -583,7 +583,7 @@
    1.13      CU_ASSERT_EQUAL(list->itemsize, sizeof(void *))
    1.14      CU_ASSERT_PTR_EQUAL(list->cmpfunc, cmp_int)
    1.15  
    1.16 -    cxLinkedListDestroy(list);
    1.17 +    cxListDestroy(list);
    1.18      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
    1.19  }
    1.20  
    1.21 @@ -599,8 +599,8 @@
    1.22  
    1.23      CU_ASSERT_TRUE(0 == cxListCompare(list, expected))
    1.24  
    1.25 -    cxLinkedListDestroy(list);
    1.26 -    cxLinkedListDestroy(expected);
    1.27 +    cxListDestroy(list);
    1.28 +    cxListDestroy(expected);
    1.29      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
    1.30  }
    1.31  
    1.32 @@ -624,8 +624,8 @@
    1.33      CxList *expected = cxLinkedListFromArray(cxTestingAllocator, cmp_int, sizeof(int), 3, exp);
    1.34      CU_ASSERT_TRUE(0 == cxListCompare(list, expected))
    1.35  
    1.36 -    cxLinkedListDestroy(list);
    1.37 -    cxLinkedListDestroy(expected);
    1.38 +    cxListDestroy(list);
    1.39 +    cxListDestroy(expected);
    1.40      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
    1.41  }
    1.42  
    1.43 @@ -655,7 +655,7 @@
    1.44      CU_ASSERT_EQUAL(*(int *) cxListAt(list, 1), 10)
    1.45      CU_ASSERT_EQUAL(*(int *) cxListAt(list, 2), 11)
    1.46  
    1.47 -    cxLinkedListDestroy(list);
    1.48 +    cxListDestroy(list);
    1.49      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
    1.50  }
    1.51  
    1.52 @@ -686,8 +686,8 @@
    1.53      CxList *expected = cxLinkedListFromArray(cxTestingAllocator, cmp_int, sizeof(int), 4, exp);
    1.54      CU_ASSERT_TRUE(0 == cxListCompare(list, expected))
    1.55  
    1.56 -    cxLinkedListDestroy(list);
    1.57 -    cxLinkedListDestroy(expected);
    1.58 +    cxListDestroy(list);
    1.59 +    cxListDestroy(expected);
    1.60      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
    1.61  }
    1.62  
    1.63 @@ -716,7 +716,7 @@
    1.64      CU_ASSERT_EQUAL(*(int *) cxListAt(list, 2), 5)
    1.65      CU_ASSERT_EQUAL(*(int *) cxListAt(list, 3), 42)
    1.66  
    1.67 -    cxLinkedListDestroy(list);
    1.68 +    cxListDestroy(list);
    1.69      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
    1.70  }
    1.71  
    1.72 @@ -756,7 +756,7 @@
    1.73  
    1.74      CU_ASSERT_NOT_EQUAL(cxListRemove(list, 0), 0)
    1.75  
    1.76 -    cxLinkedListDestroy(list);
    1.77 +    cxListDestroy(list);
    1.78      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
    1.79  }
    1.80  
    1.81 @@ -800,7 +800,7 @@
    1.82  
    1.83      CU_ASSERT_NOT_EQUAL(cxListRemove(list, 0), 0)
    1.84  
    1.85 -    cxLinkedListDestroy(list);
    1.86 +    cxListDestroy(list);
    1.87      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
    1.88  }
    1.89  
    1.90 @@ -816,7 +816,7 @@
    1.91      CU_ASSERT_EQUAL(*(int *) cxListAt(list, 2), 13)
    1.92      CU_ASSERT_PTR_NULL(cxListAt(list, 3))
    1.93  
    1.94 -    cxLinkedListDestroy(list);
    1.95 +    cxListDestroy(list);
    1.96      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
    1.97  }
    1.98  
    1.99 @@ -835,7 +835,7 @@
   1.100      CU_ASSERT_EQUAL(*(int *) cxListAt(list, 2), 13)
   1.101      CU_ASSERT_PTR_NULL(cxListAt(list, 3))
   1.102  
   1.103 -    cxLinkedListDestroy(list);
   1.104 +    cxListDestroy(list);
   1.105      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
   1.106  }
   1.107  
   1.108 @@ -861,7 +861,7 @@
   1.109      criteria = -5;
   1.110      CU_ASSERT_EQUAL(cxListFind(list, &criteria), 3)
   1.111  
   1.112 -    cxLinkedListDestroy(list);
   1.113 +    cxListDestroy(list);
   1.114      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
   1.115  }
   1.116  
   1.117 @@ -891,7 +891,7 @@
   1.118      b = -5;
   1.119      CU_ASSERT_EQUAL(cxListFind(list, &criteria), 1)
   1.120  
   1.121 -    cxLinkedListDestroy(list);
   1.122 +    cxListDestroy(list);
   1.123      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
   1.124  }
   1.125  
   1.126 @@ -921,8 +921,8 @@
   1.127      cxListSort(list);
   1.128      CU_ASSERT_TRUE(0 == cxListCompare(list, exp))
   1.129  
   1.130 -    cxLinkedListDestroy(list);
   1.131 -    cxLinkedListDestroy(exp);
   1.132 +    cxListDestroy(list);
   1.133 +    cxListDestroy(exp);
   1.134      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
   1.135  }
   1.136  
   1.137 @@ -958,7 +958,7 @@
   1.138          CU_ASSERT_EQUAL(*(int *) cxListAt(list, i), expected[i])
   1.139      }
   1.140  
   1.141 -    cxLinkedListDestroy(list);
   1.142 +    cxListDestroy(list);
   1.143      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
   1.144  }
   1.145  
   1.146 @@ -978,7 +978,7 @@
   1.147      CU_ASSERT_EQUAL(*(int *) cxListAt(list, 2), 4)
   1.148      CU_ASSERT_EQUAL(*(int *) cxListAt(list, 3), 6)
   1.149      CU_ASSERT_EQUAL(*(int *) cxListAt(list, 4), 8)
   1.150 -    cxLinkedListDestroy(list);
   1.151 +    cxListDestroy(list);
   1.152      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
   1.153  }
   1.154  
   1.155 @@ -1041,8 +1041,8 @@
   1.156                                               cmp_int, sizeof(int), 10, expdata);
   1.157  
   1.158      CU_ASSERT_EQUAL(0, cxListCompare(list, expected))
   1.159 -    cxLinkedListDestroy(list);
   1.160 -    cxLinkedListDestroy(expected);
   1.161 +    cxListDestroy(list);
   1.162 +    cxListDestroy(expected);
   1.163      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
   1.164  }
   1.165  
   1.166 @@ -1083,7 +1083,7 @@
   1.167          CU_ASSERT_EQUAL(*(int *) cxListAt(list, i), expdata[i])
   1.168      }
   1.169  
   1.170 -    cxLinkedListDestroy(list);
   1.171 +    cxListDestroy(list);
   1.172      CU_ASSERT_TRUE(cxTestingAllocatorVerify())
   1.173  }
   1.174  

mercurial