Initial commit

This commit is contained in:
2024-01-07 23:47:03 +01:00
parent 5cccac4dca
commit 4d7e1fbd98
1665 changed files with 369709 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
#include <catch2/catch_test_macros.hpp>
int Factorial( int number ) {
return number <= 1 ? 1 : Factorial( number - 1 ) * number;
}
TEST_CASE( "Factorial Tests", "[single-file]" ) {
REQUIRE( Factorial(0) == 1 );
REQUIRE( Factorial(1) == 1 );
REQUIRE( Factorial(2) == 2 );
REQUIRE( Factorial(3) == 6 );
REQUIRE( Factorial(10) == 3628800 );
}