Skip to content

Commit 7fc9854

Browse files
author
vladlosev
committed
Simplifies test assertions in sample5.
git-svn-id: http://googletest.googlecode.com/svn/trunk@602 861a406c-534a-0410-8894-cb66d6ee9925
1 parent 8883b42 commit 7fc9854

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

samples/sample5_unittest.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,20 @@ TEST_F(IntegerFunctionTest, Factorial) {
117117
// Tests IsPrime()
118118
TEST_F(IntegerFunctionTest, IsPrime) {
119119
// Tests negative input.
120-
EXPECT_TRUE(!IsPrime(-1));
121-
EXPECT_TRUE(!IsPrime(-2));
122-
EXPECT_TRUE(!IsPrime(INT_MIN));
120+
EXPECT_FALSE(IsPrime(-1));
121+
EXPECT_FALSE(IsPrime(-2));
122+
EXPECT_FALSE(IsPrime(INT_MIN));
123123

124124
// Tests some trivial cases.
125-
EXPECT_TRUE(!IsPrime(0));
126-
EXPECT_TRUE(!IsPrime(1));
125+
EXPECT_FALSE(IsPrime(0));
126+
EXPECT_FALSE(IsPrime(1));
127127
EXPECT_TRUE(IsPrime(2));
128128
EXPECT_TRUE(IsPrime(3));
129129

130130
// Tests positive input.
131-
EXPECT_TRUE(!IsPrime(4));
131+
EXPECT_FALSE(IsPrime(4));
132132
EXPECT_TRUE(IsPrime(5));
133-
EXPECT_TRUE(!IsPrime(6));
133+
EXPECT_FALSE(IsPrime(6));
134134
EXPECT_TRUE(IsPrime(23));
135135
}
136136

0 commit comments

Comments
 (0)