Commit 05b8b22f authored by Nathan Bronson's avatar Nathan Bronson Committed by Facebook Github Bot

relax allocated-memory tests for libcxx

Summary:
The current version of libc++ deallocates the existing capacity
when calling operator=(initializer_list), even if the map is empty. This
diff relaxes the expectations of F14's allocated memory tests (which
fall back to the underlying STL std::unordered_map on some platforms)
to accept this implementation.

Reviewed By: shixiao

Differential Revision: D17527441

fbshipit-source-id: 01da55aaeb6f8328e093251b026052dac365f7b2
parent af2373b9
......@@ -107,7 +107,9 @@ void runAllocatedMemorySizeTest() {
m.reserve(5);
EXPECT_GT(testAllocatedMemorySize(), 0);
m = {};
EXPECT_GT(testAllocatedMemorySize(), 0);
if (preciseAllocInfo) {
EXPECT_GT(testAllocatedMemorySize(), 0);
}
}
EXPECT_EQ(testAllocatedMemorySize(), 0);
EXPECT_EQ(testAllocatedBlockCount(), 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment