--- a/tests/test_list.cpp Thu Feb 23 22:27:41 2023 +0100 +++ b/tests/test_list.cpp Thu Feb 23 22:43:13 2023 +0100 @@ -915,6 +915,15 @@ verifyCreate(list); } +TEST_F(LinkedList, cxLinkedListCreateSimple) { + CxList *list = autofree(cxLinkedListCreateSimple(sizeof(int))); + ASSERT_NE(list, nullptr); + EXPECT_EQ(list->itemsize, sizeof(int)); + EXPECT_EQ(list->capacity, (size_t) -1); + EXPECT_EQ(list->cmpfunc, nullptr); + EXPECT_EQ(list->allocator, cxDefaultAllocator); +} + TEST_F(ArrayList, cxArrayListCreate) { CxList *list = autofree(cxArrayListCreate(&testingAllocator, cx_cmp_int, sizeof(int), 8)); ASSERT_NE(list, nullptr); @@ -923,6 +932,15 @@ verifyCreate(list); } +TEST_F(ArrayList, cxArrayListCreateSimple) { + CxList *list = autofree(cxArrayListCreateSimple(sizeof(int), 8)); + ASSERT_NE(list, nullptr); + EXPECT_EQ(list->cmpfunc, nullptr); + EXPECT_EQ(list->allocator, cxDefaultAllocator); + EXPECT_EQ(list->itemsize, sizeof(int)); + EXPECT_EQ(list->capacity, 8); +} + TEST_F(LinkedList, cxListAdd) { auto list = autofree(cxLinkedListCreate(&testingAllocator, cx_cmp_int, sizeof(int))); verifyAdd(list, false);