| 13 | #include <catch2/catch_test_macros.hpp> |
| 14 | |
| 15 | static int Factorial( int number ) { |
| 16 | return number <= 1 ? number : Factorial( number - 1 ) * number; // fail |
| 17 | // return number <= 1 ? 1 : Factorial( number - 1 ) * number; // pass |
| 18 | } |
| 19 | |
| 20 | TEST_CASE( "2: Factorial of 0 is 1 (fail)", "[multi-file:2]" ) { |
| 21 | REQUIRE( Factorial(0) == 1 ); |