[llvm] r261514 - Use EXPECT_EQ in the unittests instead of plain assert
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 21 23:20:40 PST 2016
Author: grosser
Date: Mon Feb 22 01:20:40 2016
New Revision: 261514
URL: http://llvm.org/viewvc/llvm-project?rev=261514&view=rev
Log:
Use EXPECT_EQ in the unittests instead of plain assert
This addresses post-review comments from Duncan P. N. Exon Smith to r261485.
Modified:
llvm/trunk/unittests/Analysis/ScalarEvolutionTest.cpp
Modified: llvm/trunk/unittests/Analysis/ScalarEvolutionTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/ScalarEvolutionTest.cpp?rev=261514&r1=261513&r2=261514&view=diff
==============================================================================
--- llvm/trunk/unittests/Analysis/ScalarEvolutionTest.cpp (original)
+++ llvm/trunk/unittests/Analysis/ScalarEvolutionTest.cpp Mon Feb 22 01:20:40 2016
@@ -255,12 +255,13 @@ TEST_F(ScalarEvolutionsTest, SimplifiedP
ScalarEvolution SE = buildSE(*F);
auto *S1 = SE.getSCEV(PN);
auto *S2 = SE.getSCEV(PN);
- assert(isa<SCEVConstant>(S1) && "Expected a SCEV Constant");
+ auto *ZeroConst = SE.getConstant(Ty, 0);
// At some point, only the first call to getSCEV returned the simplified
// SCEVConstant and later calls just returned a SCEVUnknown referencing the
// PHI node.
- assert(S1 == S2 && "Expected identical SCEV values");
+ EXPECT_EQ(S1, ZeroConst);
+ EXPECT_EQ(S1, S2);
}
} // end anonymous namespace
More information about the llvm-commits
mailing list