Wed, 01 Feb 2023 17:14:17 +0100
minor fix for testing allocator self-test
test/util_allocator.cpp | file | annotate | diff | comparison | revisions |
--- a/test/util_allocator.cpp Thu Jan 26 20:59:36 2023 +0100 +++ b/test/util_allocator.cpp Wed Feb 01 17:14:17 2023 +0100 @@ -111,7 +111,9 @@ CxTestingAllocator allocator; ASSERT_TRUE(allocator.verify()); + EXPECT_FALSE(allocator.used()); auto ptr = cxMalloc(&allocator, 16); + EXPECT_TRUE(allocator.used()); ASSERT_NE(ptr, nullptr); EXPECT_FALSE(allocator.verify()); @@ -157,7 +159,7 @@ TEST(TestingAllocator, CallocInitializes) { CxTestingAllocator allocator; - const char* zeros[16] = {0}; + const char zeros[16] = {0}; auto ptr = cxCalloc(&allocator, 16, 1); EXPECT_EQ(memcmp(ptr, zeros, 16), 0); cxFree(&allocator, ptr);