catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Update baselines
- Commit
07ef028483dca3afad353655a3341be95bfd70be- Author
- Martin Hořeňovský ·
- Parents
47eb9b3d68f3
Changes
.../SelfTest/Baselines/console.std.approved.txt | 68 +- .../SelfTest/Baselines/console.sw.approved.txt | 1628 +++---------------- .../SelfTest/Baselines/console.swa4.approved.txt | 2 +- projects/SelfTest/Baselines/junit.sw.approved.txt | 39 +- projects/SelfTest/Baselines/xml.sw.approved.txt | 1644 ++++---------------- 5 files changed, 590 insertions(+), 2791 deletions(-) diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index c35d3bd1..c7b1b566 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -274,6 +274,55 @@ MatchersTests.cpp:<line number>: FAILED: with expansion: "this string contains 'abc' as a substring" equals: "something else" +------------------------------------------------------------------------------- +Exception matchers that fail + No exception +------------------------------------------------------------------------------- +MatchersTests.cpp:<line number> +............................................................................... + +MatchersTests.cpp:<line number>: FAILED: + CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 } ) +because no exception was thrown where one was expected: + +MatchersTests.cpp:<line number>: FAILED: + REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 } ) +because no exception was thrown where one was expected: + +------------------------------------------------------------------------------- +Exception matchers that fail + Type mismatch +------------------------------------------------------------------------------- +MatchersTests.cpp:<line number> +............................................................................... + +MatchersTests.cpp:<line number>: FAILED: + CHECK_THROWS_MATCHES( throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 } ) +due to unexpected exception with message: + Unknown exception + +MatchersTests.cpp:<line number>: FAILED: + REQUIRE_THROWS_MATCHES( throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 } ) +due to unexpected exception with message: + Unknown exception + +------------------------------------------------------------------------------- +Exception matchers that fail + Contents are wrong +------------------------------------------------------------------------------- +MatchersTests.cpp:<line number> +............................................................................... + +MatchersTests.cpp:<line number>: FAILED: + CHECK_THROWS_MATCHES( throws(3), SpecialException const&, ExceptionMatcher{ 1 } ) +with expansion: + {?} special exception has value of 1 + +MatchersTests.cpp:<line number>: FAILED: + REQUIRE_THROWS_MATCHES( throws(4), SpecialException const&, ExceptionMatcher{ 1 } ) +with expansion: + {?} special exception has value of 1 + ------------------------------------------------------------------------------- Expected exceptions that don't throw or unexpected exceptions fail the test ------------------------------------------------------------------------------- @@ -368,7 +417,9 @@ MessageTests.cpp:<line number>: FAILED: CHECK( a == 0 ) with expansion: 2 == 0 -with message: +with messages: + this message may be logged later + this message should be logged and this, but later ------------------------------------------------------------------------------- @@ -593,6 +644,17 @@ MessageTests.cpp:<line number>: warning: toString(p): 0x<hex digits> +------------------------------------------------------------------------------- +Reconstruction should be based on stringification: #914 +------------------------------------------------------------------------------- +DecompositionTests.cpp:<line number> +............................................................................... + +DecompositionTests.cpp:<line number>: FAILED: + CHECK( truthy(false) ) +with expansion: + Hey, its truthy! + ------------------------------------------------------------------------------- SCOPED_INFO is reset for each loop ------------------------------------------------------------------------------- @@ -940,6 +1002,6 @@ with expansion: "first" == "second" =============================================================================== -test cases: 170 | 122 passed | 44 failed | 4 failed as expected -assertions: 980 | 872 passed | 87 failed | 21 failed as expected +test cases: 171 | 121 passed | 46 failed | 4 failed as expected +assertions: 843 | 728 passed | 94 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index 3b88aaa9..f70bda98 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -119,7 +119,7 @@ with expansion: MiscTests.cpp:<line number>: PASSED: - REQUIRE( (*__error()) == 1 ) + REQUIRE( errno == 1 ) with expansion: 1 == 1 @@ -901,7 +901,7 @@ TrickyTests.cpp:<line number>: PASSED: REQUIRE( a ) with expansion: - true + 0x<hex digits> TrickyTests.cpp:<line number>: PASSED: @@ -1159,1572 +1159,319 @@ with expansion: ConditionTests.cpp:<line number>: FAILED: CHECK( data.float_nine_point_one == Approx( 9.0f ) ) with expansion: - 9.1f == Approx( 9.0 ) - -ConditionTests.cpp:<line number>: FAILED: - CHECK( data.float_nine_point_one == Approx( 1 ) ) -with expansion: - 9.1f == Approx( 1.0 ) - -ConditionTests.cpp:<line number>: FAILED: - CHECK( data.float_nine_point_one == Approx( 0 ) ) -with expansion: - 9.1f == Approx( 0.0 ) - -ConditionTests.cpp:<line number>: FAILED: - CHECK( data.double_pi == Approx( 3.1415 ) ) -with expansion: - 3.1415926535 == Approx( 3.1415 ) - -ConditionTests.cpp:<line number>: FAILED: - CHECK( data.str_hello == "goodbye" ) -with expansion: - "hello" == "goodbye" - -ConditionTests.cpp:<line number>: FAILED: - CHECK( data.str_hello == "hell" ) -with expansion: - "hello" == "hell" - -ConditionTests.cpp:<line number>: FAILED: - CHECK( data.str_hello == "hello1" ) -with expansion: - "hello" == "hello1" - -ConditionTests.cpp:<line number>: FAILED: - CHECK( data.str_hello.size() == 6 ) -with expansion: - 5 == 6 - -ConditionTests.cpp:<line number>: FAILED: - CHECK( x == Approx( 1.301 ) ) -with expansion: - 1.3 == Approx( 1.301 ) - -------------------------------------------------------------------------------- -Equality checks that should succeed -------------------------------------------------------------------------------- -ConditionTests.cpp:<line number> -............................................................................... - -ConditionTests.cpp:<line number>: -PASSED: - REQUIRE( data.int_seven == 7 ) -with expansion: - 7 == 7 - -ConditionTests.cpp:<line number>: -PASSED: - REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ) -with expansion: - 9.1f == Approx( 9.1000003815 ) - -ConditionTests.cpp:<line number>: -PASSED: - REQUIRE( data.double_pi == Approx( 3.1415926535 ) ) -with expansion: - 3.1415926535 == Approx( 3.1415926535 ) - -ConditionTests.cpp:<line number>: -PASSED: - REQUIRE( data.str_hello == "hello" ) -with expansion: - "hello" == "hello" - -ConditionTests.cpp:<line number>: -PASSED: - REQUIRE( "hello" == data.str_hello ) -with expansion: - "hello" == "hello" - -ConditionTests.cpp:<line number>: -PASSED: - REQUIRE( data.str_hello.size() == 5 ) -with expansion: - 5 == 5 - -ConditionTests.cpp:<line number>: -PASSED: - REQUIRE( x == Approx( 1.3 ) ) -with expansion: - 1.3 == Approx( 1.3 ) - -------------------------------------------------------------------------------- -Equals -------------------------------------------------------------------------------- -MatchersTests.cpp:<line number> -............................................................................... - -MatchersTests.cpp:<line number>: -PASSED: - CHECK_THAT( testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) ) -with expansion: - "this string contains 'abc' as a substring" equals: "this string contains - 'abc' as a substring" - -------------------------------------------------------------------------------- -Equals string matcher -------------------------------------------------------------------------------- -MatchersTests.cpp:<line number> -............................................................................... - -MatchersTests.cpp:<line number>: FAILED: - CHECK_THAT( testStringForMatching(), Equals( "something else" ) ) -with expansion: - "this string contains 'abc' as a substring" equals: "something else" - -------------------------------------------------------------------------------- -Exception messages can be tested for - exact match -------------------------------------------------------------------------------- -ExceptionTests.cpp:<line number> -............................................................................... - -ExceptionTests.cpp:<line number>: -PASSED: - REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) - -------------------------------------------------------------------------------- -Exception messages can be tested for - different case -------------------------------------------------------------------------------- -ExceptionTests.cpp:<line number> -............................................................................... - -ExceptionTests.cpp:<line number>: -PASSED: - REQUIRE_THROWS_WITH( thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) ) - -------------------------------------------------------------------------------- -Exception messages can be tested for - wildcarded -------------------------------------------------------------------------------- -ExceptionTests.cpp:<line number> -............................................................................... - -ExceptionTests.cpp:<line number>: -PASSED: - REQUIRE_THROWS_WITH( thisThrows(), StartsWith( "expected" ) ) - -ExceptionTests.cpp:<line number>: -PASSED: - REQUIRE_THROWS_WITH( thisThrows(), EndsWith( "exception" ) ) - -ExceptionTests.cpp:<line number>: -PASSED: - REQUIRE_THROWS_WITH( thisThrows(), Contains( "except" ) ) - -ExceptionTests.cpp:<line number>: -PASSED: - REQUIRE_THROWS_WITH( thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) ) - -------------------------------------------------------------------------------- -Expected exceptions that don't throw or unexpected exceptions fail the test -------------------------------------------------------------------------------- -ExceptionTests.cpp:<line number> -............................................................................... - -ExceptionTests.cpp:<line number>: FAILED: - CHECK_THROWS_AS( thisThrows(), std::string ) -due to unexpected exception with message: - expected exception - -ExceptionTests.cpp:<line number>: FAILED: - CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) -because no exception was thrown where one was expected: - -ExceptionTests.cpp:<line number>: FAILED: - CHECK_NOTHROW( thisThrows() ) -due to unexpected exception with message: - expected exception - -------------------------------------------------------------------------------- -FAIL aborts the test -------------------------------------------------------------------------------- -MessageTests.cpp:<line number> -............................................................................... - -MessageTests.cpp:<line number>: FAILED: -explicitly with message: - This is a failure - -------------------------------------------------------------------------------- -FAIL does not require an argument -------------------------------------------------------------------------------- -MessageTests.cpp:<line number> -............................................................................... - -MessageTests.cpp:<line number>: FAILED: - -------------------------------------------------------------------------------- -FAIL_CHECK does not abort the test -------------------------------------------------------------------------------- -MessageTests.cpp:<line number> -............................................................................... - -MessageTests.cpp:<line number>: FAILED: -explicitly with message: - This is a failure - -MessageTests.cpp:<line number>: -warning: - This message appears in the output - -------------------------------------------------------------------------------- -Factorials are computed -------------------------------------------------------------------------------- -MiscTests.cpp:<line number> -............................................................................... - -MiscTests.cpp:<line number>: -PASSED: - REQUIRE( Factorial(0) == 1 ) -with expansion: - 1 == 1 - -MiscTests.cpp:<line number>: -PASSED: - REQUIRE( Factorial(1) == 1 ) -with expansion: - 1 == 1 - -MiscTests.cpp:<line number>: -PASSED: - REQUIRE( Factorial(2) == 2 ) -with expansion: - 2 == 2 - -MiscTests.cpp:<line number>: -PASSED: - REQUIRE( Factorial(3) == 6 ) -with expansion: - 6 == 6 - -MiscTests.cpp:<line number>: -PASSED: - REQUIRE( Factorial(10) == 3628800 ) -with expansion: - 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) - -------------------------------------------------------------------------------- -Generator over a range of pairs -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( i->first == i->second-1 ) -with expansion: - 0 == 0 - -------------------------------------------------------------------------------- -Generator over a range of pairs -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( i->first == i->second-1 ) -with expansion: - 2 == 2 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... + 9.1f == Approx( 9.0 ) -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +ConditionTests.cpp:<line number>: FAILED: + CHECK( data.float_nine_point_one == Approx( 1 ) ) with expansion: - 30 == 30 + 9.1f == Approx( 1.0 ) -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +ConditionTests.cpp:<line number>: FAILED: + CHECK( data.float_nine_point_one == Approx( 0 ) ) with expansion: - 210 == 210 + 9.1f == Approx( 0.0 ) -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... +ConditionTests.cpp:<line number>: FAILED: + CHECK( data.double_pi == Approx( 3.1415 ) ) +with expansion: + 3.1415926535 == Approx( 3.1415 ) -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +ConditionTests.cpp:<line number>: FAILED: + CHECK( data.str_hello == "goodbye" ) with expansion: - 40 == 40 + "hello" == "goodbye" -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +ConditionTests.cpp:<line number>: FAILED: + CHECK( data.str_hello == "hell" ) with expansion: - 210 == 210 + "hello" == "hell" -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... +ConditionTests.cpp:<line number>: FAILED: + CHECK( data.str_hello == "hello1" ) +with expansion: + "hello" == "hello1" -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +ConditionTests.cpp:<line number>: FAILED: + CHECK( data.str_hello.size() == 6 ) with expansion: - 42 == 42 + 5 == 6 -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +ConditionTests.cpp:<line number>: FAILED: + CHECK( x == Approx( 1.301 ) ) with expansion: - 210 == 210 + 1.3 == Approx( 1.301 ) ------------------------------------------------------------------------------- -Generators over two ranges +Equality checks that should succeed ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +ConditionTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: +ConditionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) + REQUIRE( data.int_seven == 7 ) with expansion: - 72 == 72 + 7 == 7 -GeneratorTests.cpp:<line number>: +ConditionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) + REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ) with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... + 9.1f == Approx( 9.1000003815 ) -GeneratorTests.cpp:<line number>: +ConditionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) + REQUIRE( data.double_pi == Approx( 3.1415926535 ) ) with expansion: - 2 == 2 + 3.1415926535 == Approx( 3.1415926535 ) -GeneratorTests.cpp:<line number>: +ConditionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) + REQUIRE( data.str_hello == "hello" ) with expansion: - 212 == 212 + "hello" == "hello" -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... +ConditionTests.cpp:<line number>: +PASSED: + REQUIRE( "hello" == data.str_hello ) +with expansion: + "hello" == "hello" -GeneratorTests.cpp:<line number>: +ConditionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) + REQUIRE( data.str_hello.size() == 5 ) with expansion: - 4 == 4 + 5 == 5 -GeneratorTests.cpp:<line number>: +ConditionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) + REQUIRE( x == Approx( 1.3 ) ) with expansion: - 212 == 212 + 1.3 == Approx( 1.3 ) ------------------------------------------------------------------------------- -Generators over two ranges +Equals ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +MatchersTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:<line number>: +MatchersTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) ) with expansion: - 212 == 212 + "this string contains 'abc' as a substring" equals: "this string contains + 'abc' as a substring" ------------------------------------------------------------------------------- -Generators over two ranges +Equals string matcher ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +MatchersTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +MatchersTests.cpp:<line number>: FAILED: + CHECK_THAT( testStringForMatching(), Equals( "something else" ) ) with expansion: - 212 == 212 + "this string contains 'abc' as a substring" equals: "something else" ------------------------------------------------------------------------------- -Generators over two ranges +Exception matchers that fail + No exception ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +MatchersTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 +MatchersTests.cpp:<line number>: FAILED: + CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 } ) +because no exception was thrown where one was expected: -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 +MatchersTests.cpp:<line number>: FAILED: + REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 } ) +because no exception was thrown where one was expected: ------------------------------------------------------------------------------- -Generators over two ranges +Exception matchers that fail + Type mismatch ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +MatchersTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 +MatchersTests.cpp:<line number>: FAILED: + CHECK_THROWS_MATCHES( throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 } ) +due to unexpected exception with message: + Unknown exception -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 +MatchersTests.cpp:<line number>: FAILED: + REQUIRE_THROWS_MATCHES( throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 } ) +due to unexpected exception with message: + Unknown exception ------------------------------------------------------------------------------- -Generators over two ranges +Exception matchers that fail + Contents are wrong ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +MatchersTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +MatchersTests.cpp:<line number>: FAILED: + CHECK_THROWS_MATCHES( throws(3), SpecialException const&, ExceptionMatcher{ 1 } ) with expansion: - 40 == 40 + {?} special exception has value of 1 -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +MatchersTests.cpp:<line number>: FAILED: + REQUIRE_THROWS_MATCHES( throws(4), SpecialException const&, ExceptionMatcher{ 1 } ) with expansion: - 212 == 212 + {?} special exception has value of 1 ------------------------------------------------------------------------------- -Generators over two ranges +Exception matchers that succeed ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +MatchersTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: +MatchersTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) + CHECK_THROWS_MATCHES( throws(1), SpecialException const&, ExceptionMatcher{ 1 } ) with expansion: - 42 == 42 + {?} special exception has value of 1 -GeneratorTests.cpp:<line number>: +MatchersTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) + REQUIRE_THROWS_MATCHES( throws(2), SpecialException const&, ExceptionMatcher{ 2 } ) with expansion: - 212 == 212 + {?} special exception has value of 2 ------------------------------------------------------------------------------- -Generators over two ranges +Exception messages can be tested for + exact match ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +ExceptionTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:<line number>: +ExceptionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 + REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) ------------------------------------------------------------------------------- -Generators over two ranges +Exception messages can be tested for + different case ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +ExceptionTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:<line number>: +ExceptionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 + REQUIRE_THROWS_WITH( thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) ) ------------------------------------------------------------------------------- -Generators over two ranges +Exception messages can be tested for + wildcarded ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +ExceptionTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: +ExceptionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 + REQUIRE_THROWS_WITH( thisThrows(), StartsWith( "expected" ) ) -GeneratorTests.cpp:<line number>: +ExceptionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... + REQUIRE_THROWS_WITH( thisThrows(), EndsWith( "exception" ) ) -GeneratorTests.cpp:<line number>: +ExceptionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 + REQUIRE_THROWS_WITH( thisThrows(), Contains( "except" ) ) -GeneratorTests.cpp:<line number>: +ExceptionTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 + REQUIRE_THROWS_WITH( thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) ) ------------------------------------------------------------------------------- -Generators over two ranges +Expected exceptions that don't throw or unexpected exceptions fail the test ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +ExceptionTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 +ExceptionTests.cpp:<line number>: FAILED: + CHECK_THROWS_AS( thisThrows(), std::string ) +due to unexpected exception with message: + expected exception -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 +ExceptionTests.cpp:<line number>: FAILED: + CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) +because no exception was thrown where one was expected: + +ExceptionTests.cpp:<line number>: FAILED: + CHECK_NOTHROW( thisThrows() ) +due to unexpected exception with message: + expected exception ------------------------------------------------------------------------------- -Generators over two ranges +FAIL aborts the test ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +MessageTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 +MessageTests.cpp:<line number>: FAILED: +explicitly with message: + This is a failure ------------------------------------------------------------------------------- -Generators over two ranges +FAIL does not require an argument ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +MessageTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 +MessageTests.cpp:<line number>: FAILED: ------------------------------------------------------------------------------- -Generators over two ranges +FAIL_CHECK does not abort the test ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +MessageTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 +MessageTests.cpp:<line number>: FAILED: +explicitly with message: + This is a failure -GeneratorTests.cpp:<line number>: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 +MessageTests.cpp:<line number>: +warning: + This message appears in the output ------------------------------------------------------------------------------- -Generators over two ranges +Factorials are computed ------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> +MiscTests.cpp:<line number> ............................................................................... -GeneratorTests.cpp:<line number>: +MiscTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) + REQUIRE( Factorial(0) == 1 ) with expansion: - 42 == 42 + 1 == 1 -GeneratorTests.cpp:<line number>: +MiscTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) + REQUIRE( Factorial(1) == 1 ) with expansion: - 214 == 214 + 1 == 1 -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp:<line number> -............................................................................... +MiscTests.cpp:<line number>: +PASSED: + REQUIRE( Factorial(2) == 2 ) +with expansion: + 2 == 2 -GeneratorTests.cpp:<line number>: +MiscTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) + REQUIRE( Factorial(3) == 6 ) with expansion: - 72 == 72 + 6 == 6 -GeneratorTests.cpp:<line number>: +MiscTests.cpp:<line number>: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) + REQUIRE( Factorial(10) == 3628800 ) with expansion: - 214 == 214 + 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) ------------------------------------------------------------------------------- Greater-than inequalities with different epsilons @@ -2799,14 +1546,17 @@ MessageTests.cpp:<line number>: FAILED: CHECK( a == 1 ) with expansion: 2 == 1 -with message: +with messages: + this message may be logged later this message should be logged MessageTests.cpp:<line number>: FAILED: CHECK( a == 0 ) with expansion: 2 == 0 -with message: +with messages: + this message may be logged later + this message should be logged and this, but later MessageTests.cpp:<line number>: @@ -2814,7 +1564,10 @@ PASSED: CHECK( a == 2 ) with expansion: 2 == 2 -with message: +with messages: + this message may be logged later + this message should be logged + and this, but later but not this ------------------------------------------------------------------------------- @@ -4647,7 +3400,7 @@ TrickyTests.cpp:<line number>: PASSED: CHECK( True ) with expansion: - true + {?} TrickyTests.cpp:<line number>: PASSED: @@ -4659,7 +3412,7 @@ TrickyTests.cpp:<line number>: PASSED: CHECK_FALSE( False ) with expansion: - !false + !{?} ------------------------------------------------------------------------------- Operators at different namespace levels not hijacked by Koenig lookup @@ -6513,6 +5266,17 @@ TestMain.cpp:<line number>: PASSED: REQUIRE_THROWS_WITH( parseIntoConfig( argv, config ), Contains( "colour mode must be one of" ) ) +------------------------------------------------------------------------------- +Reconstruction should be based on stringification: #914 +------------------------------------------------------------------------------- +DecompositionTests.cpp:<line number> +............................................................................... + +DecompositionTests.cpp:<line number>: FAILED: + CHECK( truthy(false) ) +with expansion: + Hey, its truthy! + ------------------------------------------------------------------------------- SCOPED_INFO is reset for each loop ------------------------------------------------------------------------------- @@ -9544,6 +8308,6 @@ MiscTests.cpp:<line number>: PASSED: =============================================================================== -test cases: 170 | 121 passed | 45 failed | 4 failed as expected -assertions: 982 | 872 passed | 89 failed | 21 failed as expected +test cases: 171 | 120 passed | 47 failed | 4 failed as expected +assertions: 845 | 728 passed | 96 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/console.swa4.approved.txt b/projects/SelfTest/Baselines/console.swa4.approved.txt index 6ce6850a..b1cf14f3 100644 --- a/projects/SelfTest/Baselines/console.swa4.approved.txt +++ b/projects/SelfTest/Baselines/console.swa4.approved.txt @@ -119,7 +119,7 @@ with expansion: MiscTests.cpp:<line number>: PASSED: - REQUIRE( (*__error()) == 1 ) + REQUIRE( errno == 1 ) with expansion: 1 == 1 diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index 5de62625..9e37840d 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuitesspanner> - <testsuite name="<exe-name>" errors="13" failures="77" tests="983" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="15" failures="82" tests="846" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <testcase classname="global" name="# A test name that starts with a #" time="{duration}"/> <testcase classname="#748 - captures with unexpected exceptions" name="outside assertions" time="{duration}"> <error type="TEST_CASE"> @@ -192,6 +192,33 @@ ConditionTests.cpp:<line number> MatchersTests.cpp:<line number> </failure> </testcase> + <testcase classname="Exception matchers that fail" name="No exception" time="{duration}"> + <failure message="doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 }" type="CHECK_THROWS_MATCHES"> +MatchersTests.cpp:<line number> + </failure> + <failure message="doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 }" type="REQUIRE_THROWS_MATCHES"> +MatchersTests.cpp:<line number> + </failure> + </testcase> + <testcase classname="Exception matchers that fail" name="Type mismatch" time="{duration}"> + <error message="throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 }" type="CHECK_THROWS_MATCHES"> +Unknown exception +MatchersTests.cpp:<line number> + </error> + <error message="throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 }" type="REQUIRE_THROWS_MATCHES"> +Unknown exception +MatchersTests.cpp:<line number> + </error> + </testcase> + <testcase classname="Exception matchers that fail" name="Contents are wrong" time="{duration}"> + <failure message="{?} special exception has value of 1" type="CHECK_THROWS_MATCHES"> +MatchersTests.cpp:<line number> + </failure> + <failure message="{?} special exception has value of 1" type="REQUIRE_THROWS_MATCHES"> +MatchersTests.cpp:<line number> + </failure> + </testcase> + <testcase classname="global" name="Exception matchers that succeed" time="{duration}"/> <testcase classname="Exception messages can be tested for" name="exact match" time="{duration}"/> <testcase classname="Exception messages can be tested for" name="different case" time="{duration}"/> <testcase classname="Exception messages can be tested for" name="wildcarded" time="{duration}"/> @@ -226,8 +253,6 @@ MessageTests.cpp:<line number> </failure> </testcase> <testcase classname="global" name="Factorials are computed" time="{duration}"/> - <testcase classname="global" name="Generator over a range of pairs" time="{duration}"/> - <testcase classname="global" name="Generators over two ranges" time="{duration}"/> <testcase classname="global" name="Greater-than inequalities with different epsilons" time="{duration}"/> <testcase classname="global" name="INFO and WARN do not abort tests" time="{duration}"/> <testcase classname="global" name="INFO gets logged on failure" time="{duration}"> @@ -239,10 +264,13 @@ MessageTests.cpp:<line number> </testcase> <testcase classname="global" name="INFO gets logged on failure, even if captured before successful assertions" time="{duration}"> <failure message="2 == 1" type="CHECK"> +this message may be logged later this message should be logged MessageTests.cpp:<line number> </failure> <failure message="2 == 0" type="CHECK"> +this message may be logged later +this message should be logged and this, but later MessageTests.cpp:<line number> </failure> @@ -442,6 +470,11 @@ MessageTests.cpp:<line number> <testcase classname="Process can be configured on command line" name="use-colour/yes" time="{duration}"/> <testcase classname="Process can be configured on command line" name="use-colour/no" time="{duration}"/> <testcase classname="Process can be configured on command line" name="use-colour/error" time="{duration}"/> + <testcase classname="global" name="Reconstruction should be based on stringification: #914" time="{duration}"> + <failure message="Hey, its truthy!" type="CHECK"> +DecompositionTests.cpp:<line number> + </failure> + </testcase> <testcase classname="global" name="SCOPED_INFO is reset for each loop" time="{duration}"> <failure message="10 < 10" type="REQUIRE"> current counter 10 diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index efbd8763..130cda8a 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -128,7 +128,7 @@ </Expression> <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" > <Original> - (*__error()) == 1 + errno == 1 </Original> <Expanded> 1 == 1 @@ -1003,7 +1003,7 @@ a </Original> <Expanded> - true + 0x<hex digits> </Expanded> </Expression> <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TrickyTests.cpp" > @@ -1289,1497 +1289,408 @@ data.int_seven == 0 </Original> <Expanded> - 7 == 0 - </Expanded> - </Expression> - <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.float_nine_point_one == Approx( 9.11f ) - </Original> - <Expanded> - 9.1f == Approx( 9.1099996567 ) - </Expanded> - </Expression> - <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.float_nine_point_one == Approx( 9.0f ) - </Original> - <Expanded> - 9.1f == Approx( 9.0 ) - </Expanded> - </Expression> - <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.float_nine_point_one == Approx( 1 ) - </Original> - <Expanded> - 9.1f == Approx( 1.0 ) - </Expanded> - </Expression> - <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.float_nine_point_one == Approx( 0 ) - </Original> - <Expanded> - 9.1f == Approx( 0.0 ) - </Expanded> - </Expression> - <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.double_pi == Approx( 3.1415 ) - </Original> - <Expanded> - 3.1415926535 == Approx( 3.1415 ) - </Expanded> - </Expression> - <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.str_hello == "goodbye" - </Original> - <Expanded> - "hello" == "goodbye" - </Expanded> - </Expression> - <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.str_hello == "hell" - </Original> - <Expanded> - "hello" == "hell" - </Expanded> - </Expression> - <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.str_hello == "hello1" - </Original> - <Expanded> - "hello" == "hello1" - </Expanded> - </Expression> - <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.str_hello.size() == 6 - </Original> - <Expanded> - 5 == 6 - </Expanded> - </Expression> - <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - x == Approx( 1.301 ) - </Original> - <Expanded> - 1.3 == Approx( 1.301 ) - </Expanded> - </Expression> - <OverallResult success="true"/> - </TestCase> - <TestCase name="Equality checks that should succeed" filename="projects/<exe-name>/ConditionTests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.int_seven == 7 - </Original> - <Expanded> - 7 == 7 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.float_nine_point_one == Approx( 9.1f ) - </Original> - <Expanded> - 9.1f == Approx( 9.1000003815 ) - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.double_pi == Approx( 3.1415926535 ) - </Original> - <Expanded> - 3.1415926535 == Approx( 3.1415926535 ) - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.str_hello == "hello" - </Original> - <Expanded> - "hello" == "hello" - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - "hello" == data.str_hello - </Original> - <Expanded> - "hello" == "hello" - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - data.str_hello.size() == 5 - </Original> - <Expanded> - 5 == 5 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > - <Original> - x == Approx( 1.3 ) - </Original> - <Expanded> - 1.3 == Approx( 1.3 ) - </Expanded> - </Expression> - <OverallResult success="true"/> - </TestCase> - <TestCase name="Equals" tags="[matchers]" filename="projects/<exe-name>/MatchersTests.cpp" > - <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" > - <Original> - testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) - </Original> - <Expanded> - "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" - </Expanded> - </Expression> - <OverallResult success="true"/> - </TestCase> - <TestCase name="Equals string matcher" tags="[.][failing][hide][matchers]" filename="projects/<exe-name>/MatchersTests.cpp" > - <Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" > - <Original> - testStringForMatching(), Equals( "something else" ) - </Original> - <Expanded> - "this string contains 'abc' as a substring" equals: "something else" - </Expanded> - </Expression> - <OverallResult success="false"/> - </TestCase> - <TestCase name="Exception messages can be tested for" tags="[!throws]" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Section name="exact match" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Original> - thisThrows(), "expected exception" - </Original> - <Expanded> - thisThrows(), "expected exception" - </Expanded> - </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> - </Section> - <Section name="different case" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Original> - thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) - </Original> - <Expanded> - thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) - </Expanded> - </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> - </Section> - <Section name="wildcarded" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Original> - thisThrows(), StartsWith( "expected" ) - </Original> - <Expanded> - thisThrows(), StartsWith( "expected" ) - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Original> - thisThrows(), EndsWith( "exception" ) - </Original> - <Expanded> - thisThrows(), EndsWith( "exception" ) - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Original> - thisThrows(), Contains( "except" ) - </Original> - <Expanded> - thisThrows(), Contains( "except" ) - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Original> - thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) - </Original> - <Expanded> - thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) - </Expanded> - </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> - </Section> - <OverallResult success="true"/> - </TestCase> - <TestCase name="Expected exceptions that don't throw or unexpected exceptions fail the test" tags="[!throws][.][failing][hide]" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Expression success="false" type="CHECK_THROWS_AS" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Original> - thisThrows(), std::string - </Original> - <Expanded> - thisThrows(), std::string - </Expanded> - <Exception filename="projects/<exe-name>/ExceptionTests.cpp" > - expected exception - </Exception> - </Expression> - <Expression success="false" type="CHECK_THROWS_AS" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Original> - thisDoesntThrow(), std::domain_error - </Original> - <Expanded> - thisDoesntThrow(), std::domain_error - </Expanded> - </Expression> - <Expression success="false" type="CHECK_NOTHROW" filename="projects/<exe-name>/ExceptionTests.cpp" > - <Original> - thisThrows() - </Original> - <Expanded> - thisThrows() - </Expanded> - <Exception filename="projects/<exe-name>/ExceptionTests.cpp" > - expected exception - </Exception> - </Expression> - <OverallResult success="false"/> - </TestCase> - <TestCase name="FAIL aborts the test" tags="[.][failing][hide][messages]" filename="projects/<exe-name>/MessageTests.cpp" > - <Failure filename="projects/<exe-name>/MessageTests.cpp" > - This is a failure - </Failure> - <OverallResult success="false"/> - </TestCase> - <TestCase name="FAIL does not require an argument" tags="[.][failing][hide][messages]" filename="projects/<exe-name>/MessageTests.cpp" > - <Failure filename="projects/<exe-name>/MessageTests.cpp" /> - <OverallResult success="false"/> - </TestCase> - <TestCase name="FAIL_CHECK does not abort the test" tags="[.][failing][hide][messages]" filename="projects/<exe-name>/MessageTests.cpp" > - <Failure filename="projects/<exe-name>/MessageTests.cpp" > - This is a failure - </Failure> - <Warning> - This message appears in the output - </Warning> - <OverallResult success="false"/> - </TestCase> - <TestCase name="Factorials are computed" tags="[factorial]" filename="projects/<exe-name>/MiscTests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" > - <Original> - Factorial(0) == 1 - </Original> - <Expanded> - 1 == 1 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" > - <Original> - Factorial(1) == 1 - </Original> - <Expanded> - 1 == 1 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" > - <Original> - Factorial(2) == 2 - </Original> - <Expanded> - 2 == 2 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" > - <Original> - Factorial(3) == 6 - </Original> - <Expanded> - 6 == 6 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" > - <Original> - Factorial(10) == 3628800 - </Original> - <Expanded> - 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) - </Expanded> - </Expression> - <OverallResult success="true"/> - </TestCase> - <TestCase name="Generator over a range of pairs" tags="[generators]" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - i->first == i->second-1 - </Original> - <Expanded> - 0 == 0 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - i->first == i->second-1 - </Original> - <Expanded> - 2 == 2 - </Expanded> - </Expression> - <OverallResult success="true"/> - </TestCase> - <TestCase name="Generators over two ranges" tags="[generators]" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 2 == 2 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 200 == 200 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 4 == 4 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 200 == 200 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 6 == 6 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 200 == 200 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 8 == 8 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 200 == 200 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 10 == 10 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 200 == 200 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 30 == 30 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 200 == 200 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 40 == 40 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 200 == 200 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 42 == 42 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 200 == 200 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 72 == 72 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 200 == 200 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 2 == 2 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 202 == 202 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 4 == 4 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 202 == 202 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 6 == 6 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 202 == 202 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 8 == 8 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 202 == 202 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 10 == 10 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 202 == 202 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 30 == 30 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 202 == 202 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 40 == 40 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 202 == 202 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 42 == 42 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 202 == 202 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 72 == 72 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 202 == 202 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 2 == 2 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 204 == 204 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 4 == 4 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 204 == 204 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 6 == 6 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 204 == 204 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 8 == 8 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 204 == 204 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 10 == 10 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 204 == 204 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 30 == 30 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 204 == 204 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 40 == 40 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 204 == 204 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 42 == 42 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 204 == 204 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 72 == 72 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 204 == 204 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 2 == 2 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 206 == 206 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 4 == 4 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 206 == 206 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 6 == 6 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 206 == 206 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 8 == 8 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 206 == 206 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 10 == 10 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 206 == 206 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 30 == 30 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 206 == 206 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 40 == 40 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 206 == 206 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 42 == 42 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 206 == 206 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 72 == 72 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 206 == 206 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 2 == 2 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 208 == 208 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 4 == 4 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 208 == 208 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 6 == 6 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 208 == 208 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 8 == 8 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 208 == 208 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 10 == 10 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 208 == 208 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 30 == 30 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 208 == 208 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 40 == 40 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 208 == 208 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 42 == 42 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 208 == 208 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 72 == 72 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 208 == 208 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 2 == 2 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 210 == 210 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 4 == 4 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 210 == 210 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 6 == 6 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 210 == 210 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 8 == 8 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 210 == 210 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 10 == 10 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 210 == 210 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 30 == 30 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 210 == 210 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 40 == 40 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 210 == 210 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 42 == 42 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 210 == 210 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 72 == 72 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 210 == 210 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 2 == 2 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 212 == 212 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 4 == 4 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 212 == 212 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 6 == 6 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( j, 2 ) == j*2 - </Original> - <Expanded> - 212 == 212 - </Expanded> - </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > - <Original> - multiply( i, 2 ) == i*2 - </Original> - <Expanded> - 8 == 8 + 7 == 0 </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + data.float_nine_point_one == Approx( 9.11f ) </Original> <Expanded> - 212 == 212 + 9.1f == Approx( 9.1099996567 ) </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + data.float_nine_point_one == Approx( 9.0f ) </Original> <Expanded> - 10 == 10 + 9.1f == Approx( 9.0 ) </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + data.float_nine_point_one == Approx( 1 ) </Original> <Expanded> - 212 == 212 + 9.1f == Approx( 1.0 ) </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + data.float_nine_point_one == Approx( 0 ) </Original> <Expanded> - 30 == 30 + 9.1f == Approx( 0.0 ) </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + data.double_pi == Approx( 3.1415 ) </Original> <Expanded> - 212 == 212 + 3.1415926535 == Approx( 3.1415 ) </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + data.str_hello == "goodbye" </Original> <Expanded> - 40 == 40 + "hello" == "goodbye" </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + data.str_hello == "hell" </Original> <Expanded> - 212 == 212 + "hello" == "hell" </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + data.str_hello == "hello1" </Original> <Expanded> - 42 == 42 + "hello" == "hello1" </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + data.str_hello.size() == 6 </Original> <Expanded> - 212 == 212 + 5 == 6 </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + x == Approx( 1.301 ) </Original> <Expanded> - 72 == 72 + 1.3 == Approx( 1.301 ) </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <OverallResult success="true"/> + </TestCase> + <TestCase name="Equality checks that should succeed" filename="projects/<exe-name>/ConditionTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + data.int_seven == 7 </Original> <Expanded> - 212 == 212 + 7 == 7 </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + data.float_nine_point_one == Approx( 9.1f ) </Original> <Expanded> - 2 == 2 + 9.1f == Approx( 9.1000003815 ) </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + data.double_pi == Approx( 3.1415926535 ) </Original> <Expanded> - 214 == 214 + 3.1415926535 == Approx( 3.1415926535 ) </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + data.str_hello == "hello" </Original> <Expanded> - 4 == 4 + "hello" == "hello" </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + "hello" == data.str_hello </Original> <Expanded> - 214 == 214 + "hello" == "hello" </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + data.str_hello.size() == 5 </Original> <Expanded> - 6 == 6 + 5 == 5 </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ConditionTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + x == Approx( 1.3 ) </Original> <Expanded> - 214 == 214 + 1.3 == Approx( 1.3 ) </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <OverallResult success="true"/> + </TestCase> + <TestCase name="Equals" tags="[matchers]" filename="projects/<exe-name>/MatchersTests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) </Original> <Expanded> - 8 == 8 + "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <OverallResult success="true"/> + </TestCase> + <TestCase name="Equals string matcher" tags="[.][failing][hide][matchers]" filename="projects/<exe-name>/MatchersTests.cpp" > + <Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + testStringForMatching(), Equals( "something else" ) </Original> <Expanded> - 214 == 214 + "this string contains 'abc' as a substring" equals: "something else" </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <OverallResult success="false"/> + </TestCase> + <TestCase name="Exception matchers that fail" tags="[!throws][.][.failing][exceptions][hide][matchers]" filename="projects/<exe-name>/MatchersTests.cpp" > + <Section name="No exception" filename="projects/<exe-name>/MatchersTests.cpp" > + <Expression success="false" type="CHECK_THROWS_MATCHES" filename="projects/<exe-name>/MatchersTests.cpp" > + <Original> + doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 } + </Original> + <Expanded> + doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 } + </Expanded> + </Expression> + <Expression success="false" type="REQUIRE_THROWS_MATCHES" filename="projects/<exe-name>/MatchersTests.cpp" > + <Original> + doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 } + </Original> + <Expanded> + doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 } + </Expanded> + </Expression> + <OverallResults successes="0" failures="2" expectedFailures="0"/> + </Section> + <Section name="Type mismatch" filename="projects/<exe-name>/MatchersTests.cpp" > + <Expression success="false" type="CHECK_THROWS_MATCHES" filename="projects/<exe-name>/MatchersTests.cpp" > + <Original> + throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 } + </Original> + <Expanded> + throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 } + </Expanded> + <Exception filename="projects/<exe-name>/MatchersTests.cpp" > + Unknown exception + </Exception> + </Expression> + <Expression success="false" type="REQUIRE_THROWS_MATCHES" filename="projects/<exe-name>/MatchersTests.cpp" > + <Original> + throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 } + </Original> + <Expanded> + throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 } + </Expanded> + <Exception filename="projects/<exe-name>/MatchersTests.cpp" > + Unknown exception + </Exception> + </Expression> + <OverallResults successes="0" failures="2" expectedFailures="0"/> + </Section> + <Section name="Contents are wrong" filename="projects/<exe-name>/MatchersTests.cpp" > + <Expression success="false" type="CHECK_THROWS_MATCHES" filename="projects/<exe-name>/MatchersTests.cpp" > + <Original> + throws(3), SpecialException const&, ExceptionMatcher{ 1 } + </Original> + <Expanded> + {?} special exception has value of 1 + </Expanded> + </Expression> + <Expression success="false" type="REQUIRE_THROWS_MATCHES" filename="projects/<exe-name>/MatchersTests.cpp" > + <Original> + throws(4), SpecialException const&, ExceptionMatcher{ 1 } + </Original> + <Expanded> + {?} special exception has value of 1 + </Expanded> + </Expression> + <OverallResults successes="0" failures="2" expectedFailures="0"/> + </Section> + <OverallResult success="false"/> + </TestCase> + <TestCase name="Exception matchers that succeed" tags="[!throws][exceptions][matchers]" filename="projects/<exe-name>/MatchersTests.cpp" > + <Expression success="true" type="CHECK_THROWS_MATCHES" filename="projects/<exe-name>/MatchersTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + throws(1), SpecialException const&, ExceptionMatcher{ 1 } </Original> <Expanded> - 10 == 10 + {?} special exception has value of 1 </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="projects/<exe-name>/MatchersTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + throws(2), SpecialException const&, ExceptionMatcher{ 2 } </Original> <Expanded> - 214 == 214 + {?} special exception has value of 2 </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <OverallResult success="true"/> + </TestCase> + <TestCase name="Exception messages can be tested for" tags="[!throws]" filename="projects/<exe-name>/ExceptionTests.cpp" > + <Section name="exact match" filename="projects/<exe-name>/ExceptionTests.cpp" > + <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > + <Original> + thisThrows(), "expected exception" + </Original> + <Expanded> + thisThrows(), "expected exception" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="different case" filename="projects/<exe-name>/ExceptionTests.cpp" > + <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > + <Original> + thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) + </Original> + <Expanded> + thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="wildcarded" filename="projects/<exe-name>/ExceptionTests.cpp" > + <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > + <Original> + thisThrows(), StartsWith( "expected" ) + </Original> + <Expanded> + thisThrows(), StartsWith( "expected" ) + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > + <Original> + thisThrows(), EndsWith( "exception" ) + </Original> + <Expanded> + thisThrows(), EndsWith( "exception" ) + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > + <Original> + thisThrows(), Contains( "except" ) + </Original> + <Expanded> + thisThrows(), Contains( "except" ) + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > + <Original> + thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) + </Original> + <Expanded> + thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) + </Expanded> + </Expression> + <OverallResults successes="4" failures="0" expectedFailures="0"/> + </Section> + <OverallResult success="true"/> + </TestCase> + <TestCase name="Expected exceptions that don't throw or unexpected exceptions fail the test" tags="[!throws][.][failing][hide]" filename="projects/<exe-name>/ExceptionTests.cpp" > + <Expression success="false" type="CHECK_THROWS_AS" filename="projects/<exe-name>/ExceptionTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + thisThrows(), std::string </Original> <Expanded> - 30 == 30 + thisThrows(), std::string </Expanded> + <Exception filename="projects/<exe-name>/ExceptionTests.cpp" > + expected exception + </Exception> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK_THROWS_AS" filename="projects/<exe-name>/ExceptionTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + thisDoesntThrow(), std::domain_error </Original> <Expanded> - 214 == 214 + thisDoesntThrow(), std::domain_error </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="false" type="CHECK_NOTHROW" filename="projects/<exe-name>/ExceptionTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + thisThrows() </Original> <Expanded> - 40 == 40 + thisThrows() </Expanded> + <Exception filename="projects/<exe-name>/ExceptionTests.cpp" > + expected exception + </Exception> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <OverallResult success="false"/> + </TestCase> + <TestCase name="FAIL aborts the test" tags="[.][failing][hide][messages]" filename="projects/<exe-name>/MessageTests.cpp" > + <Failure filename="projects/<exe-name>/MessageTests.cpp" > + This is a failure + </Failure> + <OverallResult success="false"/> + </TestCase> + <TestCase name="FAIL does not require an argument" tags="[.][failing][hide][messages]" filename="projects/<exe-name>/MessageTests.cpp" > + <Failure filename="projects/<exe-name>/MessageTests.cpp" /> + <OverallResult success="false"/> + </TestCase> + <TestCase name="FAIL_CHECK does not abort the test" tags="[.][failing][hide][messages]" filename="projects/<exe-name>/MessageTests.cpp" > + <Failure filename="projects/<exe-name>/MessageTests.cpp" > + This is a failure + </Failure> + <Warning> + This message appears in the output + </Warning> + <OverallResult success="false"/> + </TestCase> + <TestCase name="Factorials are computed" tags="[factorial]" filename="projects/<exe-name>/MiscTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + Factorial(0) == 1 </Original> <Expanded> - 214 == 214 + 1 == 1 </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + Factorial(1) == 1 </Original> <Expanded> - 42 == 42 + 1 == 1 </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + Factorial(2) == 2 </Original> <Expanded> - 214 == 214 + 2 == 2 </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" > <Original> - multiply( i, 2 ) == i*2 + Factorial(3) == 6 </Original> <Expanded> - 72 == 72 + 6 == 6 </Expanded> </Expression> - <Expression success="true" type="CATCH_REQUIRE" filename="projects/<exe-name>/GeneratorTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/MiscTests.cpp" > <Original> - multiply( j, 2 ) == j*2 + Factorial(10) == 3628800 </Original> <Expanded> - 214 == 214 + 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) </Expanded> </Expression> <OverallResult success="true"/> @@ -2857,6 +1768,9 @@ 2 == 2 </Expanded> </Expression> + <Info> + this message may be logged later + </Info> <Info> this message should be logged </Info> @@ -2868,6 +1782,12 @@ 2 == 1 </Expanded> </Expression> + <Info> + this message may be logged later + </Info> + <Info> + this message should be logged + </Info> <Info> and this, but later </Info> @@ -2879,6 +1799,15 @@ 2 == 0 </Expanded> </Expression> + <Info> + this message may be logged later + </Info> + <Info> + this message should be logged + </Info> + <Info> + and this, but later + </Info> <Info> but not this </Info> @@ -4790,7 +3719,7 @@ re>" True </Original> <Expanded> - true + {?} </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/TrickyTests.cpp" > @@ -4806,7 +3735,7 @@ re>" !False </Original> <Expanded> - !false + !{?} </Expanded> </Expression> <OverallResult success="true"/> @@ -7007,6 +5936,17 @@ re>" </Section> <OverallResult success="true"/> </TestCase> + <TestCase name="Reconstruction should be based on stringification: #914" tags="[.][Decomposition][failing][hide]" filename="projects/<exe-name>/DecompositionTests.cpp" > + <Expression success="false" type="CHECK" filename="projects/<exe-name>/DecompositionTests.cpp" > + <Original> + truthy(false) + </Original> + <Expanded> + Hey, its truthy! + </Expanded> + </Expression> + <OverallResult success="false"/> + </TestCase> <TestCase name="SCOPED_INFO is reset for each loop" tags="[.][failing][hide][messages]" filename="projects/<exe-name>/MessageTests.cpp" > <Info> current counter 0 @@ -10226,7 +9166,7 @@ spanner <OverallResult success="true"/> </Section> <OverallResult success="true"/> </TestCase> - <OverallResults successes="872" failures="90" expectedFailures="21"/> + <OverallResults successes="728" failures="97" expectedFailures="21"/> </Group> - <OverallResults successes="872" failures="89" expectedFailures="21"/> + <OverallResults successes="728" failures="96" expectedFailures="21"/> </Catch>