Closed fox1987 closed 7 years ago
That is some ancient version, 3.4 series was released in 2004 and https://github.com/philsquared/Catch/wiki/What-compilers-does-CATCH-work-with lists 4.2 the lowest (it doesn't list any unsupported versions though), I would suggest you update your compiler.
GCC 3.4 is positively ancient and not supported.
when I try the example. I got compile errors.
define CATCH_CONFIG_MAIN
include "catch.hpp"
unsigned int Factorial(unsigned int number) { return number <= 1 ? number : Factorial(number - 1) * number; }
TEST_CASE("Factorials are computed", "[factorial]") { REQUIRE( (unsigned int)Factorial(1) == (int)1 ); }
catch.hpp:1817: instantiated from `Catch::ResultBuilder& Catch::ExpressionLhs::operator==(const RhsT&) [with RhsT = int, T = const unsigned int&]'
catch_test.cpp:24: instantiated from here
catch/catch.hpp:1873: error: call of overloaded `compare(const unsigned int&, const int&)' is ambiguous catch/catch.hpp:1380: note: candidates are: bool Catch::Internal::compare(const T1&, const T2&) [with Catch::Internal::Operator Op = IsEqualTo, T1 = unsigned int, T2 = int] catch/catch.hpp:1385: note: bool Catch::Internal::compare(unsigned int, int) [with Catch::Internal::Operator Op = IsEqualTo] catch/catch.hpp:1388: note: bool Catch::Internal::compare(long unsigned int, int) [with Catch::Internal::Operator Op = IsEqualTo] catch/catch.hpp:1391: note: bool Catch::Internal::compare(unsigned char, int) [with Catch::Internal::Operator Op = IsEqualTo] catch/catch.hpp:1396: note: bool Catch::Internal::compare(unsigned int, long int) [with Catch::Internal::Operator Op = IsEqualTo] catch/catch.hpp:1399: note: bool Catch::Internal::compare(long unsigned int, long int) [with Catch::Internal::Operator Op = IsEqualTo] catch/catch.hpp:1402: note: bool Catch::Internal::compare(unsigned char, long int) [with Catch::Internal::Operator Op = IsEqualTo] catch/catch.hpp:1407: note: bool Catch::Internal::compare(int, unsigned int) [with Catch::Internal::Operator Op = IsEqualTo] catch/catch.hpp:1410: note: bool Catch::Internal::compare(int, long unsigned int) [with Catch::Internal::Operator Op = IsEqualTo] catch/catch.hpp:1413: note: bool Catch::Internal::compare(int, unsigned char) [with Catch::Internal::Operator Op = IsEqualTo] catch/catch.hpp:1418: note: bool Catch::Internal::compare(long int, unsigned int) [with Catch::Internal::Operator Op = IsEqualTo] catch/catch.hpp:1421: note: bool Catch::Internal::compare(long int, long unsigned int) [with Catch::Internal::Operator Op = IsEqualTo] catch/catch.hpp:1424: note: bool Catch::Internal::compare(long int, unsigned char) [with Catch::Internal::Operator Op = IsEqualTo] scons: *\ [catch_test.o] Error 1 scons: building terminated because of errors
and my g++ (GCC) version is 3.4.5