[llvm] r360969 - Fix broken test case.
Richard Trieu via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 18:17:32 PDT 2019
Author: rtrieu
Date: Thu May 16 18:17:32 2019
New Revision: 360969
URL: http://llvm.org/viewvc/llvm-project?rev=360969&view=rev
Log:
Fix broken test case.
EXPECT_EQ takes two arguments, not a single expression that evaluates to bool.
Modified:
llvm/trunk/unittests/ADT/PointerUnionTest.cpp
Modified: llvm/trunk/unittests/ADT/PointerUnionTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/PointerUnionTest.cpp?rev=360969&r1=360968&r2=360969&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/PointerUnionTest.cpp (original)
+++ llvm/trunk/unittests/ADT/PointerUnionTest.cpp Thu May 16 18:17:32 2019
@@ -87,8 +87,8 @@ TEST_F(PointerUnionTest, ManyElements) {
EXPECT_FALSE(a.is<Aligned<5>*>());
EXPECT_FALSE(a.is<Aligned<6>*>());
EXPECT_FALSE(a.is<Aligned<7>*>());
- EXPECT_EQ(a.dyn_cast<Aligned<0>*>() == &a0);
- EXPECT_EQ(*a.getAddrOfPtr1() == &a0);
+ EXPECT_EQ(a.dyn_cast<Aligned<0>*>(), &a0);
+ EXPECT_EQ(*a.getAddrOfPtr1(), &a0);
a = &a7;
EXPECT_FALSE(a.is<Aligned<0>*>());
@@ -99,7 +99,7 @@ TEST_F(PointerUnionTest, ManyElements) {
EXPECT_FALSE(a.is<Aligned<5>*>());
EXPECT_FALSE(a.is<Aligned<6>*>());
EXPECT_TRUE(a.is<Aligned<7>*>());
- EXPECT_EQ(a.dyn_cast<Aligned<7>*>() == &a7);
+ EXPECT_EQ(a.dyn_cast<Aligned<7>*>(), &a7);
EXPECT_TRUE(a == PU8(&a7));
EXPECT_TRUE(a != PU8(&a0));
More information about the llvm-commits
mailing list