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
fdcd46420e1ffbc4fcc33f91644a1da66b1e3c32- Author
- Martin Hořeňovský ·
- Parents
7c25dae9ea7b
Changes
.../SelfTest/Baselines/compact.sw.approved.txt | 146 + .../SelfTest/Baselines/console.std.approved.txt | 4 +- .../SelfTest/Baselines/console.sw.approved.txt | 3580 ++++++++++++++------ projects/SelfTest/Baselines/junit.sw.approved.txt | 12 +- projects/SelfTest/Baselines/xml.sw.approved.txt | 1398 +++++++- 5 files changed, 4090 insertions(+), 1050 deletions(-) diff --git a/projects/SelfTest/Baselines/compact.sw.approved.txt b/projects/SelfTest/Baselines/compact.sw.approved.txt index 4386582c..5c19d7ad 100644 --- a/projects/SelfTest/Baselines/compact.sw.approved.txt +++ b/projects/SelfTest/Baselines/compact.sw.approved.txt @@ -56,6 +56,106 @@ Tricky.tests.cpp:<line number>: passed: !is_true<false>::value for: true Tricky.tests.cpp:<line number>: passed: !!is_true<true>::value for: true Tricky.tests.cpp:<line number>: passed: is_true<true>::value for: true Tricky.tests.cpp:<line number>: passed: !(is_true<false>::value) for: !false +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 101 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 102 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 103 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 104 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 105 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 106 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 107 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 108 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 109 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 110 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 101 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 102 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 103 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 104 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 105 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 106 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 107 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 108 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 109 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 110 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 101 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 102 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 103 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 104 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 105 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 106 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 107 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 108 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 109 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 110 +Generators.tests.cpp:<line number>: passed: x < y for: 4 < 101 +Generators.tests.cpp:<line number>: passed: x < y for: 4 < 102 +Generators.tests.cpp:<line number>: passed: x < y for: 4 < 103 +Generators.tests.cpp:<line number>: passed: x < y for: 4 < 104 +Generators.tests.cpp:<line number>: passed: x < y for: 4 < 105 +Generators.tests.cpp:<line number>: passed: x < y for: 4 < 106 +Generators.tests.cpp:<line number>: passed: x < y for: 4 < 107 +Generators.tests.cpp:<line number>: passed: x < y for: 4 < 108 +Generators.tests.cpp:<line number>: passed: x < y for: 4 < 109 +Generators.tests.cpp:<line number>: passed: x < y for: 4 < 110 +Generators.tests.cpp:<line number>: passed: x < y for: 5 < 101 +Generators.tests.cpp:<line number>: passed: x < y for: 5 < 102 +Generators.tests.cpp:<line number>: passed: x < y for: 5 < 103 +Generators.tests.cpp:<line number>: passed: x < y for: 5 < 104 +Generators.tests.cpp:<line number>: passed: x < y for: 5 < 105 +Generators.tests.cpp:<line number>: passed: x < y for: 5 < 106 +Generators.tests.cpp:<line number>: passed: x < y for: 5 < 107 +Generators.tests.cpp:<line number>: passed: x < y for: 5 < 108 +Generators.tests.cpp:<line number>: passed: x < y for: 5 < 109 +Generators.tests.cpp:<line number>: passed: x < y for: 5 < 110 +Generators.tests.cpp:<line number>: passed: x < y for: 6 < 101 +Generators.tests.cpp:<line number>: passed: x < y for: 6 < 102 +Generators.tests.cpp:<line number>: passed: x < y for: 6 < 103 +Generators.tests.cpp:<line number>: passed: x < y for: 6 < 104 +Generators.tests.cpp:<line number>: passed: x < y for: 6 < 105 +Generators.tests.cpp:<line number>: passed: x < y for: 6 < 106 +Generators.tests.cpp:<line number>: passed: x < y for: 6 < 107 +Generators.tests.cpp:<line number>: passed: x < y for: 6 < 108 +Generators.tests.cpp:<line number>: passed: x < y for: 6 < 109 +Generators.tests.cpp:<line number>: passed: x < y for: 6 < 110 +Generators.tests.cpp:<line number>: passed: x < y for: 7 < 101 +Generators.tests.cpp:<line number>: passed: x < y for: 7 < 102 +Generators.tests.cpp:<line number>: passed: x < y for: 7 < 103 +Generators.tests.cpp:<line number>: passed: x < y for: 7 < 104 +Generators.tests.cpp:<line number>: passed: x < y for: 7 < 105 +Generators.tests.cpp:<line number>: passed: x < y for: 7 < 106 +Generators.tests.cpp:<line number>: passed: x < y for: 7 < 107 +Generators.tests.cpp:<line number>: passed: x < y for: 7 < 108 +Generators.tests.cpp:<line number>: passed: x < y for: 7 < 109 +Generators.tests.cpp:<line number>: passed: x < y for: 7 < 110 +Generators.tests.cpp:<line number>: passed: x < y for: 8 < 101 +Generators.tests.cpp:<line number>: passed: x < y for: 8 < 102 +Generators.tests.cpp:<line number>: passed: x < y for: 8 < 103 +Generators.tests.cpp:<line number>: passed: x < y for: 8 < 104 +Generators.tests.cpp:<line number>: passed: x < y for: 8 < 105 +Generators.tests.cpp:<line number>: passed: x < y for: 8 < 106 +Generators.tests.cpp:<line number>: passed: x < y for: 8 < 107 +Generators.tests.cpp:<line number>: passed: x < y for: 8 < 108 +Generators.tests.cpp:<line number>: passed: x < y for: 8 < 109 +Generators.tests.cpp:<line number>: passed: x < y for: 8 < 110 +Generators.tests.cpp:<line number>: passed: x < y for: 9 < 101 +Generators.tests.cpp:<line number>: passed: x < y for: 9 < 102 +Generators.tests.cpp:<line number>: passed: x < y for: 9 < 103 +Generators.tests.cpp:<line number>: passed: x < y for: 9 < 104 +Generators.tests.cpp:<line number>: passed: x < y for: 9 < 105 +Generators.tests.cpp:<line number>: passed: x < y for: 9 < 106 +Generators.tests.cpp:<line number>: passed: x < y for: 9 < 107 +Generators.tests.cpp:<line number>: passed: x < y for: 9 < 108 +Generators.tests.cpp:<line number>: passed: x < y for: 9 < 109 +Generators.tests.cpp:<line number>: passed: x < y for: 9 < 110 +Generators.tests.cpp:<line number>: passed: x < y for: 10 < 101 +Generators.tests.cpp:<line number>: passed: x < y for: 10 < 102 +Generators.tests.cpp:<line number>: passed: x < y for: 10 < 103 +Generators.tests.cpp:<line number>: passed: x < y for: 10 < 104 +Generators.tests.cpp:<line number>: passed: x < y for: 10 < 105 +Generators.tests.cpp:<line number>: passed: x < y for: 10 < 106 +Generators.tests.cpp:<line number>: passed: x < y for: 10 < 107 +Generators.tests.cpp:<line number>: passed: x < y for: 10 < 108 +Generators.tests.cpp:<line number>: passed: x < y for: 10 < 109 +Generators.tests.cpp:<line number>: passed: x < y for: 10 < 110 Class.tests.cpp:<line number>: failed: s == "world" for: "hello" == "world" Class.tests.cpp:<line number>: passed: s == "hello" for: "hello" == "hello" Class.tests.cpp:<line number>: failed: m_a == 2 for: 1 == 2 @@ -297,6 +397,48 @@ Matchers.tests.cpp:<line number>: passed: WithinAbs(1.f, 0.f) Matchers.tests.cpp:<line number>: passed: WithinAbs(1.f, -1.f), std::domain_error Matchers.tests.cpp:<line number>: passed: WithinULP(1.f, 0) Matchers.tests.cpp:<line number>: passed: WithinULP(1.f, -1), std::domain_error +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 8' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 9' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 10' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 2' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 3.141' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 1.379' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 8' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 9' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 10' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 2' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 3.141' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 1.379' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 8' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 9' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 10' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 2' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 3.141' +Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 1.379' +GeneratorsImpl.tests.cpp:<line number>: passed: gen.size() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[0] == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[1] == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.size() == 4 for: 4 == 4 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[0] == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[1] == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[2] == 4 for: 4 == 4 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[3] == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.size() == 4 for: 4 == 4 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[0] == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[1] == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[2] == 9 for: 9 == 9 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[3] == 7 for: 7 == 7 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.size() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[0] == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[1] == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.size() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[0] == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:<line number>: passed: gen[1] == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:<line number>: passed: base->size() == 4 for: 4 == 4 +GeneratorsImpl.tests.cpp:<line number>: passed: typed for: 0x<hex digits> +GeneratorsImpl.tests.cpp:<line number>: passed: typed->size() == 4 for: 4 == 4 +GeneratorsImpl.tests.cpp:<line number>: passed: (*typed)[0] == 7 for: 7 == 7 +GeneratorsImpl.tests.cpp:<line number>: passed: (*typed)[3] == 11 for: 11 == 11 Approx.tests.cpp:<line number>: passed: d >= Approx( 1.22 ) for: 1.23 >= Approx( 1.22 ) Approx.tests.cpp:<line number>: passed: d >= Approx( 1.23 ) for: 1.23 >= Approx( 1.23 ) Approx.tests.cpp:<line number>: passed: !(d >= Approx( 1.24 )) for: !(1.23 >= Approx( 1.24 )) @@ -1093,6 +1235,10 @@ ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( v ) = ToStringWhich.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" for: "{ operator<<( has_operator ) }" == "{ operator<<( has_operator ) }" +Generators.tests.cpp:<line number>: passed: data.str.size() == data.len for: 3 == 3 +Generators.tests.cpp:<line number>: passed: data.str.size() == data.len for: 3 == 3 +Generators.tests.cpp:<line number>: passed: data.str.size() == data.len for: 5 == 5 +Generators.tests.cpp:<line number>: passed: data.str.size() == data.len for: 4 == 4 Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'Why would you throw a std::string?' Misc.tests.cpp:<line number>: passed: result == "/"wide load/"" for: ""wide load"" == ""wide load"" Misc.tests.cpp:<line number>: passed: result == "/"wide load/"" for: ""wide load"" == ""wide load"" diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index 4c8b5540..4800aec0 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -1096,6 +1096,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 208 | 155 passed | 49 failed | 4 failed as expected -assertions: 1081 | 952 passed | 108 failed | 21 failed as expected +test cases: 212 | 159 passed | 49 failed | 4 failed as expected +assertions: 1227 | 1098 passed | 108 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index 533fba15..ce606b03 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -490,1799 +490,3419 @@ with expansion: !false ------------------------------------------------------------------------------- -A METHOD_AS_TEST_CASE based test run that fails +10x10 ints ------------------------------------------------------------------------------- -Class.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Class.tests.cpp:<line number>: FAILED: - REQUIRE( s == "world" ) +Generators.tests.cpp:<line number>: +PASSED: + CHECK( x < y ) with expansion: - "hello" == "world" + 1 < 101 ------------------------------------------------------------------------------- -A METHOD_AS_TEST_CASE based test run that succeeds +10x10 ints ------------------------------------------------------------------------------- -Class.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Class.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( s == "hello" ) + CHECK( x < y ) with expansion: - "hello" == "hello" + 1 < 102 ------------------------------------------------------------------------------- -A TEST_CASE_METHOD based test run that fails +10x10 ints ------------------------------------------------------------------------------- -Class.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Class.tests.cpp:<line number>: FAILED: - REQUIRE( m_a == 2 ) +Generators.tests.cpp:<line number>: +PASSED: + CHECK( x < y ) with expansion: - 1 == 2 + 1 < 103 ------------------------------------------------------------------------------- -A TEST_CASE_METHOD based test run that succeeds +10x10 ints ------------------------------------------------------------------------------- -Class.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Class.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( m_a == 1 ) + CHECK( x < y ) with expansion: - 1 == 1 + 1 < 104 ------------------------------------------------------------------------------- -A comparison that uses literals instead of the normal constructor +10x10 ints ------------------------------------------------------------------------------- -Approx.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( d == 1.23_a ) + CHECK( x < y ) with expansion: - 1.23 == Approx( 1.23 ) + 1 < 105 -Approx.tests.cpp:<line number>: -PASSED: - REQUIRE( d != 1.22_a ) -with expansion: - 1.23 != Approx( 1.22 ) +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( -d == -1.23_a ) + CHECK( x < y ) with expansion: - -1.23 == Approx( -1.23 ) + 1 < 106 -Approx.tests.cpp:<line number>: -PASSED: - REQUIRE( d == 1.2_a .epsilon(.1) ) -with expansion: - 1.23 == Approx( 1.2 ) +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( d != 1.2_a .epsilon(.001) ) + CHECK( x < y ) with expansion: - 1.23 != Approx( 1.2 ) + 1 < 107 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( d == 1_a .epsilon(.3) ) + CHECK( x < y ) with expansion: - 1.23 == Approx( 1.0 ) + 1 < 108 ------------------------------------------------------------------------------- -A couple of nested sections followed by a failure - Outer - Inner +10x10 ints ------------------------------------------------------------------------------- -Misc.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Misc.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: -with message: - that's not flying - that's failing in style + CHECK( x < y ) +with expansion: + 1 < 109 ------------------------------------------------------------------------------- -A couple of nested sections followed by a failure +10x10 ints ------------------------------------------------------------------------------- -Misc.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Misc.tests.cpp:<line number>: FAILED: -explicitly with message: - to infinity and beyond +Generators.tests.cpp:<line number>: +PASSED: + CHECK( x < y ) +with expansion: + 1 < 110 ------------------------------------------------------------------------------- -A failing expression with a non streamable type is still captured +10x10 ints ------------------------------------------------------------------------------- -Tricky.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Tricky.tests.cpp:<line number>: FAILED: - CHECK( &o1 == &o2 ) -with expansion: - 0x<hex digits> == 0x<hex digits> - -Tricky.tests.cpp:<line number>: FAILED: - CHECK( o1 == o2 ) +Generators.tests.cpp:<line number>: +PASSED: + CHECK( x < y ) with expansion: - {?} == {?} + 2 < 101 ------------------------------------------------------------------------------- -Absolute margin +10x10 ints ------------------------------------------------------------------------------- -Approx.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 104.0 != Approx(100.0) ) + CHECK( x < y ) with expansion: - 104.0 != Approx( 100.0 ) + 2 < 102 -Approx.tests.cpp:<line number>: -PASSED: - REQUIRE( 104.0 == Approx(100.0).margin(5) ) -with expansion: - 104.0 == Approx( 100.0 ) +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 104.0 == Approx(100.0).margin(4) ) + CHECK( x < y ) with expansion: - 104.0 == Approx( 100.0 ) + 2 < 103 -Approx.tests.cpp:<line number>: -PASSED: - REQUIRE( 104.0 != Approx(100.0).margin(3) ) -with expansion: - 104.0 != Approx( 100.0 ) +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 100.3 != Approx(100.0) ) + CHECK( x < y ) with expansion: - 100.3 != Approx( 100.0 ) + 2 < 104 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 100.3 == Approx(100.0).margin(0.5) ) + CHECK( x < y ) with expansion: - 100.3 == Approx( 100.0 ) + 2 < 105 ------------------------------------------------------------------------------- -An empty test with no assertions +10x10 ints ------------------------------------------------------------------------------- -Misc.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... - -No assertions in test case 'An empty test with no assertions' +Generators.tests.cpp:<line number>: +PASSED: + CHECK( x < y ) +with expansion: + 2 < 106 ------------------------------------------------------------------------------- -An expression with side-effects should only be evaluated once +10x10 ints ------------------------------------------------------------------------------- -Tricky.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( i++ == 7 ) + CHECK( x < y ) with expansion: - 7 == 7 + 2 < 107 -Tricky.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( i++ == 8 ) + CHECK( x < y ) with expansion: - 8 == 8 + 2 < 108 ------------------------------------------------------------------------------- -An unchecked exception reports the line of the last assertion +10x10 ints ------------------------------------------------------------------------------- -Exception.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Exception.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - CHECK( 1 == 1 ) - -Exception.tests.cpp:<line number>: FAILED: - {Unknown expression after the reported line} -due to unexpected exception with message: - unexpected exception + CHECK( x < y ) +with expansion: + 2 < 109 ------------------------------------------------------------------------------- -Anonymous test case 1 +10x10 ints ------------------------------------------------------------------------------- -VariadicMacros.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -VariadicMacros.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: -with message: - anonymous test case + CHECK( x < y ) +with expansion: + 2 < 110 ------------------------------------------------------------------------------- -Approx setters validate their arguments +10x10 ints ------------------------------------------------------------------------------- -Approx.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_NOTHROW( Approx(0).margin(0) ) + CHECK( x < y ) +with expansion: + 3 < 101 -Approx.tests.cpp:<line number>: -PASSED: - REQUIRE_NOTHROW( Approx(0).margin(1234656) ) +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS_AS( Approx(0).margin(-2), std::domain_error ) + CHECK( x < y ) +with expansion: + 3 < 102 -Approx.tests.cpp:<line number>: -PASSED: - REQUIRE_NOTHROW( Approx(0).epsilon(0) ) +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_NOTHROW( Approx(0).epsilon(1) ) + CHECK( x < y ) +with expansion: + 3 < 103 -Approx.tests.cpp:<line number>: -PASSED: - REQUIRE_THROWS_AS( Approx(0).epsilon(-0.001), std::domain_error ) +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS_AS( Approx(0).epsilon(1.0001), std::domain_error ) + CHECK( x < y ) +with expansion: + 3 < 104 ------------------------------------------------------------------------------- -Approx with exactly-representable margin +10x10 ints ------------------------------------------------------------------------------- -Approx.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - CHECK( 0.25f == Approx(0.0f).margin(0.25f) ) + CHECK( x < y ) with expansion: - 0.25f == Approx( 0.0 ) + 3 < 105 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK( 0.0f == Approx(0.25f).margin(0.25f) ) + CHECK( x < y ) with expansion: - 0.0f == Approx( 0.25 ) + 3 < 106 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK( 0.5f == Approx(0.25f).margin(0.25f) ) + CHECK( x < y ) with expansion: - 0.5f == Approx( 0.25 ) + 3 < 107 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK( 245.0f == Approx(245.25f).margin(0.25f) ) + CHECK( x < y ) with expansion: - 245.0f == Approx( 245.25 ) + 3 < 108 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK( 245.5f == Approx(245.25f).margin(0.25f) ) + CHECK( x < y ) with expansion: - 245.5f == Approx( 245.25 ) + 3 < 109 ------------------------------------------------------------------------------- -Approximate PI +10x10 ints ------------------------------------------------------------------------------- -Approx.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ) + CHECK( x < y ) with expansion: - 3.1428571429 == Approx( 3.141 ) + 3 < 110 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ) + CHECK( x < y ) with expansion: - 3.1428571429 != Approx( 3.141 ) + 4 < 101 ------------------------------------------------------------------------------- -Approximate comparisons with different epsilons +10x10 ints ------------------------------------------------------------------------------- -Approx.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( d != Approx( 1.231 ) ) + CHECK( x < y ) with expansion: - 1.23 != Approx( 1.231 ) + 4 < 102 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( d == Approx( 1.231 ).epsilon( 0.1 ) ) + CHECK( x < y ) with expansion: - 1.23 == Approx( 1.231 ) + 4 < 103 ------------------------------------------------------------------------------- -Approximate comparisons with floats +10x10 ints ------------------------------------------------------------------------------- -Approx.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 1.23f == Approx( 1.23f ) ) + CHECK( x < y ) with expansion: - 1.23f == Approx( 1.2300000191 ) + 4 < 104 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 0.0f == Approx( 0.0f ) ) + CHECK( x < y ) with expansion: - 0.0f == Approx( 0.0 ) + 4 < 105 ------------------------------------------------------------------------------- -Approximate comparisons with ints +10x10 ints ------------------------------------------------------------------------------- -Approx.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 1 == Approx( 1 ) ) + CHECK( x < y ) with expansion: - 1 == Approx( 1.0 ) + 4 < 106 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 0 == Approx( 0 ) ) + CHECK( x < y ) with expansion: - 0 == Approx( 0.0 ) + 4 < 107 ------------------------------------------------------------------------------- -Approximate comparisons with mixed numeric types +10x10 ints ------------------------------------------------------------------------------- -Approx.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 1.0f == Approx( 1 ) ) + CHECK( x < y ) with expansion: - 1.0f == Approx( 1.0 ) + 4 < 108 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 0 == Approx( dZero) ) + CHECK( x < y ) with expansion: - 0 == Approx( 0.0 ) + 4 < 109 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 0 == Approx( dSmall ).margin( 0.001 ) ) + CHECK( x < y ) with expansion: - 0 == Approx( 0.00001 ) + 4 < 110 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 1.234f == Approx( dMedium ) ) + CHECK( x < y ) with expansion: - 1.234f == Approx( 1.234 ) + 5 < 101 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( dMedium == Approx( 1.234f ) ) + CHECK( x < y ) with expansion: - 1.234 == Approx( 1.2339999676 ) + 5 < 102 ------------------------------------------------------------------------------- -Arbitrary predicate matcher - Function pointer +10x10 ints ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 1, Predicate<int>(alwaysTrue, "always true") ) + CHECK( x < y ) with expansion: - 1 matches predicate: "always true" + 5 < 103 -Matchers.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 1, !Predicate<int>(alwaysFalse, "always false") ) + CHECK( x < y ) with expansion: - 1 not matches predicate: "always false" + 5 < 104 ------------------------------------------------------------------------------- -Arbitrary predicate matcher - Lambdas + different type +10x10 ints ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( "Hello olleH", Predicate<std::string>( [] (std::string const& str) -> bool { return str.front() == str.back(); }, "First and last character should be equal") ) + CHECK( x < y ) with expansion: - "Hello olleH" matches predicate: "First and last character should be equal" + 5 < 105 -Matchers.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( "This wouldn't pass", !Predicate<std::string>( [] (std::string const& str) -> bool { return str.front() == str.back(); } ) ) + CHECK( x < y ) with expansion: - "This wouldn't pass" not matches undescribed predicate + 5 < 106 ------------------------------------------------------------------------------- -Assertions then sections +10x10 ints ------------------------------------------------------------------------------- -Tricky.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( true ) + CHECK( x < y ) +with expansion: + 5 < 107 ------------------------------------------------------------------------------- -Assertions then sections - A section +10x10 ints ------------------------------------------------------------------------------- -Tricky.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( true ) + CHECK( x < y ) +with expansion: + 5 < 108 ------------------------------------------------------------------------------- -Assertions then sections - A section - Another section +10x10 ints ------------------------------------------------------------------------------- -Tricky.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( true ) + CHECK( x < y ) +with expansion: + 5 < 109 ------------------------------------------------------------------------------- -Assertions then sections +10x10 ints ------------------------------------------------------------------------------- -Tricky.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( true ) + CHECK( x < y ) +with expansion: + 5 < 110 ------------------------------------------------------------------------------- -Assertions then sections - A section +10x10 ints ------------------------------------------------------------------------------- -Tricky.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( true ) + CHECK( x < y ) +with expansion: + 6 < 101 ------------------------------------------------------------------------------- -Assertions then sections - A section - Another other section +10x10 ints ------------------------------------------------------------------------------- -Tricky.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( true ) + CHECK( x < y ) +with expansion: + 6 < 102 ------------------------------------------------------------------------------- -Assorted miscellaneous tests +10x10 ints ------------------------------------------------------------------------------- -Approx.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( INFINITY == Approx(INFINITY) ) + CHECK( x < y ) with expansion: - inff == Approx( inf ) + 6 < 103 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( NAN != Approx(NAN) ) + CHECK( x < y ) with expansion: - nanf != Approx( nan ) + 6 < 104 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_FALSE( NAN == Approx(NAN) ) + CHECK( x < y ) with expansion: - !(nanf == Approx( nan )) + 6 < 105 ------------------------------------------------------------------------------- -Bitfields can be captured (#1027) +10x10 ints ------------------------------------------------------------------------------- -Tricky.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( y.v == 0 ) + CHECK( x < y ) with expansion: - 0 == 0 + 6 < 106 -Tricky.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( 0 == y.v ) + CHECK( x < y ) with expansion: - 0 == 0 + 6 < 107 ------------------------------------------------------------------------------- -Capture and info messages - Capture should stringify like assertions +10x10 ints ------------------------------------------------------------------------------- -ToStringGeneral.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -ToStringGeneral.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( true ) -with message: - i := 2 + CHECK( x < y ) +with expansion: + 6 < 108 ------------------------------------------------------------------------------- -Capture and info messages - Info should NOT stringify the way assertions do +10x10 ints ------------------------------------------------------------------------------- -ToStringGeneral.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -ToStringGeneral.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( true ) -with message: - 3 + CHECK( x < y ) +with expansion: + 6 < 109 ------------------------------------------------------------------------------- -Character pretty printing - Specifically escaped +10x10 ints ------------------------------------------------------------------------------- -ToStringGeneral.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -ToStringGeneral.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - CHECK( tab == '\t' ) + CHECK( x < y ) with expansion: - '\t' == '\t' + 6 < 110 -ToStringGeneral.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK( newline == '\n' ) + CHECK( x < y ) with expansion: - '\n' == '\n' + 7 < 101 -ToStringGeneral.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK( carr_return == '\r' ) + CHECK( x < y ) with expansion: - '\r' == '\r' + 7 < 102 -ToStringGeneral.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK( form_feed == '\f' ) + CHECK( x < y ) with expansion: - '\f' == '\f' + 7 < 103 ------------------------------------------------------------------------------- -Character pretty printing - General chars +10x10 ints ------------------------------------------------------------------------------- -ToStringGeneral.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -ToStringGeneral.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - CHECK( space == ' ' ) + CHECK( x < y ) with expansion: - ' ' == ' ' + 7 < 104 -ToStringGeneral.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( c == chars[i] ) + CHECK( x < y ) with expansion: - 'a' == 'a' + 7 < 105 -ToStringGeneral.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( c == chars[i] ) + CHECK( x < y ) with expansion: - 'z' == 'z' + 7 < 106 -ToStringGeneral.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( c == chars[i] ) + CHECK( x < y ) with expansion: - 'A' == 'A' + 7 < 107 -ToStringGeneral.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( c == chars[i] ) + CHECK( x < y ) with expansion: - 'Z' == 'Z' + 7 < 108 ------------------------------------------------------------------------------- -Character pretty printing - Low ASCII +10x10 ints ------------------------------------------------------------------------------- -ToStringGeneral.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -ToStringGeneral.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - CHECK( null_terminator == '\0' ) + CHECK( x < y ) with expansion: - 0 == 0 + 7 < 109 -ToStringGeneral.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( c == i ) + CHECK( x < y ) with expansion: - 2 == 2 + 7 < 110 -ToStringGeneral.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( c == i ) + CHECK( x < y ) with expansion: - 3 == 3 + 8 < 101 -ToStringGeneral.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( c == i ) + CHECK( x < y ) with expansion: - 4 == 4 + 8 < 102 -ToStringGeneral.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( c == i ) + CHECK( x < y ) with expansion: - 5 == 5 + 8 < 103 ------------------------------------------------------------------------------- -Commas in various macros are allowed +10x10 ints ------------------------------------------------------------------------------- -Tricky.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS( std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} ) + CHECK( x < y ) +with expansion: + 8 < 104 -Tricky.tests.cpp:<line number>: -PASSED: - CHECK_THROWS( std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} ) +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_NOTHROW( std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} ) + CHECK( x < y ) +with expansion: + 8 < 105 -Tricky.tests.cpp:<line number>: -PASSED: - CHECK_NOTHROW( std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} ) +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( std::vector<int>{1, 2} == std::vector<int>{1, 2} ) + CHECK( x < y ) with expansion: - { 1, 2 } == { 1, 2 } + 8 < 106 -Tricky.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK( std::vector<int>{1, 2} == std::vector<int>{1, 2} ) + CHECK( x < y ) with expansion: - { 1, 2 } == { 1, 2 } + 8 < 107 -Tricky.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_FALSE( std::vector<int>{1, 2} == std::vector<int>{1, 2, 3} ) + CHECK( x < y ) with expansion: - !({ 1, 2 } == { 1, 2, 3 }) + 8 < 108 -Tricky.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK_FALSE( std::vector<int>{1, 2} == std::vector<int>{1, 2, 3} ) + CHECK( x < y ) with expansion: - !({ 1, 2 } == { 1, 2, 3 }) + 8 < 109 -Tricky.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK_NOFAIL( std::vector<int>{1, 2} == std::vector<int>{1, 2} ) + CHECK( x < y ) with expansion: - { 1, 2 } == { 1, 2 } + 8 < 110 -Tricky.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECKED_IF( std::vector<int>{1, 2} == std::vector<int>{1, 2} ) + CHECK( x < y ) with expansion: - { 1, 2 } == { 1, 2 } + 9 < 101 -Tricky.tests.cpp:<line number>: -PASSED: - REQUIRE( true ) +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - CHECKED_ELSE( std::vector<int>{1, 2} == std::vector<int>{1, 2} ) + CHECK( x < y ) with expansion: - { 1, 2 } == { 1, 2 } + 9 < 102 ------------------------------------------------------------------------------- -Comparing function pointers +10x10 ints ------------------------------------------------------------------------------- -Tricky.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Tricky.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( a ) + CHECK( x < y ) with expansion: - 0x<hex digits> + 9 < 103 -Tricky.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( a == &foo ) + CHECK( x < y ) with expansion: - 0x<hex digits> == 0x<hex digits> + 9 < 104 ------------------------------------------------------------------------------- -Comparison with explicitly convertible types +10x10 ints ------------------------------------------------------------------------------- -Approx.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Approx.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( td == Approx(10.0) ) + CHECK( x < y ) with expansion: - StrongDoubleTypedef(10) == Approx( 10.0 ) + 9 < 105 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( Approx(10.0) == td ) + CHECK( x < y ) with expansion: - Approx( 10.0 ) == StrongDoubleTypedef(10) + 9 < 106 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( td != Approx(11.0) ) + CHECK( x < y ) with expansion: - StrongDoubleTypedef(10) != Approx( 11.0 ) + 9 < 107 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( Approx(11.0) != td ) + CHECK( x < y ) with expansion: - Approx( 11.0 ) != StrongDoubleTypedef(10) + 9 < 108 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( td <= Approx(10.0) ) + CHECK( x < y ) with expansion: - StrongDoubleTypedef(10) <= Approx( 10.0 ) + 9 < 109 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( td <= Approx(11.0) ) + CHECK( x < y ) with expansion: - StrongDoubleTypedef(10) <= Approx( 11.0 ) + 9 < 110 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( Approx(10.0) <= td ) + CHECK( x < y ) with expansion: - Approx( 10.0 ) <= StrongDoubleTypedef(10) + 10 < 101 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( Approx(9.0) <= td ) + CHECK( x < y ) with expansion: - Approx( 9.0 ) <= StrongDoubleTypedef(10) + 10 < 102 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( td >= Approx(9.0) ) + CHECK( x < y ) with expansion: - StrongDoubleTypedef(10) >= Approx( 9.0 ) + 10 < 103 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( td >= Approx(td) ) + CHECK( x < y ) with expansion: - StrongDoubleTypedef(10) >= Approx( 10.0 ) + 10 < 104 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( Approx(td) >= td ) + CHECK( x < y ) with expansion: - Approx( 10.0 ) >= StrongDoubleTypedef(10) + 10 < 105 -Approx.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - REQUIRE( Approx(11.0) >= td ) + CHECK( x < y ) with expansion: - Approx( 11.0 ) >= StrongDoubleTypedef(10) + 10 < 106 ------------------------------------------------------------------------------- -Comparisons between ints where one side is computed +10x10 ints ------------------------------------------------------------------------------- -Condition.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Condition.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - CHECK( 54 == 6*9 ) + CHECK( x < y ) with expansion: - 54 == 54 + 10 < 107 ------------------------------------------------------------------------------- -Comparisons between unsigned ints and negative signed ints match c++ standard -behaviour +10x10 ints ------------------------------------------------------------------------------- -Condition.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Condition.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - CHECK( ( -1 > 2u ) ) + CHECK( x < y ) with expansion: - true + 10 < 108 -Condition.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK( -1 > 2u ) + CHECK( x < y ) with expansion: - -1 > 2 + 10 < 109 -Condition.tests.cpp:<line number>: +------------------------------------------------------------------------------- +10x10 ints +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: - CHECK( ( 2u < -1 ) ) + CHECK( x < y ) with expansion: - true + 10 < 110 -Condition.tests.cpp:<line number>: -PASSED: - CHECK( 2u < -1 ) +------------------------------------------------------------------------------- +A METHOD_AS_TEST_CASE based test run that fails +------------------------------------------------------------------------------- +Class.tests.cpp:<line number> +............................................................................... + +Class.tests.cpp:<line number>: FAILED: + REQUIRE( s == "world" ) with expansion: - 2 < -1 + "hello" == "world" -Condition.tests.cpp:<line number>: +------------------------------------------------------------------------------- +A METHOD_AS_TEST_CASE based test run that succeeds +------------------------------------------------------------------------------- +Class.tests.cpp:<line number> +............................................................................... + +Class.tests.cpp:<line number>: PASSED: - CHECK( ( minInt > 2u ) ) + REQUIRE( s == "hello" ) with expansion: - true + "hello" == "hello" -Condition.tests.cpp:<line number>: -PASSED: - CHECK( minInt > 2u ) +------------------------------------------------------------------------------- +A TEST_CASE_METHOD based test run that fails +------------------------------------------------------------------------------- +Class.tests.cpp:<line number> +............................................................................... + +Class.tests.cpp:<line number>: FAILED: + REQUIRE( m_a == 2 ) with expansion: - -2147483648 > 2 + 1 == 2 ------------------------------------------------------------------------------- -Comparisons with int literals don't warn when mixing signed/ unsigned +A TEST_CASE_METHOD based test run that succeeds ------------------------------------------------------------------------------- -Condition.tests.cpp:<line number> +Class.tests.cpp:<line number> ............................................................................... -Condition.tests.cpp:<line number>: +Class.tests.cpp:<line number>: PASSED: - REQUIRE( i == 1 ) + REQUIRE( m_a == 1 ) with expansion: 1 == 1 -Condition.tests.cpp:<line number>: +------------------------------------------------------------------------------- +A comparison that uses literals instead of the normal constructor +------------------------------------------------------------------------------- +Approx.tests.cpp:<line number> +............................................................................... + +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( ui == 2 ) + REQUIRE( d == 1.23_a ) with expansion: - 2 == 2 + 1.23 == Approx( 1.23 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( l == 3 ) + REQUIRE( d != 1.22_a ) with expansion: - 3 == 3 + 1.23 != Approx( 1.22 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( ul == 4 ) + REQUIRE( -d == -1.23_a ) with expansion: - 4 == 4 + -1.23 == Approx( -1.23 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( c == 5 ) + REQUIRE( d == 1.2_a .epsilon(.1) ) with expansion: - 5 == 5 + 1.23 == Approx( 1.2 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( uc == 6 ) + REQUIRE( d != 1.2_a .epsilon(.001) ) with expansion: - 6 == 6 + 1.23 != Approx( 1.2 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( 1 == i ) + REQUIRE( d == 1_a .epsilon(.3) ) with expansion: - 1 == 1 + 1.23 == Approx( 1.0 ) -Condition.tests.cpp:<line number>: +------------------------------------------------------------------------------- +A couple of nested sections followed by a failure + Outer + Inner +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: PASSED: - REQUIRE( 2 == ui ) +with message: + that's not flying - that's failing in style + +------------------------------------------------------------------------------- +A couple of nested sections followed by a failure +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: FAILED: +explicitly with message: + to infinity and beyond + +------------------------------------------------------------------------------- +A failing expression with a non streamable type is still captured +------------------------------------------------------------------------------- +Tricky.tests.cpp:<line number> +............................................................................... + +Tricky.tests.cpp:<line number>: FAILED: + CHECK( &o1 == &o2 ) with expansion: - 2 == 2 + 0x<hex digits> == 0x<hex digits> -Condition.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: FAILED: + CHECK( o1 == o2 ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +Absolute margin +------------------------------------------------------------------------------- +Approx.tests.cpp:<line number> +............................................................................... + +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( 3 == l ) + REQUIRE( 104.0 != Approx(100.0) ) with expansion: - 3 == 3 + 104.0 != Approx( 100.0 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( 4 == ul ) + REQUIRE( 104.0 == Approx(100.0).margin(5) ) with expansion: - 4 == 4 + 104.0 == Approx( 100.0 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( 5 == c ) + REQUIRE( 104.0 == Approx(100.0).margin(4) ) with expansion: - 5 == 5 + 104.0 == Approx( 100.0 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( 6 == uc ) + REQUIRE( 104.0 != Approx(100.0).margin(3) ) with expansion: - 6 == 6 + 104.0 != Approx( 100.0 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( (std::numeric_limits<uint32_t>::max)() > ul ) + REQUIRE( 100.3 != Approx(100.0) ) with expansion: - 4294967295 (0x<hex digits>) > 4 + 100.3 != Approx( 100.0 ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( 100.3 == Approx(100.0).margin(0.5) ) +with expansion: + 100.3 == Approx( 100.0 ) ------------------------------------------------------------------------------- -Contains string matcher +An empty test with no assertions ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Misc.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: FAILED: - CHECK_THAT( testStringForMatching(), Contains("not there", Catch::CaseSensitive::No) ) + +No assertions in test case 'An empty test with no assertions' + +------------------------------------------------------------------------------- +An expression with side-effects should only be evaluated once +------------------------------------------------------------------------------- +Tricky.tests.cpp:<line number> +............................................................................... + +Tricky.tests.cpp:<line number>: +PASSED: + REQUIRE( i++ == 7 ) with expansion: - "this string contains 'abc' as a substring" contains: "not there" (case - insensitive) + 7 == 7 -Matchers.tests.cpp:<line number>: FAILED: - CHECK_THAT( testStringForMatching(), Contains("STRING") ) +Tricky.tests.cpp:<line number>: +PASSED: + REQUIRE( i++ == 8 ) with expansion: - "this string contains 'abc' as a substring" contains: "STRING" + 8 == 8 ------------------------------------------------------------------------------- -Custom exceptions can be translated when testing for nothrow +An unchecked exception reports the line of the last assertion ------------------------------------------------------------------------------- Exception.tests.cpp:<line number> ............................................................................... +Exception.tests.cpp:<line number>: +PASSED: + CHECK( 1 == 1 ) + Exception.tests.cpp:<line number>: FAILED: - REQUIRE_NOTHROW( throwCustom() ) + {Unknown expression after the reported line} due to unexpected exception with message: - custom exception - not std + unexpected exception ------------------------------------------------------------------------------- -Custom exceptions can be translated when testing for throwing as something else +Anonymous test case 1 ------------------------------------------------------------------------------- -Exception.tests.cpp:<line number> +VariadicMacros.tests.cpp:<line number> ............................................................................... -Exception.tests.cpp:<line number>: FAILED: - REQUIRE_THROWS_AS( throwCustom(), std::exception ) -due to unexpected exception with message: - custom exception - not std +VariadicMacros.tests.cpp:<line number>: +PASSED: +with message: + anonymous test case ------------------------------------------------------------------------------- -Custom std-exceptions can be custom translated +Approx setters validate their arguments ------------------------------------------------------------------------------- -Exception.tests.cpp:<line number> +Approx.tests.cpp:<line number> ............................................................................... -Exception.tests.cpp:<line number>: FAILED: -due to unexpected exception with message: - custom std exception +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE_NOTHROW( Approx(0).margin(0) ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE_NOTHROW( Approx(0).margin(1234656) ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_AS( Approx(0).margin(-2), std::domain_error ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE_NOTHROW( Approx(0).epsilon(0) ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE_NOTHROW( Approx(0).epsilon(1) ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_AS( Approx(0).epsilon(-0.001), std::domain_error ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_AS( Approx(0).epsilon(1.0001), std::domain_error ) ------------------------------------------------------------------------------- -Default scale is invisible to comparison +Approx with exactly-representable margin ------------------------------------------------------------------------------- Approx.tests.cpp:<line number> ............................................................................... Approx.tests.cpp:<line number>: PASSED: - REQUIRE( 101.000001 != Approx(100).epsilon(0.01) ) + CHECK( 0.25f == Approx(0.0f).margin(0.25f) ) with expansion: - 101.000001 != Approx( 100.0 ) + 0.25f == Approx( 0.0 ) Approx.tests.cpp:<line number>: PASSED: - REQUIRE( std::pow(10, -5) != Approx(std::pow(10, -7)) ) + CHECK( 0.0f == Approx(0.25f).margin(0.25f) ) with expansion: - 0.00001 != Approx( 0.0000001 ) + 0.0f == Approx( 0.25 ) -------------------------------------------------------------------------------- -EndsWith string matcher -------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> -............................................................................... +Approx.tests.cpp:<line number>: +PASSED: + CHECK( 0.5f == Approx(0.25f).margin(0.25f) ) +with expansion: + 0.5f == Approx( 0.25 ) -Matchers.tests.cpp:<line number>: FAILED: - CHECK_THAT( testStringForMatching(), EndsWith("Substring") ) +Approx.tests.cpp:<line number>: +PASSED: + CHECK( 245.0f == Approx(245.25f).margin(0.25f) ) with expansion: - "this string contains 'abc' as a substring" ends with: "Substring" + 245.0f == Approx( 245.25 ) -Matchers.tests.cpp:<line number>: FAILED: - CHECK_THAT( testStringForMatching(), EndsWith("this", Catch::CaseSensitive::No) ) +Approx.tests.cpp:<line number>: +PASSED: + CHECK( 245.5f == Approx(245.25f).margin(0.25f) ) with expansion: - "this string contains 'abc' as a substring" ends with: "this" (case - insensitive) + 245.5f == Approx( 245.25 ) ------------------------------------------------------------------------------- -Epsilon only applies to Approx's value +Approximate PI ------------------------------------------------------------------------------- Approx.tests.cpp:<line number> ............................................................................... Approx.tests.cpp:<line number>: PASSED: - REQUIRE( 101.01 != Approx(100).epsilon(0.01) ) + REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ) with expansion: - 101.01 != Approx( 100.0 ) + 3.1428571429 == Approx( 3.141 ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ) +with expansion: + 3.1428571429 != Approx( 3.141 ) ------------------------------------------------------------------------------- -Equality checks that should fail +Approximate comparisons with different epsilons ------------------------------------------------------------------------------- -Condition.tests.cpp:<line number> +Approx.tests.cpp:<line number> ............................................................................... -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.int_seven == 6 ) +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( d != Approx( 1.231 ) ) with expansion: - 7 == 6 + 1.23 != Approx( 1.231 ) -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.int_seven == 8 ) +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( d == Approx( 1.231 ).epsilon( 0.1 ) ) with expansion: - 7 == 8 + 1.23 == Approx( 1.231 ) -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.int_seven == 0 ) +------------------------------------------------------------------------------- +Approximate comparisons with floats +------------------------------------------------------------------------------- +Approx.tests.cpp:<line number> +............................................................................... + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( 1.23f == Approx( 1.23f ) ) with expansion: - 7 == 0 + 1.23f == Approx( 1.2300000191 ) -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.float_nine_point_one == Approx( 9.11f ) ) +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( 0.0f == Approx( 0.0f ) ) with expansion: - 9.1f == Approx( 9.1099996567 ) - -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.float_nine_point_one == Approx( 9.0f ) ) -with expansion: - 9.1f == Approx( 9.0 ) - -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.float_nine_point_one == Approx( 1 ) ) -with expansion: - 9.1f == Approx( 1.0 ) - -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.float_nine_point_one == Approx( 0 ) ) -with expansion: - 9.1f == Approx( 0.0 ) - -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.double_pi == Approx( 3.1415 ) ) -with expansion: - 3.1415926535 == Approx( 3.1415 ) - -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.str_hello == "goodbye" ) -with expansion: - "hello" == "goodbye" - -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.str_hello == "hell" ) -with expansion: - "hello" == "hell" - -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.str_hello == "hello1" ) -with expansion: - "hello" == "hello1" - -Condition.tests.cpp:<line number>: FAILED: - CHECK( data.str_hello.size() == 6 ) -with expansion: - 5 == 6 - -Condition.tests.cpp:<line number>: FAILED: - CHECK( x == Approx( 1.301 ) ) -with expansion: - 1.3 == Approx( 1.301 ) + 0.0f == Approx( 0.0 ) ------------------------------------------------------------------------------- -Equality checks that should succeed +Approximate comparisons with ints ------------------------------------------------------------------------------- -Condition.tests.cpp:<line number> +Approx.tests.cpp:<line number> ............................................................................... -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( data.int_seven == 7 ) + REQUIRE( 1 == Approx( 1 ) ) with expansion: - 7 == 7 + 1 == Approx( 1.0 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ) + REQUIRE( 0 == Approx( 0 ) ) with expansion: - 9.1f == Approx( 9.1000003815 ) + 0 == Approx( 0.0 ) -Condition.tests.cpp:<line number>: +------------------------------------------------------------------------------- +Approximate comparisons with mixed numeric types +------------------------------------------------------------------------------- +Approx.tests.cpp:<line number> +............................................................................... + +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( data.double_pi == Approx( 3.1415926535 ) ) + REQUIRE( 1.0f == Approx( 1 ) ) with expansion: - 3.1415926535 == Approx( 3.1415926535 ) + 1.0f == Approx( 1.0 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( data.str_hello == "hello" ) + REQUIRE( 0 == Approx( dZero) ) with expansion: - "hello" == "hello" + 0 == Approx( 0.0 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( "hello" == data.str_hello ) + REQUIRE( 0 == Approx( dSmall ).margin( 0.001 ) ) with expansion: - "hello" == "hello" + 0 == Approx( 0.00001 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( data.str_hello.size() == 5 ) + REQUIRE( 1.234f == Approx( dMedium ) ) with expansion: - 5 == 5 + 1.234f == Approx( 1.234 ) -Condition.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE( x == Approx( 1.3 ) ) + REQUIRE( dMedium == Approx( 1.234f ) ) with expansion: - 1.3 == Approx( 1.3 ) + 1.234 == Approx( 1.2339999676 ) ------------------------------------------------------------------------------- -Equals +Arbitrary predicate matcher + Function pointer ------------------------------------------------------------------------------- Matchers.tests.cpp:<line number> ............................................................................... Matchers.tests.cpp:<line number>: PASSED: - CHECK_THAT( testStringForMatching(), Equals("this string contains 'abc' as a substring") ) + REQUIRE_THAT( 1, Predicate<int>(alwaysTrue, "always true") ) with expansion: - "this string contains 'abc' as a substring" equals: "this string contains - 'abc' as a substring" + 1 matches predicate: "always true" Matchers.tests.cpp:<line number>: PASSED: - CHECK_THAT( testStringForMatching(), Equals("this string contains 'ABC' as a substring", Catch::CaseSensitive::No) ) + REQUIRE_THAT( 1, !Predicate<int>(alwaysFalse, "always false") ) with expansion: - "this string contains 'abc' as a substring" equals: "this string contains - 'abc' as a substring" (case insensitive) + 1 not matches predicate: "always false" ------------------------------------------------------------------------------- -Equals string matcher +Arbitrary predicate matcher + Lambdas + different type ------------------------------------------------------------------------------- Matchers.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: FAILED: - CHECK_THAT( testStringForMatching(), Equals("this string contains 'ABC' as a substring") ) +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( "Hello olleH", Predicate<std::string>( [] (std::string const& str) -> bool { return str.front() == str.back(); }, "First and last character should be equal") ) with expansion: - "this string contains 'abc' as a substring" equals: "this string contains - 'ABC' as a substring" + "Hello olleH" matches predicate: "First and last character should be equal" -Matchers.tests.cpp:<line number>: FAILED: - CHECK_THAT( testStringForMatching(), Equals("something else", Catch::CaseSensitive::No) ) +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( "This wouldn't pass", !Predicate<std::string>( [] (std::string const& str) -> bool { return str.front() == str.back(); } ) ) with expansion: - "this string contains 'abc' as a substring" equals: "something else" (case - insensitive) + "This wouldn't pass" not matches undescribed predicate ------------------------------------------------------------------------------- -Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +Assertions then sections ------------------------------------------------------------------------------- -ToStringGeneral.tests.cpp:<line number> +Tricky.tests.cpp:<line number> ............................................................................... -ToStringGeneral.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE( ::Catch::Detail::stringify(WhatException{}) == "This exception has overriden what() method" ) -with expansion: - "This exception has overriden what() method" - == - "This exception has overriden what() method" + REQUIRE( true ) -ToStringGeneral.tests.cpp:<line number>: -PASSED: - REQUIRE( ::Catch::Detail::stringify(OperatorException{}) == "OperatorException" ) -with expansion: - "OperatorException" == "OperatorException" +------------------------------------------------------------------------------- +Assertions then sections + A section +------------------------------------------------------------------------------- +Tricky.tests.cpp:<line number> +............................................................................... -ToStringGeneral.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE( ::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException" ) -with expansion: - "StringMakerException" - == - "StringMakerException" + REQUIRE( true ) ------------------------------------------------------------------------------- -Exception matchers that fail - No exception +Assertions then sections + A section + Another section ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Tricky.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: FAILED: - CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{1} ) -because no exception was thrown where one was expected: - -Matchers.tests.cpp:<line number>: FAILED: - REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{1} ) -because no exception was thrown where one was expected: +Tricky.tests.cpp:<line number>: +PASSED: + REQUIRE( true ) ------------------------------------------------------------------------------- -Exception matchers that fail - Type mismatch +Assertions then sections ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Tricky.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: FAILED: - CHECK_THROWS_MATCHES( throwsAsInt(1), SpecialException, ExceptionMatcher{1} ) -due to unexpected exception with message: - Unknown exception - -Matchers.tests.cpp:<line number>: FAILED: - REQUIRE_THROWS_MATCHES( throwsAsInt(1), SpecialException, ExceptionMatcher{1} ) -due to unexpected exception with message: - Unknown exception +Tricky.tests.cpp:<line number>: +PASSED: + REQUIRE( true ) ------------------------------------------------------------------------------- -Exception matchers that fail - Contents are wrong +Assertions then sections + A section ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Tricky.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: FAILED: - CHECK_THROWS_MATCHES( throws(3), SpecialException, ExceptionMatcher{1} ) -with expansion: - SpecialException::what special exception has value of 1 +Tricky.tests.cpp:<line number>: +PASSED: + REQUIRE( true ) -Matchers.tests.cpp:<line number>: FAILED: - REQUIRE_THROWS_MATCHES( throws(4), SpecialException, ExceptionMatcher{1} ) -with expansion: - SpecialException::what special exception has value of 1 +------------------------------------------------------------------------------- +Assertions then sections + A section + Another other section +------------------------------------------------------------------------------- +Tricky.tests.cpp:<line number> +............................................................................... + +Tricky.tests.cpp:<line number>: +PASSED: + REQUIRE( true ) ------------------------------------------------------------------------------- -Exception matchers that succeed +Assorted miscellaneous tests ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Approx.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - CHECK_THROWS_MATCHES( throws(1), SpecialException, ExceptionMatcher{1} ) + REQUIRE( INFINITY == Approx(INFINITY) ) with expansion: - SpecialException::what special exception has value of 1 + inff == Approx( inf ) -Matchers.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS_MATCHES( throws(2), SpecialException, ExceptionMatcher{2} ) + REQUIRE( NAN != Approx(NAN) ) with expansion: - SpecialException::what special exception has value of 2 - -------------------------------------------------------------------------------- -Exception messages can be tested for - exact match -------------------------------------------------------------------------------- -Exception.tests.cpp:<line number> -............................................................................... + nanf != Approx( nan ) -Exception.tests.cpp:<line number>: +Approx.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) + REQUIRE_FALSE( NAN == Approx(NAN) ) with expansion: - "expected exception" equals: "expected exception" + !(nanf == Approx( nan )) ------------------------------------------------------------------------------- -Exception messages can be tested for - different case +Bitfields can be captured (#1027) ------------------------------------------------------------------------------- -Exception.tests.cpp:<line number> +Tricky.tests.cpp:<line number> ............................................................................... -Exception.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS_WITH( thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) ) + REQUIRE( y.v == 0 ) with expansion: - "expected exception" equals: "expected exception" (case insensitive) + 0 == 0 + +Tricky.tests.cpp:<line number>: +PASSED: + REQUIRE( 0 == y.v ) +with expansion: + 0 == 0 ------------------------------------------------------------------------------- -Exception messages can be tested for - wildcarded +Capture and info messages + Capture should stringify like assertions ------------------------------------------------------------------------------- -Exception.tests.cpp:<line number> +ToStringGeneral.tests.cpp:<line number> ............................................................................... -Exception.tests.cpp:<line number>: -PASSED: - REQUIRE_THROWS_WITH( thisThrows(), StartsWith( "expected" ) ) -with expansion: - "expected exception" starts with: "expected" - -Exception.tests.cpp:<line number>: +ToStringGeneral.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS_WITH( thisThrows(), EndsWith( "exception" ) ) -with expansion: - "expected exception" ends with: "exception" + REQUIRE( true ) +with message: + i := 2 -Exception.tests.cpp:<line number>: -PASSED: - REQUIRE_THROWS_WITH( thisThrows(), Contains( "except" ) ) -with expansion: - "expected exception" contains: "except" +------------------------------------------------------------------------------- +Capture and info messages + Info should NOT stringify the way assertions do +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp:<line number> +............................................................................... -Exception.tests.cpp:<line number>: +ToStringGeneral.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS_WITH( thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) ) -with expansion: - "expected exception" contains: "except" (case insensitive) + REQUIRE( true ) +with message: + 3 ------------------------------------------------------------------------------- -Expected exceptions that don't throw or unexpected exceptions fail the test +Character pretty printing + Specifically escaped ------------------------------------------------------------------------------- -Exception.tests.cpp:<line number> +ToStringGeneral.tests.cpp:<line number> ............................................................................... -Exception.tests.cpp:<line number>: FAILED: - CHECK_THROWS_AS( thisThrows(), std::string ) -due to unexpected exception with message: - expected exception - -Exception.tests.cpp:<line number>: FAILED: - CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) -because no exception was thrown where one was expected: +ToStringGeneral.tests.cpp:<line number>: +PASSED: + CHECK( tab == '\t' ) +with expansion: + '\t' == '\t' -Exception.tests.cpp:<line number>: FAILED: - CHECK_NOTHROW( thisThrows() ) -due to unexpected exception with message: - expected exception +ToStringGeneral.tests.cpp:<line number>: +PASSED: + CHECK( newline == '\n' ) +with expansion: + '\n' == '\n' -------------------------------------------------------------------------------- -FAIL aborts the test -------------------------------------------------------------------------------- -Message.tests.cpp:<line number> -............................................................................... +ToStringGeneral.tests.cpp:<line number>: +PASSED: + CHECK( carr_return == '\r' ) +with expansion: + '\r' == '\r' -Message.tests.cpp:<line number>: FAILED: -explicitly with message: - This is a failure +ToStringGeneral.tests.cpp:<line number>: +PASSED: + CHECK( form_feed == '\f' ) +with expansion: + '\f' == '\f' ------------------------------------------------------------------------------- -FAIL does not require an argument +Character pretty printing + General chars ------------------------------------------------------------------------------- -Message.tests.cpp:<line number> +ToStringGeneral.tests.cpp:<line number> ............................................................................... -Message.tests.cpp:<line number>: FAILED: +ToStringGeneral.tests.cpp:<line number>: +PASSED: + CHECK( space == ' ' ) +with expansion: + ' ' == ' ' -------------------------------------------------------------------------------- -FAIL_CHECK does not abort the test -------------------------------------------------------------------------------- -Message.tests.cpp:<line number> -............................................................................... +ToStringGeneral.tests.cpp:<line number>: +PASSED: + REQUIRE( c == chars[i] ) +with expansion: + 'a' == 'a' -Message.tests.cpp:<line number>: FAILED: -explicitly with message: - This is a failure +ToStringGeneral.tests.cpp:<line number>: +PASSED: + REQUIRE( c == chars[i] ) +with expansion: + 'z' == 'z' -Message.tests.cpp:<line number>: -warning: - This message appears in the output +ToStringGeneral.tests.cpp:<line number>: +PASSED: + REQUIRE( c == chars[i] ) +with expansion: + 'A' == 'A' + +ToStringGeneral.tests.cpp:<line number>: +PASSED: + REQUIRE( c == chars[i] ) +with expansion: + 'Z' == 'Z' ------------------------------------------------------------------------------- -Factorials are computed +Character pretty printing + Low ASCII ------------------------------------------------------------------------------- -Misc.tests.cpp:<line number> +ToStringGeneral.tests.cpp:<line number> ............................................................................... -Misc.tests.cpp:<line number>: +ToStringGeneral.tests.cpp:<line number>: PASSED: - REQUIRE( Factorial(0) == 1 ) + CHECK( null_terminator == '\0' ) with expansion: - 1 == 1 + 0 == 0 -Misc.tests.cpp:<line number>: +ToStringGeneral.tests.cpp:<line number>: PASSED: - REQUIRE( Factorial(1) == 1 ) + REQUIRE( c == i ) with expansion: - 1 == 1 + 2 == 2 -Misc.tests.cpp:<line number>: +ToStringGeneral.tests.cpp:<line number>: PASSED: - REQUIRE( Factorial(2) == 2 ) + REQUIRE( c == i ) with expansion: - 2 == 2 + 3 == 3 -Misc.tests.cpp:<line number>: +ToStringGeneral.tests.cpp:<line number>: PASSED: - REQUIRE( Factorial(3) == 6 ) + REQUIRE( c == i ) with expansion: - 6 == 6 + 4 == 4 -Misc.tests.cpp:<line number>: +ToStringGeneral.tests.cpp:<line number>: PASSED: - REQUIRE( Factorial(10) == 3628800 ) + REQUIRE( c == i ) with expansion: - 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) + 5 == 5 ------------------------------------------------------------------------------- -Floating point matchers: double - Margin +Commas in various macros are allowed ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Tricky.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 1., WithinAbs(1., 0) ) -with expansion: - 1.0 is within 0.0 of 1.0 + REQUIRE_THROWS( std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} ) -Matchers.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 0., WithinAbs(1., 1) ) -with expansion: - 0.0 is within 1.0 of 1.0 + CHECK_THROWS( std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} ) -Matchers.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 0., !WithinAbs(1., 0.99) ) + REQUIRE_NOTHROW( std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} ) + +Tricky.tests.cpp:<line number>: +PASSED: + CHECK_NOTHROW( std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} ) + +Tricky.tests.cpp:<line number>: +PASSED: + REQUIRE( std::vector<int>{1, 2} == std::vector<int>{1, 2} ) with expansion: - 0.0 not is within 0.99 of 1.0 + { 1, 2 } == { 1, 2 } -Matchers.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 0., !WithinAbs(1., 0.99) ) + CHECK( std::vector<int>{1, 2} == std::vector<int>{1, 2} ) with expansion: - 0.0 not is within 0.99 of 1.0 + { 1, 2 } == { 1, 2 } -Matchers.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( NAN, !WithinAbs(NAN, 0) ) + REQUIRE_FALSE( std::vector<int>{1, 2} == std::vector<int>{1, 2, 3} ) with expansion: - nanf not is within 0.0 of nan + !({ 1, 2 } == { 1, 2, 3 }) -Matchers.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 11., !WithinAbs(10., 0.5) ) + CHECK_FALSE( std::vector<int>{1, 2} == std::vector<int>{1, 2, 3} ) with expansion: - 11.0 not is within 0.5 of 10.0 + !({ 1, 2 } == { 1, 2, 3 }) -Matchers.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 10., !WithinAbs(11., 0.5) ) + CHECK_NOFAIL( std::vector<int>{1, 2} == std::vector<int>{1, 2} ) with expansion: - 10.0 not is within 0.5 of 11.0 + { 1, 2 } == { 1, 2 } -Matchers.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( -10., WithinAbs(-10., 0.5) ) + CHECKED_IF( std::vector<int>{1, 2} == std::vector<int>{1, 2} ) with expansion: - -10.0 is within 0.5 of -10.0 + { 1, 2 } == { 1, 2 } -Matchers.tests.cpp:<line number>: +Tricky.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( -10., WithinAbs(-9.6, 0.5) ) + REQUIRE( true ) + +Tricky.tests.cpp:<line number>: +PASSED: + CHECKED_ELSE( std::vector<int>{1, 2} == std::vector<int>{1, 2} ) with expansion: - -10.0 is within 0.5 of -9.6 + { 1, 2 } == { 1, 2 } ------------------------------------------------------------------------------- -Floating point matchers: double - ULPs +Comparing function pointers +------------------------------------------------------------------------------- +Tricky.tests.cpp:<line number> +............................................................................... + +Tricky.tests.cpp:<line number>: +PASSED: + REQUIRE( a ) +with expansion: + 0x<hex digits> + +Tricky.tests.cpp:<line number>: +PASSED: + REQUIRE( a == &foo ) +with expansion: + 0x<hex digits> == 0x<hex digits> + +------------------------------------------------------------------------------- +Comparison with explicitly convertible types +------------------------------------------------------------------------------- +Approx.tests.cpp:<line number> +............................................................................... + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( td == Approx(10.0) ) +with expansion: + StrongDoubleTypedef(10) == Approx( 10.0 ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( Approx(10.0) == td ) +with expansion: + Approx( 10.0 ) == StrongDoubleTypedef(10) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( td != Approx(11.0) ) +with expansion: + StrongDoubleTypedef(10) != Approx( 11.0 ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( Approx(11.0) != td ) +with expansion: + Approx( 11.0 ) != StrongDoubleTypedef(10) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( td <= Approx(10.0) ) +with expansion: + StrongDoubleTypedef(10) <= Approx( 10.0 ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( td <= Approx(11.0) ) +with expansion: + StrongDoubleTypedef(10) <= Approx( 11.0 ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( Approx(10.0) <= td ) +with expansion: + Approx( 10.0 ) <= StrongDoubleTypedef(10) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( Approx(9.0) <= td ) +with expansion: + Approx( 9.0 ) <= StrongDoubleTypedef(10) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( td >= Approx(9.0) ) +with expansion: + StrongDoubleTypedef(10) >= Approx( 9.0 ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( td >= Approx(td) ) +with expansion: + StrongDoubleTypedef(10) >= Approx( 10.0 ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( Approx(td) >= td ) +with expansion: + Approx( 10.0 ) >= StrongDoubleTypedef(10) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( Approx(11.0) >= td ) +with expansion: + Approx( 11.0 ) >= StrongDoubleTypedef(10) + +------------------------------------------------------------------------------- +Comparisons between ints where one side is computed +------------------------------------------------------------------------------- +Condition.tests.cpp:<line number> +............................................................................... + +Condition.tests.cpp:<line number>: +PASSED: + CHECK( 54 == 6*9 ) +with expansion: + 54 == 54 + +------------------------------------------------------------------------------- +Comparisons between unsigned ints and negative signed ints match c++ standard +behaviour +------------------------------------------------------------------------------- +Condition.tests.cpp:<line number> +............................................................................... + +Condition.tests.cpp:<line number>: +PASSED: + CHECK( ( -1 > 2u ) ) +with expansion: + true + +Condition.tests.cpp:<line number>: +PASSED: + CHECK( -1 > 2u ) +with expansion: + -1 > 2 + +Condition.tests.cpp:<line number>: +PASSED: + CHECK( ( 2u < -1 ) ) +with expansion: + true + +Condition.tests.cpp:<line number>: +PASSED: + CHECK( 2u < -1 ) +with expansion: + 2 < -1 + +Condition.tests.cpp:<line number>: +PASSED: + CHECK( ( minInt > 2u ) ) +with expansion: + true + +Condition.tests.cpp:<line number>: +PASSED: + CHECK( minInt > 2u ) +with expansion: + -2147483648 > 2 + +------------------------------------------------------------------------------- +Comparisons with int literals don't warn when mixing signed/ unsigned +------------------------------------------------------------------------------- +Condition.tests.cpp:<line number> +............................................................................... + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( i == 1 ) +with expansion: + 1 == 1 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( ui == 2 ) +with expansion: + 2 == 2 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( l == 3 ) +with expansion: + 3 == 3 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( ul == 4 ) +with expansion: + 4 == 4 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( c == 5 ) +with expansion: + 5 == 5 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( uc == 6 ) +with expansion: + 6 == 6 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( 1 == i ) +with expansion: + 1 == 1 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( 2 == ui ) +with expansion: + 2 == 2 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( 3 == l ) +with expansion: + 3 == 3 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( 4 == ul ) +with expansion: + 4 == 4 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( 5 == c ) +with expansion: + 5 == 5 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( 6 == uc ) +with expansion: + 6 == 6 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( (std::numeric_limits<uint32_t>::max)() > ul ) +with expansion: + 4294967295 (0x<hex digits>) > 4 + +------------------------------------------------------------------------------- +Contains string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: FAILED: + CHECK_THAT( testStringForMatching(), Contains("not there", Catch::CaseSensitive::No) ) +with expansion: + "this string contains 'abc' as a substring" contains: "not there" (case + insensitive) + +Matchers.tests.cpp:<line number>: FAILED: + CHECK_THAT( testStringForMatching(), Contains("STRING") ) +with expansion: + "this string contains 'abc' as a substring" contains: "STRING" + +------------------------------------------------------------------------------- +Custom exceptions can be translated when testing for nothrow +------------------------------------------------------------------------------- +Exception.tests.cpp:<line number> +............................................................................... + +Exception.tests.cpp:<line number>: FAILED: + REQUIRE_NOTHROW( throwCustom() ) +due to unexpected exception with message: + custom exception - not std + +------------------------------------------------------------------------------- +Custom exceptions can be translated when testing for throwing as something else +------------------------------------------------------------------------------- +Exception.tests.cpp:<line number> +............................................................................... + +Exception.tests.cpp:<line number>: FAILED: + REQUIRE_THROWS_AS( throwCustom(), std::exception ) +due to unexpected exception with message: + custom exception - not std + +------------------------------------------------------------------------------- +Custom std-exceptions can be custom translated +------------------------------------------------------------------------------- +Exception.tests.cpp:<line number> +............................................................................... + +Exception.tests.cpp:<line number>: FAILED: +due to unexpected exception with message: + custom std exception + +------------------------------------------------------------------------------- +Default scale is invisible to comparison +------------------------------------------------------------------------------- +Approx.tests.cpp:<line number> +............................................................................... + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( 101.000001 != Approx(100).epsilon(0.01) ) +with expansion: + 101.000001 != Approx( 100.0 ) + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( std::pow(10, -5) != Approx(std::pow(10, -7)) ) +with expansion: + 0.00001 != Approx( 0.0000001 ) + +------------------------------------------------------------------------------- +EndsWith string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: FAILED: + CHECK_THAT( testStringForMatching(), EndsWith("Substring") ) +with expansion: + "this string contains 'abc' as a substring" ends with: "Substring" + +Matchers.tests.cpp:<line number>: FAILED: + CHECK_THAT( testStringForMatching(), EndsWith("this", Catch::CaseSensitive::No) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "this" (case + insensitive) + +------------------------------------------------------------------------------- +Epsilon only applies to Approx's value +------------------------------------------------------------------------------- +Approx.tests.cpp:<line number> +............................................................................... + +Approx.tests.cpp:<line number>: +PASSED: + REQUIRE( 101.01 != Approx(100).epsilon(0.01) ) +with expansion: + 101.01 != Approx( 100.0 ) + +------------------------------------------------------------------------------- +Equality checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp:<line number> +............................................................................... + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.int_seven == 6 ) +with expansion: + 7 == 6 + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.int_seven == 8 ) +with expansion: + 7 == 8 + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.int_seven == 0 ) +with expansion: + 7 == 0 + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.float_nine_point_one == Approx( 9.11f ) ) +with expansion: + 9.1f == Approx( 9.1099996567 ) + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.float_nine_point_one == Approx( 9.0f ) ) +with expansion: + 9.1f == Approx( 9.0 ) + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.float_nine_point_one == Approx( 1 ) ) +with expansion: + 9.1f == Approx( 1.0 ) + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.float_nine_point_one == Approx( 0 ) ) +with expansion: + 9.1f == Approx( 0.0 ) + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.double_pi == Approx( 3.1415 ) ) +with expansion: + 3.1415926535 == Approx( 3.1415 ) + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.str_hello == "goodbye" ) +with expansion: + "hello" == "goodbye" + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.str_hello == "hell" ) +with expansion: + "hello" == "hell" + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.str_hello == "hello1" ) +with expansion: + "hello" == "hello1" + +Condition.tests.cpp:<line number>: FAILED: + CHECK( data.str_hello.size() == 6 ) +with expansion: + 5 == 6 + +Condition.tests.cpp:<line number>: FAILED: + CHECK( x == Approx( 1.301 ) ) +with expansion: + 1.3 == Approx( 1.301 ) + +------------------------------------------------------------------------------- +Equality checks that should succeed +------------------------------------------------------------------------------- +Condition.tests.cpp:<line number> +............................................................................... + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( data.int_seven == 7 ) +with expansion: + 7 == 7 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ) +with expansion: + 9.1f == Approx( 9.1000003815 ) + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( data.double_pi == Approx( 3.1415926535 ) ) +with expansion: + 3.1415926535 == Approx( 3.1415926535 ) + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( data.str_hello == "hello" ) +with expansion: + "hello" == "hello" + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( "hello" == data.str_hello ) +with expansion: + "hello" == "hello" + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( data.str_hello.size() == 5 ) +with expansion: + 5 == 5 + +Condition.tests.cpp:<line number>: +PASSED: + REQUIRE( x == Approx( 1.3 ) ) +with expansion: + 1.3 == Approx( 1.3 ) + +------------------------------------------------------------------------------- +Equals +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.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" + +Matchers.tests.cpp:<line number>: +PASSED: + CHECK_THAT( testStringForMatching(), Equals("this string contains 'ABC' as a substring", Catch::CaseSensitive::No) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains + 'abc' as a substring" (case insensitive) + +------------------------------------------------------------------------------- +Equals string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: FAILED: + 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" + +Matchers.tests.cpp:<line number>: FAILED: + CHECK_THAT( testStringForMatching(), Equals("something else", Catch::CaseSensitive::No) ) +with expansion: + "this string contains 'abc' as a substring" equals: "something else" (case + insensitive) + +------------------------------------------------------------------------------- +Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp:<line number> +............................................................................... + +ToStringGeneral.tests.cpp:<line number>: +PASSED: + REQUIRE( ::Catch::Detail::stringify(WhatException{}) == "This exception has overriden what() method" ) +with expansion: + "This exception has overriden what() method" + == + "This exception has overriden what() method" + +ToStringGeneral.tests.cpp:<line number>: +PASSED: + REQUIRE( ::Catch::Detail::stringify(OperatorException{}) == "OperatorException" ) +with expansion: + "OperatorException" == "OperatorException" + +ToStringGeneral.tests.cpp:<line number>: +PASSED: + REQUIRE( ::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException" ) +with expansion: + "StringMakerException" + == + "StringMakerException" + +------------------------------------------------------------------------------- +Exception matchers that fail + No exception +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: FAILED: + CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{1} ) +because no exception was thrown where one was expected: + +Matchers.tests.cpp:<line number>: FAILED: + REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{1} ) +because no exception was thrown where one was expected: + +------------------------------------------------------------------------------- +Exception matchers that fail + Type mismatch +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: FAILED: + CHECK_THROWS_MATCHES( throwsAsInt(1), SpecialException, ExceptionMatcher{1} ) +due to unexpected exception with message: + Unknown exception + +Matchers.tests.cpp:<line number>: FAILED: + REQUIRE_THROWS_MATCHES( throwsAsInt(1), SpecialException, ExceptionMatcher{1} ) +due to unexpected exception with message: + Unknown exception + +------------------------------------------------------------------------------- +Exception matchers that fail + Contents are wrong +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: FAILED: + CHECK_THROWS_MATCHES( throws(3), SpecialException, ExceptionMatcher{1} ) +with expansion: + SpecialException::what special exception has value of 1 + +Matchers.tests.cpp:<line number>: FAILED: + REQUIRE_THROWS_MATCHES( throws(4), SpecialException, ExceptionMatcher{1} ) +with expansion: + SpecialException::what special exception has value of 1 + +------------------------------------------------------------------------------- +Exception matchers that succeed +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: +PASSED: + CHECK_THROWS_MATCHES( throws(1), SpecialException, ExceptionMatcher{1} ) +with expansion: + SpecialException::what special exception has value of 1 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_MATCHES( throws(2), SpecialException, ExceptionMatcher{2} ) +with expansion: + SpecialException::what special exception has value of 2 + +------------------------------------------------------------------------------- +Exception messages can be tested for + exact match +------------------------------------------------------------------------------- +Exception.tests.cpp:<line number> +............................................................................... + +Exception.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) +with expansion: + "expected exception" equals: "expected exception" + +------------------------------------------------------------------------------- +Exception messages can be tested for + different case +------------------------------------------------------------------------------- +Exception.tests.cpp:<line number> +............................................................................... + +Exception.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_WITH( thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) ) +with expansion: + "expected exception" equals: "expected exception" (case insensitive) + +------------------------------------------------------------------------------- +Exception messages can be tested for + wildcarded +------------------------------------------------------------------------------- +Exception.tests.cpp:<line number> +............................................................................... + +Exception.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_WITH( thisThrows(), StartsWith( "expected" ) ) +with expansion: + "expected exception" starts with: "expected" + +Exception.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_WITH( thisThrows(), EndsWith( "exception" ) ) +with expansion: + "expected exception" ends with: "exception" + +Exception.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_WITH( thisThrows(), Contains( "except" ) ) +with expansion: + "expected exception" contains: "except" + +Exception.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_WITH( thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) ) +with expansion: + "expected exception" contains: "except" (case insensitive) + +------------------------------------------------------------------------------- +Expected exceptions that don't throw or unexpected exceptions fail the test +------------------------------------------------------------------------------- +Exception.tests.cpp:<line number> +............................................................................... + +Exception.tests.cpp:<line number>: FAILED: + CHECK_THROWS_AS( thisThrows(), std::string ) +due to unexpected exception with message: + expected exception + +Exception.tests.cpp:<line number>: FAILED: + CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) +because no exception was thrown where one was expected: + +Exception.tests.cpp:<line number>: FAILED: + CHECK_NOTHROW( thisThrows() ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +FAIL aborts the test +------------------------------------------------------------------------------- +Message.tests.cpp:<line number> +............................................................................... + +Message.tests.cpp:<line number>: FAILED: +explicitly with message: + This is a failure + +------------------------------------------------------------------------------- +FAIL does not require an argument +------------------------------------------------------------------------------- +Message.tests.cpp:<line number> +............................................................................... + +Message.tests.cpp:<line number>: FAILED: + +------------------------------------------------------------------------------- +FAIL_CHECK does not abort the test +------------------------------------------------------------------------------- +Message.tests.cpp:<line number> +............................................................................... + +Message.tests.cpp:<line number>: FAILED: +explicitly with message: + This is a failure + +Message.tests.cpp:<line number>: +warning: + This message appears in the output + +------------------------------------------------------------------------------- +Factorials are computed +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: +PASSED: + REQUIRE( Factorial(0) == 1 ) +with expansion: + 1 == 1 + +Misc.tests.cpp:<line number>: +PASSED: + REQUIRE( Factorial(1) == 1 ) +with expansion: + 1 == 1 + +Misc.tests.cpp:<line number>: +PASSED: + REQUIRE( Factorial(2) == 2 ) +with expansion: + 2 == 2 + +Misc.tests.cpp:<line number>: +PASSED: + REQUIRE( Factorial(3) == 6 ) +with expansion: + 6 == 6 + +Misc.tests.cpp:<line number>: +PASSED: + REQUIRE( Factorial(10) == 3628800 ) +with expansion: + 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) + +------------------------------------------------------------------------------- +Floating point matchers: double + Margin +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 1., WithinAbs(1., 0) ) +with expansion: + 1.0 is within 0.0 of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 0., WithinAbs(1., 1) ) +with expansion: + 0.0 is within 1.0 of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 0., !WithinAbs(1., 0.99) ) +with expansion: + 0.0 not is within 0.99 of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 0., !WithinAbs(1., 0.99) ) +with expansion: + 0.0 not is within 0.99 of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( NAN, !WithinAbs(NAN, 0) ) +with expansion: + nanf not is within 0.0 of nan + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 11., !WithinAbs(10., 0.5) ) +with expansion: + 11.0 not is within 0.5 of 10.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 10., !WithinAbs(11., 0.5) ) +with expansion: + 10.0 not is within 0.5 of 11.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( -10., WithinAbs(-10., 0.5) ) +with expansion: + -10.0 is within 0.5 of -10.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( -10., WithinAbs(-9.6, 0.5) ) +with expansion: + -10.0 is within 0.5 of -9.6 + +------------------------------------------------------------------------------- +Floating point matchers: double + ULPs +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 1., WithinULP(1., 0) ) +with expansion: + 1.0 is within 0 ULPs of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( nextafter(1., 2.), WithinULP(1., 1) ) +with expansion: + 1.0 is within 1 ULPs of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( nextafter(1., 0.), WithinULP(1., 1) ) +with expansion: + 1.0 is within 1 ULPs of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( nextafter(1., 2.), !WithinULP(1., 0) ) +with expansion: + 1.0 not is within 0 ULPs of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 1., WithinULP(1., 0) ) +with expansion: + 1.0 is within 0 ULPs of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( -0., WithinULP(0., 0) ) +with expansion: + -0.0 is within 0 ULPs of 0.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( NAN, !WithinULP(NAN, 123) ) +with expansion: + nanf not is within 123 ULPs of nanf + +------------------------------------------------------------------------------- +Floating point matchers: double + Composed +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 1., WithinAbs(1., 0.5) || WithinULP(2., 1) ) +with expansion: + 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0 ) + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 1., WithinAbs(2., 0.5) || WithinULP(1., 0) ) +with expansion: + 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0 ) + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) ) +with expansion: + nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) + +------------------------------------------------------------------------------- +Floating point matchers: double + Constructor validation +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_NOTHROW( WithinAbs(1., 0.) ) + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_AS( WithinAbs(1., -1.), std::domain_error ) + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_NOTHROW( WithinULP(1., 0) ) + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_AS( WithinULP(1., -1), std::domain_error ) + +------------------------------------------------------------------------------- +Floating point matchers: float + Margin +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 1.f, WithinAbs(1.f, 0) ) +with expansion: + 1.0f is within 0.0 of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 0.f, WithinAbs(1.f, 1) ) +with expansion: + 0.0f is within 1.0 of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 0.f, !WithinAbs(1.f, 0.99f) ) +with expansion: + 0.0f not is within 0.9900000095 of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 0.f, !WithinAbs(1.f, 0.99f) ) +with expansion: + 0.0f not is within 0.9900000095 of 1.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 0.f, WithinAbs(-0.f, 0) ) +with expansion: + 0.0f is within 0.0 of -0.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( NAN, !WithinAbs(NAN, 0) ) +with expansion: + nanf not is within 0.0 of nan + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 11.f, !WithinAbs(10.f, 0.5f) ) +with expansion: + 11.0f not is within 0.5 of 10.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 10.f, !WithinAbs(11.f, 0.5f) ) +with expansion: + 10.0f not is within 0.5 of 11.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( -10.f, WithinAbs(-10.f, 0.5f) ) +with expansion: + -10.0f is within 0.5 of -10.0 + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( -10.f, WithinAbs(-9.6f, 0.5f) ) +with expansion: + -10.0f is within 0.5 of -9.6000003815 + +------------------------------------------------------------------------------- +Floating point matchers: float + ULPs +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 1.f, WithinULP(1.f, 0) ) +with expansion: + 1.0f is within 0 ULPs of 1.0f + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( nextafter(1.f, 2.f), WithinULP(1.f, 1) ) +with expansion: + 1.0f is within 1 ULPs of 1.0f + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( nextafter(1.f, 0.f), WithinULP(1.f, 1) ) +with expansion: + 1.0f is within 1 ULPs of 1.0f + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( nextafter(1.f, 2.f), !WithinULP(1.f, 0) ) +with expansion: + 1.0f not is within 0 ULPs of 1.0f + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 1.f, WithinULP(1.f, 0) ) +with expansion: + 1.0f is within 0 ULPs of 1.0f + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( -0.f, WithinULP(0.f, 0) ) +with expansion: + -0.0f is within 0 ULPs of 0.0f + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( NAN, !WithinULP(NAN, 123) ) +with expansion: + nanf not is within 123 ULPs of nanf + +------------------------------------------------------------------------------- +Floating point matchers: float + Composed +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1) ) +with expansion: + 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f ) + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( 1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0) ) +with expansion: + 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f ) + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THAT( NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) ) +with expansion: + nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) + +------------------------------------------------------------------------------- +Floating point matchers: float + Constructor validation +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_NOTHROW( WithinAbs(1.f, 0.f) ) + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_AS( WithinAbs(1.f, -1.f), std::domain_error ) + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_NOTHROW( WithinULP(1.f, 0) ) + +Matchers.tests.cpp:<line number>: +PASSED: + REQUIRE_THROWS_AS( WithinULP(1.f, -1), std::domain_error ) + +------------------------------------------------------------------------------- +Generators + one +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: +with messages: + i := "a" + j := 8 + +------------------------------------------------------------------------------- +Generators + one +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: +with messages: + i := "a" + j := 9 + +------------------------------------------------------------------------------- +Generators + one +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: +with messages: + i := "a" + j := 10 + +------------------------------------------------------------------------------- +Generators + one +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: +with messages: + i := "a" + j := 2 + +------------------------------------------------------------------------------- +Generators + two +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: +with messages: + i := "a" + j := 3.141 + +------------------------------------------------------------------------------- +Generators + two +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: +with messages: + i := "a" + j := 1.379 + +------------------------------------------------------------------------------- +Generators + one +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: +with messages: + i := "b" + j := 8 + +------------------------------------------------------------------------------- +Generators + one +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: +with messages: + i := "b" + j := 9 + +------------------------------------------------------------------------------- +Generators + one +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: +with messages: + i := "b" + j := 10 + ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Generators + one +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 1., WithinULP(1., 0) ) -with expansion: - 1.0 is within 0 ULPs of 1.0 +with messages: + i := "b" + j := 2 -Matchers.tests.cpp:<line number>: -PASSED: - REQUIRE_THAT( nextafter(1., 2.), WithinULP(1., 1) ) -with expansion: - 1.0 is within 1 ULPs of 1.0 +------------------------------------------------------------------------------- +Generators + two +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Matchers.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( nextafter(1., 0.), WithinULP(1., 1) ) -with expansion: - 1.0 is within 1 ULPs of 1.0 +with messages: + i := "b" + j := 3.141 -Matchers.tests.cpp:<line number>: -PASSED: - REQUIRE_THAT( nextafter(1., 2.), !WithinULP(1., 0) ) -with expansion: - 1.0 not is within 0 ULPs of 1.0 +------------------------------------------------------------------------------- +Generators + two +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Matchers.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 1., WithinULP(1., 0) ) -with expansion: - 1.0 is within 0 ULPs of 1.0 +with messages: + i := "b" + j := 1.379 -Matchers.tests.cpp:<line number>: -PASSED: - REQUIRE_THAT( -0., WithinULP(0., 0) ) -with expansion: - -0.0 is within 0 ULPs of 0.0 +------------------------------------------------------------------------------- +Generators + one +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Matchers.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( NAN, !WithinULP(NAN, 123) ) -with expansion: - nanf not is within 123 ULPs of nanf +with messages: + i := "c" + j := 8 ------------------------------------------------------------------------------- -Floating point matchers: double - Composed +Generators + one ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 1., WithinAbs(1., 0.5) || WithinULP(2., 1) ) -with expansion: - 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0 ) +with messages: + i := "c" + j := 9 -Matchers.tests.cpp:<line number>: -PASSED: - REQUIRE_THAT( 1., WithinAbs(2., 0.5) || WithinULP(1., 0) ) -with expansion: - 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0 ) +------------------------------------------------------------------------------- +Generators + one +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Matchers.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) ) -with expansion: - nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) +with messages: + i := "c" + j := 10 ------------------------------------------------------------------------------- -Floating point matchers: double - Constructor validation +Generators + one ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: -PASSED: - REQUIRE_NOTHROW( WithinAbs(1., 0.) ) - -Matchers.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS_AS( WithinAbs(1., -1.), std::domain_error ) +with messages: + i := "c" + j := 2 -Matchers.tests.cpp:<line number>: -PASSED: - REQUIRE_NOTHROW( WithinULP(1., 0) ) +------------------------------------------------------------------------------- +Generators + two +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... -Matchers.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS_AS( WithinULP(1., -1), std::domain_error ) +with messages: + i := "c" + j := 3.141 ------------------------------------------------------------------------------- -Floating point matchers: float - Margin +Generators + two ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +Generators.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: +Generators.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 1.f, WithinAbs(1.f, 0) ) -with expansion: - 1.0f is within 0.0 of 1.0 +with messages: + i := "c" + j := 1.379 -Matchers.tests.cpp:<line number>: -PASSED: - REQUIRE_THAT( 0.f, WithinAbs(1.f, 1) ) -with expansion: - 0.0f is within 1.0 of 1.0 +------------------------------------------------------------------------------- +Generators impl + range +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp:<line number> +............................................................................... -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 0.f, !WithinAbs(1.f, 0.99f) ) + CHECK( gen.size() == 2 ) with expansion: - 0.0f not is within 0.9900000095 of 1.0 + 2 == 2 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 0.f, !WithinAbs(1.f, 0.99f) ) + CHECK( gen[0] == 1 ) with expansion: - 0.0f not is within 0.9900000095 of 1.0 + 1 == 1 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 0.f, WithinAbs(-0.f, 0) ) + CHECK( gen[1] == 2 ) with expansion: - 0.0f is within 0.0 of -0.0 + 2 == 2 -Matchers.tests.cpp:<line number>: +------------------------------------------------------------------------------- +Generators impl + fixed values +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp:<line number> +............................................................................... + +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( NAN, !WithinAbs(NAN, 0) ) + CHECK( gen.size() == 4 ) with expansion: - nanf not is within 0.0 of nan + 4 == 4 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 11.f, !WithinAbs(10.f, 0.5f) ) + CHECK( gen[0] == 3 ) with expansion: - 11.0f not is within 0.5 of 10.0 + 3 == 3 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 10.f, !WithinAbs(11.f, 0.5f) ) + CHECK( gen[1] == 1 ) with expansion: - 10.0f not is within 0.5 of 11.0 + 1 == 1 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( -10.f, WithinAbs(-10.f, 0.5f) ) + CHECK( gen[2] == 4 ) with expansion: - -10.0f is within 0.5 of -10.0 + 4 == 4 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( -10.f, WithinAbs(-9.6f, 0.5f) ) + CHECK( gen[3] == 1 ) with expansion: - -10.0f is within 0.5 of -9.6000003815 + 1 == 1 ------------------------------------------------------------------------------- -Floating point matchers: float - ULPs +Generators impl + combined ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +GeneratorsImpl.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 1.f, WithinULP(1.f, 0) ) + CHECK( gen.size() == 4 ) with expansion: - 1.0f is within 0 ULPs of 1.0f + 4 == 4 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( nextafter(1.f, 2.f), WithinULP(1.f, 1) ) + CHECK( gen[0] == 1 ) with expansion: - 1.0f is within 1 ULPs of 1.0f + 1 == 1 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( nextafter(1.f, 0.f), WithinULP(1.f, 1) ) + CHECK( gen[1] == 2 ) with expansion: - 1.0f is within 1 ULPs of 1.0f + 2 == 2 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( nextafter(1.f, 2.f), !WithinULP(1.f, 0) ) + CHECK( gen[2] == 9 ) with expansion: - 1.0f not is within 0 ULPs of 1.0f + 9 == 9 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 1.f, WithinULP(1.f, 0) ) + CHECK( gen[3] == 7 ) with expansion: - 1.0f is within 0 ULPs of 1.0f + 7 == 7 -Matchers.tests.cpp:<line number>: +------------------------------------------------------------------------------- +Generators impl + values +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp:<line number> +............................................................................... + +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( -0.f, WithinULP(0.f, 0) ) + CHECK( gen.size() == 2 ) with expansion: - -0.0f is within 0 ULPs of 0.0f + 2 == 2 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( NAN, !WithinULP(NAN, 123) ) + CHECK( gen[0] == 3 ) with expansion: - nanf not is within 123 ULPs of nanf + 3 == 3 + +GeneratorsImpl.tests.cpp:<line number>: +PASSED: + CHECK( gen[1] == 1 ) +with expansion: + 1 == 1 ------------------------------------------------------------------------------- -Floating point matchers: float - Composed +Generators impl + values2 ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +GeneratorsImpl.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1) ) + CHECK( gen.size() == 2 ) with expansion: - 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f ) + 2 == 2 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( 1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0) ) + CHECK( gen[0] == 3 ) with expansion: - 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f ) + 3 == 3 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THAT( NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) ) + CHECK( gen[1] == 1 ) with expansion: - nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) + 1 == 1 ------------------------------------------------------------------------------- -Floating point matchers: float - Constructor validation +Generators impl + type erasure ------------------------------------------------------------------------------- -Matchers.tests.cpp:<line number> +GeneratorsImpl.tests.cpp:<line number> ............................................................................... -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_NOTHROW( WithinAbs(1.f, 0.f) ) + CHECK( base->size() == 4 ) +with expansion: + 4 == 4 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS_AS( WithinAbs(1.f, -1.f), std::domain_error ) + REQUIRE( typed ) +with expansion: + 0x<hex digits> -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_NOTHROW( WithinULP(1.f, 0) ) + CHECK( typed->size() == 4 ) +with expansion: + 4 == 4 -Matchers.tests.cpp:<line number>: +GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS_AS( WithinULP(1.f, -1), std::domain_error ) + CHECK( (*typed)[0] == 7 ) +with expansion: + 7 == 7 + +GeneratorsImpl.tests.cpp:<line number>: +PASSED: + CHECK( (*typed)[3] == 11 ) +with expansion: + 11 == 11 ------------------------------------------------------------------------------- Greater-than inequalities with different epsilons @@ -8621,6 +10241,54 @@ with expansion: == "{ operator<<( has_operator ) }" +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 5 == 5 + +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: +PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 4 == 4 + ------------------------------------------------------------------------------- thrown std::strings are translated ------------------------------------------------------------------------------- @@ -9152,6 +10820,6 @@ Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 208 | 142 passed | 62 failed | 4 failed as expected -assertions: 1095 | 952 passed | 122 failed | 21 failed as expected +test cases: 212 | 146 passed | 62 failed | 4 failed as expected +assertions: 1241 | 1098 passed | 122 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index fb66299d..b843b904 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuitesloose text artifact > - <testsuite name="<exe-name>" errors="17" failures="106" tests="1096" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="106" tests="1242" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}"/> <testcase classname="<exe-name>.global" name="#1005: Comparing pointer to int and long (NULL can be either on various systems)" time="{duration}"/> <testcase classname="<exe-name>.global" name="#1027" time="{duration}"/> @@ -69,6 +69,7 @@ Condition.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/negation" time="{duration}"/> <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/double negation" time="{duration}"/> <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/direct" time="{duration}"/> + <testcase classname="<exe-name>.global" name="10x10 ints" time="{duration}"/> <testcase classname="<exe-name>.TestClass" name="A METHOD_AS_TEST_CASE based test run that fails" time="{duration}"> <failure message=""hello" == "world"" type="REQUIRE"> Class.tests.cpp:<line number> @@ -289,6 +290,14 @@ Message.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Floating point matchers: float/ULPs" time="{duration}"/> <testcase classname="<exe-name>.global" name="Floating point matchers: float/Composed" time="{duration}"/> <testcase classname="<exe-name>.global" name="Floating point matchers: float/Constructor validation" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators/one" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators/two" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators impl/range" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators impl/fixed values" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators impl/combined" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators impl/values" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators impl/values2" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators impl/type erasure" time="{duration}"/> <testcase classname="<exe-name>.global" name="Greater-than inequalities with different epsilons" time="{duration}"/> <testcase classname="<exe-name>.global" name="INFO and WARN do not abort tests" time="{duration}"/> <testcase classname="<exe-name>.global" name="INFO gets logged on failure" time="{duration}"> @@ -855,6 +864,7 @@ Tricky.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="stringify( vectors<has_maker> )" time="{duration}"/> <testcase classname="<exe-name>.global" name="stringify( vectors<has_maker_and_operator> )" time="{duration}"/> <testcase classname="<exe-name>.global" name="stringify( vectors<has_operator> )" time="{duration}"/> + <testcase classname="<exe-name>.global" name="strlen3" time="{duration}"/> <testcase classname="<exe-name>.global" name="thrown std::strings are translated" time="{duration}"> <error type="TEST_CASE"> Why would you throw a std::string? diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index 449448ce..b99bbf2d 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -510,6 +510,809 @@ </Section> <OverallResult success="true"/> </TestCase> + <TestCase name="10x10 ints" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 1 < 101 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 1 < 102 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 1 < 103 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 1 < 104 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 1 < 105 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 1 < 106 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 1 < 107 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 1 < 108 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 1 < 109 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 1 < 110 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 2 < 101 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 2 < 102 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 2 < 103 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 2 < 104 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 2 < 105 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 2 < 106 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 2 < 107 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 2 < 108 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 2 < 109 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 2 < 110 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 3 < 101 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 3 < 102 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 3 < 103 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 3 < 104 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 3 < 105 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 3 < 106 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 3 < 107 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 3 < 108 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 3 < 109 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 3 < 110 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 4 < 101 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 4 < 102 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 4 < 103 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 4 < 104 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 4 < 105 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 4 < 106 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 4 < 107 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 4 < 108 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 4 < 109 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 4 < 110 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 5 < 101 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 5 < 102 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 5 < 103 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 5 < 104 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 5 < 105 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 5 < 106 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 5 < 107 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 5 < 108 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 5 < 109 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 5 < 110 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 6 < 101 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 6 < 102 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 6 < 103 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 6 < 104 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 6 < 105 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 6 < 106 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 6 < 107 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 6 < 108 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 6 < 109 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 6 < 110 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 7 < 101 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 7 < 102 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 7 < 103 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 7 < 104 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 7 < 105 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 7 < 106 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 7 < 107 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 7 < 108 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 7 < 109 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 7 < 110 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 8 < 101 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 8 < 102 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 8 < 103 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 8 < 104 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 8 < 105 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 8 < 106 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 8 < 107 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 8 < 108 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 8 < 109 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 8 < 110 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 9 < 101 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 9 < 102 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 9 < 103 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 9 < 104 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 9 < 105 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 9 < 106 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 9 < 107 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 9 < 108 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 9 < 109 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 9 < 110 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 10 < 101 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 10 < 102 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 10 < 103 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 10 < 104 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 10 < 105 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 10 < 106 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 10 < 107 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 10 < 108 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 10 < 109 + </Expanded> + </Expression> + <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + x < y + </Original> + <Expanded> + 10 < 110 + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> <TestCase name="A METHOD_AS_TEST_CASE based test run that fails" tags="[.][class][failing]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" > <Original> @@ -2399,233 +3202,611 @@ WithinAbs(1., -1.), std::domain_error </Original> <Expanded> - WithinAbs(1., -1.), std::domain_error + WithinAbs(1., -1.), std::domain_error + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_NOTHROW" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + WithinULP(1., 0) + </Original> + <Expanded> + WithinULP(1., 0) + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + WithinULP(1., -1), std::domain_error + </Original> + <Expanded> + WithinULP(1., -1), std::domain_error + </Expanded> + </Expression> + <OverallResults successes="4" failures="0" expectedFailures="0"/> + </Section> + <OverallResult success="true"/> + </TestCase> + <TestCase name="Floating point matchers: float" tags="[floating-point][matchers]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Section name="Margin" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 1.f, WithinAbs(1.f, 0) + </Original> + <Expanded> + 1.0f is within 0.0 of 1.0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 0.f, WithinAbs(1.f, 1) + </Original> + <Expanded> + 0.0f is within 1.0 of 1.0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 0.f, !WithinAbs(1.f, 0.99f) + </Original> + <Expanded> + 0.0f not is within 0.9900000095 of 1.0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 0.f, !WithinAbs(1.f, 0.99f) + </Original> + <Expanded> + 0.0f not is within 0.9900000095 of 1.0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 0.f, WithinAbs(-0.f, 0) + </Original> + <Expanded> + 0.0f is within 0.0 of -0.0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + NAN, !WithinAbs(NAN, 0) + </Original> + <Expanded> + nanf not is within 0.0 of nan + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 11.f, !WithinAbs(10.f, 0.5f) + </Original> + <Expanded> + 11.0f not is within 0.5 of 10.0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 10.f, !WithinAbs(11.f, 0.5f) + </Original> + <Expanded> + 10.0f not is within 0.5 of 11.0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + -10.f, WithinAbs(-10.f, 0.5f) + </Original> + <Expanded> + -10.0f is within 0.5 of -10.0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + -10.f, WithinAbs(-9.6f, 0.5f) + </Original> + <Expanded> + -10.0f is within 0.5 of -9.6000003815 + </Expanded> + </Expression> + <OverallResults successes="10" failures="0" expectedFailures="0"/> + </Section> + <Section name="ULPs" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 1.f, WithinULP(1.f, 0) + </Original> + <Expanded> + 1.0f is within 0 ULPs of 1.0f + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + nextafter(1.f, 2.f), WithinULP(1.f, 1) + </Original> + <Expanded> + 1.0f is within 1 ULPs of 1.0f + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + nextafter(1.f, 0.f), WithinULP(1.f, 1) + </Original> + <Expanded> + 1.0f is within 1 ULPs of 1.0f + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + nextafter(1.f, 2.f), !WithinULP(1.f, 0) + </Original> + <Expanded> + 1.0f not is within 0 ULPs of 1.0f + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 1.f, WithinULP(1.f, 0) + </Original> + <Expanded> + 1.0f is within 0 ULPs of 1.0f + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + -0.f, WithinULP(0.f, 0) + </Original> + <Expanded> + -0.0f is within 0 ULPs of 0.0f + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + NAN, !WithinULP(NAN, 123) + </Original> + <Expanded> + nanf not is within 123 ULPs of nanf + </Expanded> + </Expression> + <OverallResults successes="7" failures="0" expectedFailures="0"/> + </Section> + <Section name="Composed" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1) + </Original> + <Expanded> + 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f ) + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0) + </Original> + <Expanded> + 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f ) + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) + </Original> + <Expanded> + nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) + </Expanded> + </Expression> + <OverallResults successes="3" failures="0" expectedFailures="0"/> + </Section> + <Section name="Constructor validation" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="REQUIRE_NOTHROW" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + WithinAbs(1.f, 0.f) + </Original> + <Expanded> + WithinAbs(1.f, 0.f) + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + WithinAbs(1.f, -1.f), std::domain_error + </Original> + <Expanded> + WithinAbs(1.f, -1.f), std::domain_error </Expanded> </Expression> <Expression success="true" type="REQUIRE_NOTHROW" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > <Original> - WithinULP(1., 0) + WithinULP(1.f, 0) </Original> <Expanded> - WithinULP(1., 0) + WithinULP(1.f, 0) </Expanded> </Expression> <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > <Original> - WithinULP(1., -1), std::domain_error + WithinULP(1.f, -1), std::domain_error </Original> <Expanded> - WithinULP(1., -1), std::domain_error + WithinULP(1.f, -1), std::domain_error </Expanded> </Expression> <OverallResults successes="4" failures="0" expectedFailures="0"/> </Section> <OverallResult success="true"/> </TestCase> - <TestCase name="Floating point matchers: float" tags="[floating-point][matchers]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > - <Section name="Margin" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <TestCase name="Generators" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "a" + </Info> + <Info> + j := 8 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "a" + </Info> + <Info> + j := 9 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "a" + </Info> + <Info> + j := 10 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "a" + </Info> + <Info> + j := 2 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "a" + </Info> + <Info> + j := 3.141 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "a" + </Info> + <Info> + j := 1.379 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "b" + </Info> + <Info> + j := 8 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "b" + </Info> + <Info> + j := 9 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "b" + </Info> + <Info> + j := 10 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "b" + </Info> + <Info> + j := 2 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "b" + </Info> + <Info> + j := 3.141 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "b" + </Info> + <Info> + j := 1.379 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "c" + </Info> + <Info> + j := 8 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "c" + </Info> + <Info> + j := 9 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "c" + </Info> + <Info> + j := 10 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "c" + </Info> + <Info> + j := 2 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "c" + </Info> + <Info> + j := 3.141 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Info> + i := "c" + </Info> + <Info> + j := 1.379 + </Info> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <OverallResult success="true"/> + </TestCase> + <TestCase name="Generators impl" tags="[impl]" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Section name="range" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - 1.f, WithinAbs(1.f, 0) + gen.size() == 2 </Original> <Expanded> - 1.0f is within 0.0 of 1.0 + 2 == 2 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - 0.f, WithinAbs(1.f, 1) + gen[0] == 1 </Original> <Expanded> - 0.0f is within 1.0 of 1.0 + 1 == 1 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - 0.f, !WithinAbs(1.f, 0.99f) + gen[1] == 2 </Original> <Expanded> - 0.0f not is within 0.9900000095 of 1.0 + 2 == 2 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <OverallResults successes="3" failures="0" expectedFailures="0"/> + </Section> + <Section name="fixed values" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - 0.f, !WithinAbs(1.f, 0.99f) + gen.size() == 4 </Original> <Expanded> - 0.0f not is within 0.9900000095 of 1.0 + 4 == 4 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - 0.f, WithinAbs(-0.f, 0) + gen[0] == 3 </Original> <Expanded> - 0.0f is within 0.0 of -0.0 + 3 == 3 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - NAN, !WithinAbs(NAN, 0) + gen[1] == 1 </Original> <Expanded> - nanf not is within 0.0 of nan + 1 == 1 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - 11.f, !WithinAbs(10.f, 0.5f) + gen[2] == 4 </Original> <Expanded> - 11.0f not is within 0.5 of 10.0 + 4 == 4 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - 10.f, !WithinAbs(11.f, 0.5f) + gen[3] == 1 </Original> <Expanded> - 10.0f not is within 0.5 of 11.0 + 1 == 1 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <OverallResults successes="5" failures="0" expectedFailures="0"/> + </Section> + <Section name="combined" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - -10.f, WithinAbs(-10.f, 0.5f) + gen.size() == 4 </Original> <Expanded> - -10.0f is within 0.5 of -10.0 + 4 == 4 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - -10.f, WithinAbs(-9.6f, 0.5f) + gen[0] == 1 </Original> <Expanded> - -10.0f is within 0.5 of -9.6000003815 + 1 == 1 </Expanded> </Expression> - <OverallResults successes="10" failures="0" expectedFailures="0"/> - </Section> - <Section name="ULPs" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - 1.f, WithinULP(1.f, 0) + gen[1] == 2 </Original> <Expanded> - 1.0f is within 0 ULPs of 1.0f + 2 == 2 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - nextafter(1.f, 2.f), WithinULP(1.f, 1) + gen[2] == 9 </Original> <Expanded> - 1.0f is within 1 ULPs of 1.0f + 9 == 9 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - nextafter(1.f, 0.f), WithinULP(1.f, 1) + gen[3] == 7 </Original> <Expanded> - 1.0f is within 1 ULPs of 1.0f + 7 == 7 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <OverallResults successes="5" failures="0" expectedFailures="0"/> + </Section> + <Section name="values" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - nextafter(1.f, 2.f), !WithinULP(1.f, 0) + gen.size() == 2 </Original> <Expanded> - 1.0f not is within 0 ULPs of 1.0f + 2 == 2 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - 1.f, WithinULP(1.f, 0) + gen[0] == 3 </Original> <Expanded> - 1.0f is within 0 ULPs of 1.0f + 3 == 3 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - -0.f, WithinULP(0.f, 0) + gen[1] == 1 </Original> <Expanded> - -0.0f is within 0 ULPs of 0.0f + 1 == 1 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <OverallResults successes="3" failures="0" expectedFailures="0"/> + </Section> + <Section name="values2" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - NAN, !WithinULP(NAN, 123) + gen.size() == 2 </Original> <Expanded> - nanf not is within 123 ULPs of nanf + 2 == 2 </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> - </Section> - <Section name="Composed" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - 1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1) + gen[0] == 3 </Original> <Expanded> - 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f ) + 3 == 3 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - 1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0) + gen[1] == 1 </Original> <Expanded> - 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f ) + 1 == 1 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <OverallResults successes="3" failures="0" expectedFailures="0"/> + </Section> + <Section name="type erasure" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) + base->size() == 4 </Original> <Expanded> - nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf ) + 4 == 4 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> - </Section> - <Section name="Constructor validation" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > - <Expression success="true" type="REQUIRE_NOTHROW" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - WithinAbs(1.f, 0.f) + typed </Original> <Expanded> - WithinAbs(1.f, 0.f) + 0x<hex digits> </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - WithinAbs(1.f, -1.f), std::domain_error + typed->size() == 4 </Original> <Expanded> - WithinAbs(1.f, -1.f), std::domain_error + 4 == 4 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_NOTHROW" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - WithinULP(1.f, 0) + (*typed)[0] == 7 </Original> <Expanded> - WithinULP(1.f, 0) + 7 == 7 </Expanded> </Expression> - <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - WithinULP(1.f, -1), std::domain_error + (*typed)[3] == 11 </Original> <Expanded> - WithinULP(1.f, -1), std::domain_error + 11 == 11 </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0"/> </Section> <OverallResult success="true"/> </TestCase> @@ -9573,6 +10754,41 @@ loose text artifact </Expression> <OverallResult success="true"/> </TestCase> + <TestCase name="strlen3" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + data.str.size() == data.len + </Original> + <Expanded> + 3 == 3 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + data.str.size() == data.len + </Original> + <Expanded> + 3 == 3 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + data.str.size() == data.len + </Original> + <Expanded> + 5 == 5 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + data.str.size() == data.len + </Original> + <Expanded> + 4 == 4 + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> <TestCase name="thrown std::strings are translated" tags="[!throws][.][failing]" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" > Why would you throw a std::string? @@ -10091,7 +11307,7 @@ loose text artifact </Section> <OverallResult success="true"/> </TestCase> - <OverallResults successes="952" failures="123" expectedFailures="21"/> + <OverallResults successes="1098" failures="123" expectedFailures="21"/> </Group> - <OverallResults successes="952" failures="122" expectedFailures="21"/> + <OverallResults successes="1098" failures="122" expectedFailures="21"/> </Catch>