[llvm] r203284 - Fix EXPECT_* to not produce a compile warning.
Eli Bendersky
eliben at google.com
Fri Mar 7 13:04:24 PST 2014
Author: eliben
Date: Fri Mar 7 15:04:24 2014
New Revision: 203284
URL: http://llvm.org/viewvc/llvm-project?rev=203284&view=rev
Log:
Fix EXPECT_* to not produce a compile warning.
EXPECT_TRUE/FALSE is also more idiomatic for booleans than EXPECT_EQ
Modified:
llvm/trunk/unittests/ADT/PointerIntPairTest.cpp
Modified: llvm/trunk/unittests/ADT/PointerIntPairTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/PointerIntPairTest.cpp?rev=203284&r1=203283&r2=203284&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/PointerIntPairTest.cpp (original)
+++ llvm/trunk/unittests/ADT/PointerIntPairTest.cpp Fri Mar 7 15:04:24 2014
@@ -61,11 +61,11 @@ TEST_F(PointerIntPairTest, ManyUnusedBit
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);
More information about the llvm-commits
mailing list