diff --git a/llvm/unittests/ADT/CoalescingBitVectorTest.cpp b/llvm/unittests/ADT/CoalescingBitVectorTest.cpp index 9dfb32aecff7..02a5bde2bfac 100644 --- a/llvm/unittests/ADT/CoalescingBitVectorTest.cpp +++ b/llvm/unittests/ADT/CoalescingBitVectorTest.cpp @@ -94,25 +94,23 @@ TEST(CoalescingBitVectorTest, Iterators) { BV.set({0, 1, 2}); -#if 0 auto It = BV.begin(); - EXPECT_EQ(It, BV.begin()); + EXPECT_TRUE(It == BV.begin()); EXPECT_EQ(*It, 0u); ++It; EXPECT_EQ(*It, 1u); ++It; EXPECT_EQ(*It, 2u); ++It; - EXPECT_EQ(It, BV.end()); - EXPECT_EQ(BV.end(), BV.end()); + EXPECT_TRUE(It == BV.end()); + EXPECT_TRUE(BV.end() == BV.end()); It = BV.begin(); - EXPECT_EQ(It, BV.begin()); + EXPECT_TRUE(It == BV.begin()); auto ItCopy = It++; - EXPECT_EQ(ItCopy, BV.begin()); + EXPECT_TRUE(ItCopy == BV.begin()); EXPECT_EQ(*ItCopy, 0u); EXPECT_EQ(*It, 1u); -#endif EXPECT_TRUE(elementsMatch(BV, {0, 1, 2})); @@ -132,13 +130,11 @@ TEST(CoalescingBitVectorTest, Iterators) { BV.set({1000, 1001, 1002}); EXPECT_TRUE(elementsMatch(BV, {0, 1, 2, 4, 5, 6, 10, 1000, 1001, 1002})); -#if 0 auto It1 = BV.begin(); - EXPECT_EQ(It1, BV.begin()); - EXPECT_EQ(++It1, ++BV.begin()); - EXPECT_NE(It1, BV.begin()); - EXPECT_NE(It1, BV.end()); -#endif + EXPECT_TRUE(It1 == BV.begin()); + EXPECT_TRUE(++It1 == ++BV.begin()); + EXPECT_TRUE(It1 != BV.begin()); + EXPECT_TRUE(It1 != BV.end()); } TEST(CoalescingBitVectorTest, Reset) { @@ -449,7 +445,7 @@ TEST(CoalescingBitVectorTest, FindLowerBound) { U64BitVec BV(Alloc); uint64_t BigNum1 = uint64_t(1) << 32; uint64_t BigNum2 = (uint64_t(1) << 33) + 1; - EXPECT_EQ(BV.find(BigNum1), BV.end()); + EXPECT_TRUE(BV.find(BigNum1) == BV.end()); BV.set(BigNum1); auto Find1 = BV.find(BigNum1); EXPECT_EQ(*Find1, BigNum1);