summaryrefslogtreecommitdiff
path: root/unittests/ADT/DenseMapTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ADT/DenseMapTest.cpp')
-rw-r--r--unittests/ADT/DenseMapTest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/unittests/ADT/DenseMapTest.cpp b/unittests/ADT/DenseMapTest.cpp
index cb5ba6875eaa..87f22f6f403e 100644
--- a/unittests/ADT/DenseMapTest.cpp
+++ b/unittests/ADT/DenseMapTest.cpp
@@ -30,7 +30,7 @@ uint32_t *getTestValue(int i, uint32_t **) {
return &dummy_arr1[i];
}
-/// \brief A test class that tries to check that construction and destruction
+/// A test class that tries to check that construction and destruction
/// occur correctly.
class CtorTester {
static std::set<CtorTester *> Constructed;
@@ -247,7 +247,7 @@ TYPED_TEST(DenseMapTest, AssignmentTest) {
EXPECT_EQ(this->getValue(), copyMap[this->getKey()]);
// test self-assignment.
- copyMap = copyMap;
+ copyMap = static_cast<TypeParam &>(copyMap);
EXPECT_EQ(1u, copyMap.size());
EXPECT_EQ(this->getValue(), copyMap[this->getKey()]);
}
@@ -262,7 +262,7 @@ TYPED_TEST(DenseMapTest, AssignmentTestNotSmall) {
EXPECT_EQ(this->getValue(Key), copyMap[this->getKey(Key)]);
// test self-assignment.
- copyMap = copyMap;
+ copyMap = static_cast<TypeParam &>(copyMap);
EXPECT_EQ(5u, copyMap.size());
for (int Key = 0; Key < 5; ++Key)
EXPECT_EQ(this->getValue(Key), copyMap[this->getKey(Key)]);
@@ -384,7 +384,7 @@ TEST(DenseMapCustomTest, DefaultMinReservedSizeTest) {
EXPECT_EQ(MemorySize, Map.getMemorySize());
// Check that move was called the expected number of times
EXPECT_EQ(ExpectedMaxInitialEntries, CountCopyAndMove::Move);
- // Check that no copy occured
+ // Check that no copy occurred
EXPECT_EQ(0, CountCopyAndMove::Copy);
// Adding one extra element should grow the map
@@ -397,7 +397,7 @@ TEST(DenseMapCustomTest, DefaultMinReservedSizeTest) {
// Check that move was called the expected number of times
// This relies on move-construction elision, and cannot be reliably tested.
// EXPECT_EQ(ExpectedMaxInitialEntries + 2, CountCopyAndMove::Move);
- // Check that no copy occured
+ // Check that no copy occurred
EXPECT_EQ(0, CountCopyAndMove::Copy);
}
@@ -422,7 +422,7 @@ TEST(DenseMapCustomTest, InitialSizeTest) {
EXPECT_EQ(MemorySize, Map.getMemorySize());
// Check that move was called the expected number of times
EXPECT_EQ(Size, CountCopyAndMove::Move);
- // Check that no copy occured
+ // Check that no copy occurred
EXPECT_EQ(0, CountCopyAndMove::Copy);
}
}
@@ -438,7 +438,7 @@ TEST(DenseMapCustomTest, InitFromIterator) {
CountCopyAndMove::Move = 0;
CountCopyAndMove::Copy = 0;
DenseMap<int, CountCopyAndMove> Map(Values.begin(), Values.end());
- // Check that no move occured
+ // Check that no move occurred
EXPECT_EQ(0, CountCopyAndMove::Move);
// Check that copy was called the expected number of times
EXPECT_EQ(Count, CountCopyAndMove::Copy);
@@ -466,7 +466,7 @@ TEST(DenseMapCustomTest, ReserveTest) {
EXPECT_EQ(MemorySize, Map.getMemorySize());
// Check that move was called the expected number of times
EXPECT_EQ(Size, CountCopyAndMove::Move);
- // Check that no copy occured
+ // Check that no copy occurred
EXPECT_EQ(0, CountCopyAndMove::Copy);
}
}