# HG changeset patch # User Mike Becker # Date 1675268057 -3600 # Node ID 98c90759f69e8b574e1f19345fc8b705e4bc9c49 # Parent d402fead3386c26ea60a797f6f8a36f699e54ccb minor fix for testing allocator self-test diff -r d402fead3386 -r 98c90759f69e test/util_allocator.cpp --- 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);