Go to the source code of this file.
|
int | Factorial (int number) |
|
| TEST_CASE ("Factorial of 0 is 1 (fail)", "[single-file]") |
|
| TEST_CASE ("Factorials of 1 and higher are computed (pass)", "[single-file]") |
|
◆ CATCH_CONFIG_MAIN
#define CATCH_CONFIG_MAIN |
◆ Factorial()
int Factorial |
( |
int | number | ) |
|
Definition at line 8 of file 010-TestCase.cpp.
8 {
9 return number <= 1 ? number :
Factorial( number - 1 ) * number;
10
11}
int Factorial(int number)
◆ TEST_CASE() [1/2]
TEST_CASE |
( |
"Factorial of 0 is 1 (fail)" | , |
|
|
"" | [single-file] ) |
◆ TEST_CASE() [2/2]
TEST_CASE |
( |
"Factorials of 1 and higher are computed (pass)" | , |
|
|
"" | [single-file] ) |