From c7c7961d2399de7d301f7d01451ffb10f859d1b4 Mon Sep 17 00:00:00 2001 From: vladlosev Date: Fri, 14 Oct 2011 01:18:53 +0000 Subject: [PATCH] Simplifies test assertions in sample5. --- samples/sample5_unittest.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/sample5_unittest.cc b/samples/sample5_unittest.cc index e7cab014..f63c29ee 100644 --- a/samples/sample5_unittest.cc +++ b/samples/sample5_unittest.cc @@ -117,20 +117,20 @@ TEST_F(IntegerFunctionTest, Factorial) { // Tests IsPrime() TEST_F(IntegerFunctionTest, IsPrime) { // Tests negative input. - EXPECT_TRUE(!IsPrime(-1)); - EXPECT_TRUE(!IsPrime(-2)); - EXPECT_TRUE(!IsPrime(INT_MIN)); + EXPECT_FALSE(IsPrime(-1)); + EXPECT_FALSE(IsPrime(-2)); + EXPECT_FALSE(IsPrime(INT_MIN)); // Tests some trivial cases. - EXPECT_TRUE(!IsPrime(0)); - EXPECT_TRUE(!IsPrime(1)); + EXPECT_FALSE(IsPrime(0)); + EXPECT_FALSE(IsPrime(1)); EXPECT_TRUE(IsPrime(2)); EXPECT_TRUE(IsPrime(3)); // Tests positive input. - EXPECT_TRUE(!IsPrime(4)); + EXPECT_FALSE(IsPrime(4)); EXPECT_TRUE(IsPrime(5)); - EXPECT_TRUE(!IsPrime(6)); + EXPECT_FALSE(IsPrime(6)); EXPECT_TRUE(IsPrime(23)); }