From 946ca0a946b6793c31951427b564447e4b666c9b Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Mon, 22 Feb 2016 07:20:40 +0000 Subject: [PATCH] Use EXPECT_EQ in the unittests instead of plain assert This addresses post-review comments from Duncan P. N. Exon Smith to r261485. llvm-svn: 261514 --- llvm/unittests/Analysis/ScalarEvolutionTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/unittests/Analysis/ScalarEvolutionTest.cpp b/llvm/unittests/Analysis/ScalarEvolutionTest.cpp index 4089e5dce56e..c4cd74f01c72 100644 --- a/llvm/unittests/Analysis/ScalarEvolutionTest.cpp +++ b/llvm/unittests/Analysis/ScalarEvolutionTest.cpp @@ -255,12 +255,13 @@ TEST_F(ScalarEvolutionsTest, SimplifiedPHI) { ScalarEvolution SE = buildSE(*F); auto *S1 = SE.getSCEV(PN); auto *S2 = SE.getSCEV(PN); - assert(isa(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