summaryrefslogtreecommitdiff
path: root/tests/tests.cc
blob: 8a23c4defeb5f7b0391697aef7d404bb16f45079 (plain)
1
2
3
4
5
6
7
8
9
10
11
#define CATCH_CONFIG_MAIN
#include "fact.h"
#include<catch2/catch_test_macros.hpp>

TEST_CASE( "factorials are computed", "[factorial]")
{
    REQUIRE( factorial(1) == 1 );
    REQUIRE( factorial(2) == 2 );
    REQUIRE( factorial(3) == 6 );
    REQUIRE( factorial(10) == 3628800 );
}