Fix EXPECT_* to not produce a compile warning.
authorEli Bendersky <eliben@google.com>
Fri, 7 Mar 2014 21:04:24 +0000 (21:04 +0000)
committerEli Bendersky <eliben@google.com>
Fri, 7 Mar 2014 21:04:24 +0000 (21:04 +0000)
EXPECT_TRUE/FALSE is also more idiomatic for booleans than EXPECT_EQ

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203284 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ADT/PointerIntPairTest.cpp

index 3da31e7..3c472b2 100644 (file)
@@ -61,11 +61,11 @@ TEST_F(PointerIntPairTest, ManyUnusedBits) {
 
   PointerIntPair<Fixnum31, 1, bool, FixnumPointerTraits> pair;
   EXPECT_EQ((uintptr_t)0, pair.getPointer().Value);
-  EXPECT_EQ(false, pair.getInt());
+  EXPECT_FALSE(pair.getInt());
 
   pair.setPointerAndInt({ 0x7FFFFFFF }, true );
   EXPECT_EQ((uintptr_t)0x7FFFFFFF, pair.getPointer().Value);
-  EXPECT_EQ(true, pair.getInt());
+  EXPECT_TRUE(pair.getInt());
 
   EXPECT_EQ(FixnumPointerTraits::NumLowBitsAvailable - 1,
             PointerLikeTypeTraits<decltype(pair)>::NumLowBitsAvailable);