diff options
Diffstat (limited to 'libmemunreachable')
-rw-r--r-- | libmemunreachable/tests/LeakFolding_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmemunreachable/tests/LeakFolding_test.cpp b/libmemunreachable/tests/LeakFolding_test.cpp index 879a3a023..e85df5f58 100644 --- a/libmemunreachable/tests/LeakFolding_test.cpp +++ b/libmemunreachable/tests/LeakFolding_test.cpp @@ -37,10 +37,10 @@ class LeakFoldingTest : public ::testing::Test { Heap heap_; }; -#define buffer_begin(buffer) reinterpret_cast<uintptr_t>(&buffer[0]) -#define buffer_end(buffer) (reinterpret_cast<uintptr_t>(&buffer[0]) + sizeof(buffer)) +#define buffer_begin(buffer) reinterpret_cast<uintptr_t>(&(buffer)[0]) +#define buffer_end(buffer) (reinterpret_cast<uintptr_t>(&(buffer)[0]) + sizeof(buffer)) #define ALLOCATION(heap_walker, buffer) \ - ASSERT_EQ(true, heap_walker.Allocation(buffer_begin(buffer), buffer_end(buffer))) + ASSERT_EQ(true, (heap_walker).Allocation(buffer_begin(buffer), buffer_end(buffer))) TEST_F(LeakFoldingTest, one) { void* buffer1[1] = {nullptr}; |