[ADT] Use a nonce type with at least 4 byte alignment.
[oota-llvm.git] / unittests / ADT / SparseSetTest.cpp
index 981d52e3a267a1458fdec51c1f640406b0dd0376..eb0e0db283b774583f28088175b6b52b6b20b4ed 100644 (file)
@@ -16,7 +16,7 @@ namespace {
 
 typedef SparseSet<unsigned> USet;
 
-// Empty set tests
+// Empty set tests.
 TEST(SparseSetTest, EmptySet) {
   USet Set;
   EXPECT_TRUE(Set.empty());
@@ -39,7 +39,7 @@ TEST(SparseSetTest, EmptySet) {
   EXPECT_TRUE(I == CSet.end());
 }
 
-// Single entry set tests
+// Single entry set tests.
 TEST(SparseSetTest, SingleEntrySet) {
   USet Set;
   Set.setUniverse(10);
@@ -63,7 +63,7 @@ TEST(SparseSetTest, SingleEntrySet) {
   EXPECT_FALSE(IP.second);
   EXPECT_TRUE(IP.first == Set.begin());
 
-  // Erase non-existant element.
+  // Erase non-existent element.
   EXPECT_FALSE(Set.erase(1));
   EXPECT_EQ(1u, Set.size());
   EXPECT_EQ(5u, *Set.begin());
@@ -76,7 +76,7 @@ TEST(SparseSetTest, SingleEntrySet) {
   EXPECT_TRUE(Set.empty());
 }
 
-// Multiple entry set tests
+// Multiple entry set tests.
 TEST(SparseSetTest, MultipleEntrySet) {
   USet Set;
   Set.setUniverse(10);
@@ -161,7 +161,7 @@ TEST(SparseSetTest, MultipleEntrySet) {
 struct Alt {
   unsigned Value;
   explicit Alt(unsigned x) : Value(x) {}
-  unsigned getSparseSetKey() const { return Value - 1000; }
+  unsigned getSparseSetIndex() const { return Value - 1000; }
 };
 
 TEST(SparseSetTest, AltStructSet) {