diff -r 83888029778a -r 135ce35d5108 test/array_tests.c --- a/test/array_tests.c Sat Aug 10 08:47:25 2019 +0200 +++ b/test/array_tests.c Sat Aug 10 09:47:59 2019 +0200 @@ -33,7 +33,7 @@ UcxArray array = ucx_array_new(16, sizeof(int)); UCX_TEST_BEGIN - ucx_array_free(&array); + ucx_array_destroy(&array); UCX_TEST_ASSERT(array.data == NULL, "data pointer not NULL after free"); UCX_TEST_ASSERT(array.size == 0, "size not zero after free"); UCX_TEST_ASSERT(array.capacity == 0, "capacity not zero after free"); @@ -53,7 +53,7 @@ UCX_TEST_ASSERT(array.allocator == ucx_default_allocator(), "array not using the default allocator"); UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_append) { @@ -88,7 +88,7 @@ UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_prepend) { @@ -123,7 +123,7 @@ UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_set) { @@ -157,7 +157,7 @@ UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_equals) { @@ -214,10 +214,10 @@ "compare using memcmp() failed"); UCX_TEST_END - ucx_array_free(&a1); - ucx_array_free(&a2); - ucx_array_free(&a3); - ucx_array_free(&a4); + ucx_array_destroy(&a1); + ucx_array_destroy(&a2); + ucx_array_destroy(&a3); + ucx_array_destroy(&a4); } UCX_TEST(test_ucx_array_concat) { @@ -253,8 +253,8 @@ "arrays of different element size must not be concatenated"); UCX_TEST_END - ucx_array_free(&a1); - ucx_array_free(&a2); + ucx_array_destroy(&a1); + ucx_array_destroy(&a2); } UCX_TEST(test_ucx_array_at) { @@ -278,7 +278,7 @@ UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_find) { @@ -309,7 +309,7 @@ "failed using memcmp()"); UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_contains) { @@ -340,7 +340,7 @@ "false positive using memcmp()"); UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_remove) { @@ -377,7 +377,7 @@ UCX_TEST_ASSERT(array.size == 3, "wrong size after fast remove"); UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_clone) { @@ -404,8 +404,8 @@ UCX_TEST_END - ucx_array_free(&array); - ucx_array_free(©); + ucx_array_destroy(&array); + ucx_array_destroy(©); } static int ucx_cmp_int_reverse(const void* x, const void* y, void* data) { @@ -467,8 +467,8 @@ "failed for bigger arrays"); UCX_TEST_END - ucx_array_free(&expected); - ucx_array_free(&array); + ucx_array_destroy(&expected); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_autogrow) { @@ -494,7 +494,7 @@ UCX_TEST_ASSERT(elems[3] == 5 && elems[4] == 5, "corrupt data"); UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_shrink) { @@ -505,7 +505,7 @@ UCX_TEST_ASSERT(!ucx_array_shrink(&array), "failed"); UCX_TEST_ASSERT(array.capacity == 4, "incorrect capacity after shrink"); UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_resize) { @@ -523,7 +523,7 @@ UCX_TEST_ASSERT(array.size == 4, "incorrect size after resize"); UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); } UCX_TEST(test_ucx_array_reserve) { @@ -538,5 +538,5 @@ UCX_TEST_ASSERT(array.capacity == 32, "incorrect capacity after reserve"); UCX_TEST_END - ucx_array_free(&array); + ucx_array_destroy(&array); }