aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/DenseMapTest.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-03-25 15:46:14 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-03-25 15:46:14 +0000
commit9706dcf93b0ba49fca2f149e849d286e5412f765 (patch)
tree1d4ac0a70a4a297c3b7557f387d4b86e6266d0ea /llvm/unittests/ADT/DenseMapTest.cpp
parent5dd1e56de5346a7e5e85ca33f4dfe4bfd7b54795 (diff)
downloadllvm-9706dcf93b0ba49fca2f149e849d286e5412f765.zip
llvm-9706dcf93b0ba49fca2f149e849d286e5412f765.tar.gz
llvm-9706dcf93b0ba49fca2f149e849d286e5412f765.tar.bz2
Disable counting the number of move in the unittest, it seems to rely on move-construction elision
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 264412
Diffstat (limited to 'llvm/unittests/ADT/DenseMapTest.cpp')
-rw-r--r--llvm/unittests/ADT/DenseMapTest.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/unittests/ADT/DenseMapTest.cpp b/llvm/unittests/ADT/DenseMapTest.cpp
index 52753da..d940677 100644
--- a/llvm/unittests/ADT/DenseMapTest.cpp
+++ b/llvm/unittests/ADT/DenseMapTest.cpp
@@ -392,7 +392,8 @@ TEST(DenseMapCustomTest, DefaultMinReservedSizeTest) {
// Check that we grew
EXPECT_NE(MemorySize, Map.getMemorySize());
// Check that move was called the expected number of times
- EXPECT_EQ(ExpectedMaxInitialEntries + 2, CountCopyAndMove::Move);
+ // This relies on move-construction elision, and cannot be reliably tested.
+ // EXPECT_EQ(ExpectedMaxInitialEntries + 2, CountCopyAndMove::Move);
// Check that no copy occured
EXPECT_EQ(0, CountCopyAndMove::Copy);
}
@@ -415,7 +416,8 @@ TEST(DenseMapCustomTest, InitialSizeTest) {
// Check that we didn't grow
EXPECT_EQ(MemorySize, Map.getMemorySize());
// Check that move was called the expected number of times
- EXPECT_EQ(Size * 2, CountCopyAndMove::Move);
+ // This relies on move-construction elision, and cannot be reliably tested.
+ // EXPECT_EQ(Size * 2, CountCopyAndMove::Move);
// Check that no copy occured
EXPECT_EQ(0, CountCopyAndMove::Copy);
}
@@ -457,7 +459,8 @@ TEST(DenseMapCustomTest, ReserveTest) {
// Check that we didn't grow
EXPECT_EQ(MemorySize, Map.getMemorySize());
// Check that move was called the expected number of times
- EXPECT_EQ(Size * 2, CountCopyAndMove::Move);
+ // This relies on move-construction elision, and cannot be reliably tested.
+ // EXPECT_EQ(Size * 2, CountCopyAndMove::Move);
// Check that no copy occured
EXPECT_EQ(0, CountCopyAndMove::Copy);
}