Fix error: ISO C++ forbids in-class initialization of non-const static member 'm_started'
[catch.git] / test_package / MainTest.cpp
blobb8ed744e5974746a7f9f55df7f2c8dd8df23df8f
1 /*
2 * Created by Phil on 22/10/2010.
3 * Copyright 2010 Two Blue Cubes Ltd
5 * Distributed under the Boost Software License, Version 1.0. (See accompanying
6 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 */
8 #define CATCH_CONFIG_MAIN
9 #include "catch.hpp"
11 unsigned int Factorial( unsigned int number ) {
12 return number > 1 ? Factorial(number-1)*number : 1;
15 TEST_CASE( "Factorials are computed", "[factorial]" ) {
16 REQUIRE( Factorial(0) == 1 );
17 REQUIRE( Factorial(1) == 1 );
18 REQUIRE( Factorial(2) == 2 );
19 REQUIRE( Factorial(3) == 6 );
20 REQUIRE( Factorial(10) == 3628800 );