Home
last modified time | relevance | path

Searched refs:Factorial (Results 1 – 24 of 24) sorted by relevance

/external/googletest/googletest/samples/
Dsample1_unittest.cc79 EXPECT_EQ(1, Factorial(-5)); in TEST()
80 EXPECT_EQ(1, Factorial(-1)); in TEST()
81 EXPECT_GT(Factorial(-10), 0); in TEST()
101 EXPECT_EQ(1, Factorial(0)); in TEST()
106 EXPECT_EQ(1, Factorial(1)); in TEST()
107 EXPECT_EQ(2, Factorial(2)); in TEST()
108 EXPECT_EQ(6, Factorial(3)); in TEST()
109 EXPECT_EQ(40320, Factorial(8)); in TEST()
Dsample5_unittest.cc97 TEST_F(IntegerFunctionTest, Factorial) { in TEST_F() argument
99 EXPECT_EQ(1, Factorial(-5)); in TEST_F()
100 EXPECT_EQ(1, Factorial(-1)); in TEST_F()
101 EXPECT_GT(Factorial(-10), 0); in TEST_F()
104 EXPECT_EQ(1, Factorial(0)); in TEST_F()
107 EXPECT_EQ(1, Factorial(1)); in TEST_F()
108 EXPECT_EQ(2, Factorial(2)); in TEST_F()
109 EXPECT_EQ(6, Factorial(3)); in TEST_F()
110 EXPECT_EQ(40320, Factorial(8)); in TEST_F()
Dsample1.h36 int Factorial(int n);
Dsample1.cc35 int Factorial(int n) { in Factorial() function
/external/google-breakpad/src/testing/gtest/samples/
Dsample1_unittest.cc82 EXPECT_EQ(1, Factorial(-5)); in TEST()
83 EXPECT_EQ(1, Factorial(-1)); in TEST()
84 EXPECT_GT(Factorial(-10), 0); in TEST()
104 EXPECT_EQ(1, Factorial(0)); in TEST()
109 EXPECT_EQ(1, Factorial(1)); in TEST()
110 EXPECT_EQ(2, Factorial(2)); in TEST()
111 EXPECT_EQ(6, Factorial(3)); in TEST()
112 EXPECT_EQ(40320, Factorial(8)); in TEST()
Dsample5_unittest.cc100 TEST_F(IntegerFunctionTest, Factorial) { in TEST_F() argument
102 EXPECT_EQ(1, Factorial(-5)); in TEST_F()
103 EXPECT_EQ(1, Factorial(-1)); in TEST_F()
104 EXPECT_GT(Factorial(-10), 0); in TEST_F()
107 EXPECT_EQ(1, Factorial(0)); in TEST_F()
110 EXPECT_EQ(1, Factorial(1)); in TEST_F()
111 EXPECT_EQ(2, Factorial(2)); in TEST_F()
112 EXPECT_EQ(6, Factorial(3)); in TEST_F()
113 EXPECT_EQ(40320, Factorial(8)); in TEST_F()
Dsample1.h38 int Factorial(int n);
Dsample1.cc37 int Factorial(int n) { in Factorial() function
/external/catch2/.conan/test_package/
Dtest_package.cpp5 int Factorial( int number ) { in Factorial() function
6 return number <= 1 ? 1 : Factorial( number - 1 ) * number; in Factorial()
10 REQUIRE( Factorial(0) == 1 );
11 REQUIRE( Factorial(1) == 1 );
12 REQUIRE( Factorial(2) == 2 );
13 REQUIRE( Factorial(3) == 6 );
14 REQUIRE( Factorial(10) == 3628800 );
/external/catch2/examples/
D020-TestCase-2.cpp7 int Factorial( int number ) { in Factorial() function
8 return number <= 1 ? number : Factorial( number - 1 ) * number; // fail in Factorial()
13 REQUIRE( Factorial(0) == 1 );
17 REQUIRE( Factorial(1) == 1 );
18 REQUIRE( Factorial(2) == 2 );
19 REQUIRE( Factorial(3) == 6 );
20 REQUIRE( Factorial(10) == 3628800 );
D010-TestCase.cpp8 int Factorial( int number ) { in Factorial() function
9 return number <= 1 ? number : Factorial( number - 1 ) * number; // fail in Factorial()
14 REQUIRE( Factorial(0) == 1 );
18 REQUIRE( Factorial(1) == 1 );
19 REQUIRE( Factorial(2) == 2 );
20 REQUIRE( Factorial(3) == 6 );
21 REQUIRE( Factorial(10) == 3628800 );
/external/catch2/projects/SelfTest/UsageTests/
DMisc.tests.cpp43 inline unsigned int Factorial( unsigned int number ) { in Factorial() function
44 return number > 1 ? Factorial(number-1)*number : 1; in Factorial()
204 REQUIRE( Factorial(0) == 1 );
205 REQUIRE( Factorial(1) == 1 );
206 REQUIRE( Factorial(2) == 2 );
207 REQUIRE( Factorial(3) == 6 );
208 REQUIRE( Factorial(10) == 3628800 );
/external/catch2/docs/
Dslow-compiles.md28 Assume you have the `Factorial` function from the [tutorial](tutorial.md#top) in `factorial.cpp` (w…
43 REQUIRE( Factorial(1) == 1 );
44 REQUIRE( Factorial(2) == 2 );
45 REQUIRE( Factorial(3) == 6 );
46 REQUIRE( Factorial(10) == 3628800 );
58 Now, the next time we change the file `tests-factorial.cpp` (say we add `REQUIRE( Factorial(0) == 1…
62 tests-factorial.cpp:11: failed: Factorial(0) == 1 for: 0 == 1
Dtutorial.md38 unsigned int Factorial( unsigned int number ) {
39 return number <= 1 ? number : Factorial(number-1)*number;
49 unsigned int Factorial( unsigned int number ) {
50 return number <= 1 ? number : Factorial(number-1)*number;
54 REQUIRE( Factorial(1) == 1 );
55 REQUIRE( Factorial(2) == 2 );
56 REQUIRE( Factorial(3) == 6 );
57 REQUIRE( Factorial(10) == 3628800 );
73 REQUIRE( Factorial(0) == 1 );
74 REQUIRE( Factorial(1) == 1 );
[all …]
/external/libcxx/utils/google-benchmark/test/
Dbenchmark_test.cc29 int BENCHMARK_NOINLINE Factorial(uint32_t n) { in Factorial() function
30 return (n == 1) ? 1 : n * Factorial(n - 1); in Factorial()
56 for (auto _ : state) fac_42 = Factorial(8); in BM_Factorial()
/external/google-benchmark/test/
Dbenchmark_test.cc29 int BENCHMARK_NOINLINE Factorial(uint32_t n) { in Factorial() function
30 return (n == 1) ? 1 : n * Factorial(n - 1); in Factorial()
56 for (auto _ : state) fac_42 = Factorial(8); in BM_Factorial()
/external/markdown/tests/misc/
Darabic.txt17 مثال لاستخراج المضروب Factorial :
Dbidi.txt41 مثال لاستخراج المضروب Factorial :
/external/googletest/googletest/docs/
Dprimer.md268 int Factorial(int n); // Returns the factorial of n
276 EXPECT_EQ(Factorial(0), 1);
281 EXPECT_EQ(Factorial(1), 1);
282 EXPECT_EQ(Factorial(2), 2);
283 EXPECT_EQ(Factorial(3), 6);
284 EXPECT_EQ(Factorial(8), 40320);
/external/python/cpython2/Demo/comparisons/
DREADME14 0) Factorial Test (numerics and function calls)
/external/catch2/projects/SelfTest/Baselines/
Dcompact.sw.approved.txt354 Misc.tests.cpp:<line number>: passed: Factorial(0) == 1 for: 1 == 1
355 Misc.tests.cpp:<line number>: passed: Factorial(1) == 1 for: 1 == 1
356 Misc.tests.cpp:<line number>: passed: Factorial(2) == 2 for: 2 == 2
357 Misc.tests.cpp:<line number>: passed: Factorial(3) == 6 for: 6 == 6
358 Misc.tests.cpp:<line number>: passed: Factorial(10) == 3628800 for: 3628800 (0x<hex digits>) == 362…
Dconsole.sw.approved.txt2585 REQUIRE( Factorial(0) == 1 )
2590 REQUIRE( Factorial(1) == 1 )
2595 REQUIRE( Factorial(2) == 2 )
2600 REQUIRE( Factorial(3) == 6 )
2605 REQUIRE( Factorial(10) == 3628800 )
/external/python/cpython2/Doc/whatsnew/
D2.6.rst610 print 'Factorial', N, '=', result
/external/python/cpython3/Doc/whatsnew/
D2.6.rst614 print 'Factorial', N, '=', result