Hydrogen/unit/factorial_test.cpp
2025-06-02 15:28:10 +08:00

10 lines
222 B
C++

#include "doctest.h"
#include "factorial.hpp"
TEST_CASE("testing the factorial function") {
CHECK(factorial(1) == 1);
CHECK(factorial(2) == 2);
CHECK(factorial(3) == 6);
CHECK(factorial(10) == 3628800);
}