Home | History | Annotate | Download | only in samples

Lines Matching refs:Factorial

99 // Tests Factorial()
100 TEST_F(IntegerFunctionTest, Factorial) {
101 // Tests factorial of negative numbers.
102 EXPECT_EQ(1, Factorial(-5));
103 EXPECT_EQ(1, Factorial(-1));
104 EXPECT_TRUE(Factorial(-10) > 0);
106 // Tests factorial of 0.
107 EXPECT_EQ(1, Factorial(0));
109 // Tests factorial of positive numbers.
110 EXPECT_EQ(1, Factorial(1));
111 EXPECT_EQ(2, Factorial(2));
112 EXPECT_EQ(6, Factorial(3));
113 EXPECT_EQ(40320, Factorial(8));