summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/unittests/ADT/DenseMapTest.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-01-27 16:42:12 +0000
committerpatrick <patrick@openbsd.org>2019-01-27 16:42:12 +0000
commitb773203fb58f3ef282fb69c832d8710cab5bc82d (patch)
treee75913f147570fbd75169647b144df85b88a038c /gnu/llvm/unittests/ADT/DenseMapTest.cpp
parenttweak errno in previous (diff)
downloadwireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.tar.xz
wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.zip
Import LLVM 7.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/unittests/ADT/DenseMapTest.cpp')
-rw-r--r--gnu/llvm/unittests/ADT/DenseMapTest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/gnu/llvm/unittests/ADT/DenseMapTest.cpp b/gnu/llvm/unittests/ADT/DenseMapTest.cpp
index cb5ba6875ea..87f22f6f403 100644
--- a/gnu/llvm/unittests/ADT/DenseMapTest.cpp
+++ b/gnu/llvm/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);
}
}