mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-02-05 03:23:36 +00:00
git-subtree-dir: externals/catch git-subtree-split: ab6c7375be9a8e71ee84c6f8537113f9f47daf99
13 lines
365 B
C++
13 lines
365 B
C++
#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 );
|
|
} |