diff options
Diffstat (limited to 'tests/tests.cc')
-rw-r--r-- | tests/tests.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/tests.cc b/tests/tests.cc new file mode 100644 index 0000000..d866172 --- /dev/null +++ b/tests/tests.cc @@ -0,0 +1,11 @@ +#define CATCH_CONFIG_MAIN +#include "catch2/catch.hpp" +#include "fact.h" + +TEST_CASE( "factorials are computed", "[factorial]") +{ + REQUIRE( factorial(1) == 1 ); + REQUIRE( factorial(2) == 2 ); + REQUIRE( factorial(3) == 6 ); + REQUIRE( factorial(10) == 3628800 ); +} |