diff --git a/tests/SelfTest/Baselines/automake.sw.approved.txt b/tests/SelfTest/Baselines/automake.sw.approved.txt index 05a96c7a..4465d1e1 100644 --- a/tests/SelfTest/Baselines/automake.sw.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.approved.txt @@ -278,8 +278,6 @@ Message from section two :test-result: FAIL When unchecked exceptions are thrown from functions they are always failures :test-result: FAIL When unchecked exceptions are thrown from sections they are always failures :test-result: FAIL When unchecked exceptions are thrown, but caught, they do not affect the test -:test-result: FAIL Where the LHS is not a simple value -:test-result: FAIL Where there is more to the expression after the RHS :test-result: PASS X/level/0/a :test-result: PASS X/level/0/b :test-result: PASS X/level/1/a @@ -288,7 +286,6 @@ Message from section two :test-result: PASS XmlWriter writes boolean attributes as true/false :test-result: PASS analyse no analysis :test-result: PASS array -> toString -:test-result: PASS atomic if :test-result: PASS benchmark function call :test-result: PASS boolean member :test-result: PASS checkedElse @@ -351,7 +348,6 @@ loose text artifact :test-result: PASS std::pair -> toString :test-result: PASS std::set is convertible string :test-result: PASS std::vector > -> toString -:test-result: FAIL string literals of different sizes can be compared :test-result: PASS stringify ranges :test-result: PASS stringify( has_maker ) :test-result: PASS stringify( has_maker_and_operator ) diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt index 390e9a6e..f7aaa5b3 100644 --- a/tests/SelfTest/Baselines/compact.sw.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -2032,8 +2032,6 @@ Exception.tests.cpp:: failed: unexpected exception with message: 'e Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 Exception.tests.cpp:: failed: unexpected exception with message: 'unexpected exception' -Tricky.tests.cpp:: warning: 'Uncomment the code in this test to check that it gives a sensible compiler error' -Tricky.tests.cpp:: warning: 'Uncomment the code in this test to check that it gives a sensible compiler error' Tricky.tests.cpp:: passed: Tricky.tests.cpp:: passed: Tricky.tests.cpp:: passed: @@ -2073,7 +2071,6 @@ InternalBenchmark.tests.cpp:: passed: analysis.outlier_variance == ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( empty ) == "{ }" for: "{ }" == "{ }" ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( oneValue ) == "{ 42 }" for: "{ 42 }" == "{ 42 }" ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" -Misc.tests.cpp:: passed: x == 0 for: 0 == 0 InternalBenchmark.tests.cpp:: passed: model.started == 1 for: 1 == 1 InternalBenchmark.tests.cpp:: passed: model.finished == 0 for: 0 == 0 InternalBenchmark.tests.cpp:: passed: model.started == 1 for: 1 == 1 @@ -2321,7 +2318,6 @@ ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( set ) ToStringPair.tests.cpp:: passed: ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" for: "{ { "green", 55 } }" == "{ { "green", 55 } }" -Tricky.tests.cpp:: failed: std::string( "first" ) == "second" for: "first" == "second" ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" for: "op<<(streamable_range)" == "op<<(streamable_range)" @@ -2461,5 +2457,5 @@ InternalBenchmark.tests.cpp:: passed: med == 18. for: 18.0 == 18.0 InternalBenchmark.tests.cpp:: passed: q3 == 23. for: 23.0 == 23.0 Misc.tests.cpp:: passed: Misc.tests.cpp:: passed: -Failed 86 test cases, failed 146 assertions. +Failed 83 test cases, failed 143 assertions. diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt index fb5b2b28..51bb9e52 100644 --- a/tests/SelfTest/Baselines/console.std.approved.txt +++ b/tests/SelfTest/Baselines/console.std.approved.txt @@ -1165,26 +1165,6 @@ Exception.tests.cpp:: FAILED: due to unexpected exception with message: unexpected exception -------------------------------------------------------------------------------- -Where the LHS is not a simple value -------------------------------------------------------------------------------- -Tricky.tests.cpp: -............................................................................... - -Tricky.tests.cpp:: warning: - Uncomment the code in this test to check that it gives a sensible compiler - error - -------------------------------------------------------------------------------- -Where there is more to the expression after the RHS -------------------------------------------------------------------------------- -Tricky.tests.cpp: -............................................................................... - -Tricky.tests.cpp:: warning: - Uncomment the code in this test to check that it gives a sensible compiler - error - ------------------------------------------------------------------------------- checkedElse, failing ------------------------------------------------------------------------------- @@ -1404,17 +1384,6 @@ with messages: 5 6 -------------------------------------------------------------------------------- -string literals of different sizes can be compared -------------------------------------------------------------------------------- -Tricky.tests.cpp: -............................................................................... - -Tricky.tests.cpp:: FAILED: - REQUIRE( std::string( "first" ) == "second" ) -with expansion: - "first" == "second" - ------------------------------------------------------------------------------- thrown std::strings are translated ------------------------------------------------------------------------------- @@ -1426,6 +1395,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 384 | 307 passed | 70 failed | 7 failed as expected -assertions: 2185 | 2029 passed | 129 failed | 27 failed as expected +test cases: 380 | 304 passed | 69 failed | 7 failed as expected +assertions: 2183 | 2028 passed | 128 failed | 27 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt index 65baafcf..a037f16f 100644 --- a/tests/SelfTest/Baselines/console.sw.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.approved.txt @@ -14495,32 +14495,6 @@ Exception.tests.cpp: No assertions in test case 'When unchecked exceptions are thrown, but caught, they do not affect the test' -------------------------------------------------------------------------------- -Where the LHS is not a simple value -------------------------------------------------------------------------------- -Tricky.tests.cpp: -............................................................................... - -Tricky.tests.cpp:: warning: - Uncomment the code in this test to check that it gives a sensible compiler - error - - -No assertions in test case 'Where the LHS is not a simple value' - -------------------------------------------------------------------------------- -Where there is more to the expression after the RHS -------------------------------------------------------------------------------- -Tricky.tests.cpp: -............................................................................... - -Tricky.tests.cpp:: warning: - Uncomment the code in this test to check that it gives a sensible compiler - error - - -No assertions in test case 'Where there is more to the expression after the RHS' - ------------------------------------------------------------------------------- X/level/0/a ------------------------------------------------------------------------------- @@ -14770,17 +14744,6 @@ ToStringVector.tests.cpp:: PASSED: with expansion: "{ 42, 250 }" == "{ 42, 250 }" -------------------------------------------------------------------------------- -atomic if -------------------------------------------------------------------------------- -Misc.tests.cpp: -............................................................................... - -Misc.tests.cpp:: PASSED: - REQUIRE( x == 0 ) -with expansion: - 0 == 0 - ------------------------------------------------------------------------------- benchmark function call without chronometer @@ -16597,17 +16560,6 @@ with expansion: == "{ { "green", 55 } }" -------------------------------------------------------------------------------- -string literals of different sizes can be compared -------------------------------------------------------------------------------- -Tricky.tests.cpp: -............................................................................... - -Tricky.tests.cpp:: FAILED: - REQUIRE( std::string( "first" ) == "second" ) -with expansion: - "first" == "second" - ------------------------------------------------------------------------------- stringify ranges ------------------------------------------------------------------------------- @@ -17564,6 +17516,6 @@ Misc.tests.cpp: Misc.tests.cpp:: PASSED: =============================================================================== -test cases: 384 | 291 passed | 86 failed | 7 failed as expected -assertions: 2202 | 2029 passed | 146 failed | 27 failed as expected +test cases: 380 | 290 passed | 83 failed | 7 failed as expected +assertions: 2198 | 2028 passed | 143 failed | 27 failed as expected diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt index 9132e982..090b34c4 100644 --- a/tests/SelfTest/Baselines/junit.sw.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ - + @@ -1563,8 +1563,6 @@ unexpected exception Exception.tests.cpp: - - @@ -1580,7 +1578,6 @@ Exception.tests.cpp: - @@ -1829,15 +1826,6 @@ Message.tests.cpp: - - -FAILED: - REQUIRE( std::string( "first" ) == "second" ) -with expansion: - "first" == "second" -Tricky.tests.cpp: - - diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt index ee0df2e4..82f675f6 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -1665,7 +1665,6 @@ Misc.tests.cpp: - @@ -1899,8 +1898,6 @@ Tricky.tests.cpp: - - @@ -1910,15 +1907,6 @@ Tricky.tests.cpp: - - -FAILED: - REQUIRE( std::string( "first" ) == "second" ) -with expansion: - "first" == "second" -Tricky.tests.cpp: - - diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index 0a587189..47d59ade 100644 --- a/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -3653,10 +3653,6 @@ not ok {test-number} - unexpected exception with message: 'expected exception'; not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 # When unchecked exceptions are thrown from sections they are always failures not ok {test-number} - unexpected exception with message: 'unexpected exception' -# Where the LHS is not a simple value -warning {test-number} - 'Uncomment the code in this test to check that it gives a sensible compiler error' -# Where there is more to the expression after the RHS -warning {test-number} - 'Uncomment the code in this test to check that it gives a sensible compiler error' # X/level/0/a ok {test-number} - # X/level/0/b @@ -3719,8 +3715,6 @@ ok {test-number} - Catch::Detail::stringify( empty ) == "{ }" for: "{ }" == "{ ok {test-number} - Catch::Detail::stringify( oneValue ) == "{ 42 }" for: "{ 42 }" == "{ 42 }" # array -> toString ok {test-number} - Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" -# atomic if -ok {test-number} - x == 0 for: 0 == 0 # benchmark function call ok {test-number} - model.started == 1 for: 1 == 1 # benchmark function call @@ -4186,8 +4180,6 @@ ok {test-number} - Catch::Detail::stringify( set ) == "{ \"one\" }" for: "{ "one ok {test-number} - Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" for: "{ "abc", "def", "ghi" }" == "{ "abc", "def", "ghi" }" # std::vector > -> toString ok {test-number} - ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" for: "{ { "green", 55 } }" == "{ { "green", 55 } }" -# string literals of different sizes can be compared -not ok {test-number} - std::string( "first" ) == "second" for: "first" == "second" # stringify ranges ok {test-number} - ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" for: "op<<(streamable_range)" == "op<<(streamable_range)" # stringify ranges @@ -4406,5 +4398,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2202 +1..2198 diff --git a/tests/SelfTest/Baselines/teamcity.sw.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.approved.txt index 4f2193fd..d413fcac 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.approved.txt @@ -684,10 +684,6 @@ Exception.tests.cpp:|nunexpected exception with message:|n "unexpe ##teamcity[testFinished name='When unchecked exceptions are thrown from sections they are always failures' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown, but caught, they do not affect the test'] ##teamcity[testFinished name='When unchecked exceptions are thrown, but caught, they do not affect the test' duration="{duration}"] -##teamcity[testStarted name='Where the LHS is not a simple value'] -##teamcity[testFinished name='Where the LHS is not a simple value' duration="{duration}"] -##teamcity[testStarted name='Where there is more to the expression after the RHS'] -##teamcity[testFinished name='Where there is more to the expression after the RHS' duration="{duration}"] ##teamcity[testStarted name='X/level/0/a'] ##teamcity[testFinished name='X/level/0/a' duration="{duration}"] ##teamcity[testStarted name='X/level/0/b'] @@ -704,8 +700,6 @@ Exception.tests.cpp:|nunexpected exception with message:|n "unexpe ##teamcity[testFinished name='analyse no analysis' duration="{duration}"] ##teamcity[testStarted name='array -> toString'] ##teamcity[testFinished name='array -> toString' duration="{duration}"] -##teamcity[testStarted name='atomic if'] -##teamcity[testFinished name='atomic if' duration="{duration}"] ##teamcity[testStarted name='benchmark function call'] ##teamcity[testFinished name='benchmark function call' duration="{duration}"] ##teamcity[testStarted name='boolean member'] @@ -849,9 +843,6 @@ Message.tests.cpp:|nexpression failed with messages:|n "Count 4 to ##teamcity[testFinished name='std::set is convertible string' duration="{duration}"] ##teamcity[testStarted name='std::vector > -> toString'] ##teamcity[testFinished name='std::vector > -> toString' duration="{duration}"] -##teamcity[testStarted name='string literals of different sizes can be compared'] -Tricky.tests.cpp:|nexpression failed|n REQUIRE( std::string( "first" ) == "second" )|nwith expansion:|n "first" == "second"|n'] -##teamcity[testFinished name='string literals of different sizes can be compared' duration="{duration}"] ##teamcity[testStarted name='stringify ranges'] ##teamcity[testFinished name='stringify ranges' duration="{duration}"] ##teamcity[testStarted name='stringify( has_maker )'] diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt index fd542b29..1fc5d63b 100644 --- a/tests/SelfTest/Baselines/xml.sw.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -17091,18 +17091,6 @@ There is no extra whitespace here - - - Uncomment the code in this test to check that it gives a sensible compiler error - - - - - - Uncomment the code in this test to check that it gives a sensible compiler error - - - @@ -17375,17 +17363,6 @@ There is no extra whitespace here - - - - x == 0 - - - 0 == 0 - - - -
@@ -19541,17 +19518,6 @@ loose text artifact - - - - std::string( "first" ) == "second" - - - "first" == "second" - - - - @@ -20595,6 +20561,6 @@ loose text artifact
- - + + diff --git a/tests/SelfTest/UsageTests/Misc.tests.cpp b/tests/SelfTest/UsageTests/Misc.tests.cpp index 464eb87c..2d40a6b1 100644 --- a/tests/SelfTest/UsageTests/Misc.tests.cpp +++ b/tests/SelfTest/UsageTests/Misc.tests.cpp @@ -227,16 +227,6 @@ TEST_CASE( "send a single char to INFO", "[failing][.]" ) { REQUIRE(false); } -TEST_CASE( "atomic if", "[failing][0]") { - std::size_t x = 0; - - if( x ) - REQUIRE(x > 0); - else - REQUIRE(x == 0); -} - - TEST_CASE( "Factorials are computed", "[factorial]" ) { REQUIRE( Factorial(0) == 1 ); REQUIRE( Factorial(1) == 1 ); @@ -432,10 +422,6 @@ TEST_CASE("not allowed", "[!throws]") { SUCCEED(); } -//TEST_CASE( "Is big endian" ) { -// CHECK( Catch::Detail::Endianness::which() == Catch::Detail::Endianness::Little ); -//} - TEST_CASE( "Tabs and newlines show in output", "[.][whitespace][failing]" ) { // Based on issue #242 diff --git a/tests/SelfTest/UsageTests/Tricky.tests.cpp b/tests/SelfTest/UsageTests/Tricky.tests.cpp index eed763f2..03f15032 100644 --- a/tests/SelfTest/UsageTests/Tricky.tests.cpp +++ b/tests/SelfTest/UsageTests/Tricky.tests.cpp @@ -20,34 +20,6 @@ #include #include -/////////////////////////////////////////////////////////////////////////////// -TEST_CASE -( - "Where there is more to the expression after the RHS", - "[Tricky][failing][.]" -) -{ -// int a = 1, b = 2; -// REQUIRE( a == 2 || b == 2 ); - WARN( "Uncomment the code in this test to check that it gives a sensible compiler error" ); -} -/////////////////////////////////////////////////////////////////////////////// -TEST_CASE -( - "Where the LHS is not a simple value", - "[Tricky][failing][.]" -) -{ - /* - int a = 1; - int b = 2; - - // This only captures part of the expression, but issues a warning about the rest - REQUIRE( a+1 == b-1 ); - */ - WARN( "Uncomment the code in this test to check that it gives a sensible compiler error" ); -} - struct Opaque { int val; @@ -73,17 +45,6 @@ TEST_CASE CHECK( o1 == o2 ); } -/////////////////////////////////////////////////////////////////////////////// -TEST_CASE -( - "string literals of different sizes can be compared", - "[Tricky][failing][.]" -) -{ - REQUIRE( std::string( "first" ) == "second" ); - -} - /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( @@ -240,18 +201,6 @@ TEST_CASE( "(unimplemented) static bools can be evaluated", "[Tricky]" ) } } -// Uncomment these tests to produce an error at test registration time -/* -TEST_CASE( "Tests with the same name are not allowed", "[Tricky]" ) -{ - -} -TEST_CASE( "Tests with the same name are not allowed", "[Tricky]" ) -{ - -} -*/ - struct Boolable { explicit Boolable( bool value ) : m_value( value ) {}