Merge "Fix linker tests"

This commit is contained in:
Dimitry Ivanov 2015-10-05 20:10:26 +00:00 committed by Gerrit Code Review
commit 748421beef

View File

@ -53,7 +53,7 @@ TEST(linker_memory, test_alloc_0) {
LinkerMemoryAllocator allocator; LinkerMemoryAllocator allocator;
void* ptr = allocator.alloc(0); void* ptr = allocator.alloc(0);
ASSERT_TRUE(ptr != nullptr); ASSERT_TRUE(ptr != nullptr);
free(ptr); allocator.free(ptr);
} }
TEST(linker_memory, test_free_nullptr) { TEST(linker_memory, test_free_nullptr) {
@ -110,7 +110,7 @@ TEST(linker_memory, test_realloc) {
ASSERT_TRUE(memcmp(reallocated_ptr, model, 4000) == 0); ASSERT_TRUE(memcmp(reallocated_ptr, model, 4000) == 0);
ASSERT_EQ(nullptr, realloc(reallocated_ptr, 0)); ASSERT_EQ(nullptr, allocator.realloc(reallocated_ptr, 0));
} }
TEST(linker_memory, test_small_smoke) { TEST(linker_memory, test_small_smoke) {