diff --git a/include/internal/catch_test_case_info.hpp b/include/internal/catch_test_case_info.hpp index 3a279602..59fc39f4 100644 --- a/include/internal/catch_test_case_info.hpp +++ b/include/internal/catch_test_case_info.hpp @@ -22,7 +22,7 @@ namespace Catch { SourceLineInfo const& _lineInfo ) { std::string desc = _descOrTags; - bool isHidden( startsWith( _name, "./" ) ); + bool isHidden( startsWith( _name, "./" ) ); // Legacy support std::set tags; TagExtracter( tags ).parse( desc ); if( tags.find( "hide" ) != tags.end() || tags.find( "." ) != tags.end() ) diff --git a/include/internal/catch_test_case_registry_impl.hpp b/include/internal/catch_test_case_registry_impl.hpp index 41714bc8..af1ee29f 100644 --- a/include/internal/catch_test_case_registry_impl.hpp +++ b/include/internal/catch_test_case_registry_impl.hpp @@ -42,8 +42,8 @@ namespace Catch { else { TestCase const& prev = *m_functions.find( testCase ); std::cerr << "error: TEST_CASE( \"" << name << "\" ) already defined.\n" - << "\tFirst seen at " << SourceLineInfo( prev.getTestCaseInfo().lineInfo ) << "\n" - << "\tRedefined at " << SourceLineInfo( testCase.getTestCaseInfo().lineInfo ) << std::endl; + << "\tFirst seen at " << prev.getTestCaseInfo().lineInfo << "\n" + << "\tRedefined at " << testCase.getTestCaseInfo().lineInfo << std::endl; exit(1); } } diff --git a/projects/SelfTest/ApproxTests.cpp b/projects/SelfTest/ApproxTests.cpp index acf96c99..1df76155 100644 --- a/projects/SelfTest/ApproxTests.cpp +++ b/projects/SelfTest/ApproxTests.cpp @@ -11,8 +11,8 @@ /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./succeeding/Approx/simple", - "Some simple comparisons between doubles" + "Some simple comparisons between doubles", + "[Approx]" ) { double d = 1.23; @@ -29,8 +29,8 @@ TEST_CASE /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./succeeding/Approx/epsilon", - "Approximate comparisons with different epsilons" + "Approximate comparisons with different epsilons", + "[Approx]" ) { double d = 1.23; @@ -42,8 +42,8 @@ TEST_CASE /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./succeeding/Approx/float", - "Approximate comparisons with floats" + "Approximate comparisons with floats", + "[Approx]" ) { REQUIRE( 1.23f == Approx( 1.23f ) ); @@ -53,8 +53,8 @@ TEST_CASE /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./succeeding/Approx/int", - "Approximate comparisons with ints" + "Approximate comparisons with ints", + "[Approx]" ) { REQUIRE( 1 == Approx( 1 ) ); @@ -64,8 +64,8 @@ TEST_CASE /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./succeeding/Approx/mixed", - "Approximate comparisons with mixed numeric types" + "Approximate comparisons with mixed numeric types", + "[Approx]" ) { const double dZero = 0; @@ -82,8 +82,8 @@ TEST_CASE /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./succeeding/Approx/custom", - "Use a custom approx" + "Use a custom approx", + "[Approx][custom]" ) { double d = 1.23; diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index aaafd844..54bee3e5 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -4,7 +4,7 @@ CatchSelfTest is a host application. Run with -? for options ------------------------------------------------------------------------------- -./failing/TestClass/failingCase +A METHOD_AS_TEST_CASE based test run that fails ------------------------------------------------------------------------------- ClassTests.cpp: ............................................................................... @@ -15,7 +15,7 @@ with expansion: "hello" == "world" ------------------------------------------------------------------------------- -./failing/Fixture/failingCase +A TEST_CASE_METHOD based test run that fails ------------------------------------------------------------------------------- ClassTests.cpp: ............................................................................... @@ -26,7 +26,7 @@ with expansion: 1 == 2 ------------------------------------------------------------------------------- -./failing/conditions/equality +Equality checks that should fail] ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -97,7 +97,7 @@ with expansion: 1.3 == Approx( 1.301 ) ------------------------------------------------------------------------------- -./failing/conditions/inequality +Inequality checks that should fails ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -128,7 +128,7 @@ with expansion: 5 != 5 ------------------------------------------------------------------------------- -./failing/conditions/ordered +Ordering comparison checks that should fail ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -229,7 +229,7 @@ with expansion: "hello" <= "a" ------------------------------------------------------------------------------- -./failing/conditions/not +'Not' checks that should fail ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -269,7 +269,7 @@ with expansion: !(1 == 1) ------------------------------------------------------------------------------- -./failing/exceptions/explicit +Expected exceptions that don't throw or unexpected exceptions fail the test ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -289,7 +289,7 @@ due to unexpected exception with message: expected exception ------------------------------------------------------------------------------- -./failing/exceptions/implicit +When unchecked exceptions are thrown directly they are always failures ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -299,7 +299,7 @@ due to unexpected exception with message: unexpected exception ------------------------------------------------------------------------------- -./failing/exceptions/implicit/2 +An unchecked exception reports the line of the last assertion ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -310,7 +310,7 @@ due to unexpected exception with message: unexpected exception ------------------------------------------------------------------------------- -./failing/exceptions/implicit/3 +When unchecked exceptions are thrown from sections they are always failures section name ------------------------------------------------------------------------------- ExceptionTests.cpp: @@ -321,7 +321,7 @@ due to unexpected exception with message: unexpected exception ------------------------------------------------------------------------------- -./failing/exceptions/implicit/4 +When unchecked exceptions are thrown from functions they are always failures ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -332,7 +332,7 @@ due to unexpected exception with message: expected exception ------------------------------------------------------------------------------- -./failing/exceptions/custom +Unexpected custom exceptions can be translated ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -342,7 +342,7 @@ due to unexpected exception with message: custom exception ------------------------------------------------------------------------------- -./failing/exceptions/custom/nothrow +Custom exceptions can be translated when testing for nothrow ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -353,7 +353,7 @@ due to unexpected exception with message: custom exception - not std ------------------------------------------------------------------------------- -./failing/exceptions/custom/throw +Custom exceptions can be translated when testing for throwing as something else ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -364,7 +364,7 @@ due to unexpected exception with message: custom exception - not std ------------------------------------------------------------------------------- -./failing/exceptions/custom/double +Unexpected exceptions can be translated ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -374,7 +374,7 @@ due to unexpected exception with message: 3.14 ------------------------------------------------------------------------------- -./succeeding/message +INFO and WARN do not abort tests ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -384,7 +384,7 @@ warning: this is a warning ------------------------------------------------------------------------------- -./failing/message/info/1 +INFO gets logged on failure ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -398,7 +398,7 @@ with messages: so should this ------------------------------------------------------------------------------- -./mixed/message/info/2 +INFO gets logged on failure, even if captured before successful assertions ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -419,7 +419,7 @@ with message: and this, but later ------------------------------------------------------------------------------- -./failing/message/fail +FAIL aborts the test ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -429,7 +429,7 @@ explicitly with message: This is a failure ------------------------------------------------------------------------------- -./failing/message/sections +Output from all sections is reported one ------------------------------------------------------------------------------- MessageTests.cpp: @@ -440,7 +440,7 @@ explicitly with message: Message from section one ------------------------------------------------------------------------------- -./failing/message/sections +Output from all sections is reported two ------------------------------------------------------------------------------- MessageTests.cpp: @@ -453,7 +453,7 @@ explicitly with message: Message from section one Message from section two ------------------------------------------------------------------------------- -./mixed/message/scoped +SCOPED_INFO is reset for each loop ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -477,7 +477,19 @@ explicitly with message: Previous info should not be seen ------------------------------------------------------------------------------- -./mixed/Misc/Sections/nested2 +sends information to INFO +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: FAILED: + REQUIRE( false ) +with messages: + hi + i := 7 + +------------------------------------------------------------------------------- +more nested SECTION tests s1 s2 ------------------------------------------------------------------------------- @@ -490,7 +502,7 @@ with expansion: 1 == 2 ------------------------------------------------------------------------------- -./mixed/Misc/Sections/loops +looped SECTION tests s1 ------------------------------------------------------------------------------- MiscTests.cpp: @@ -502,7 +514,7 @@ with expansion: 0 > 1 ------------------------------------------------------------------------------- -./mixed/Misc/loops +looped tests ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -552,19 +564,7 @@ with message: Some information An error ------------------------------------------------------------------------------- -./failing/info -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - REQUIRE( false ) -with messages: - hi - i := 7 - -------------------------------------------------------------------------------- -./failing/checkedif +checkedIf, failing ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -580,7 +580,7 @@ with expansion: false ------------------------------------------------------------------------------- -./failing/checkedelse +checkedElse, failing ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -596,7 +596,7 @@ with expansion: false ------------------------------------------------------------------------------- -./manual/onechar +send a single char to INFO ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -607,7 +607,7 @@ with message: 3 ------------------------------------------------------------------------------- -./failing/matchers/Contains +Contains string matcher ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -618,7 +618,7 @@ with expansion: "this string contains 'abc' as a substring" contains: "not there" ------------------------------------------------------------------------------- -./failing/matchers/StartsWith +StartsWith string matcher ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -629,7 +629,7 @@ with expansion: "this string contains 'abc' as a substring" starts with: "string" ------------------------------------------------------------------------------- -./failing/matchers/EndsWith +EndsWith string matcher ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -640,7 +640,7 @@ with expansion: "this string contains 'abc' as a substring" ends with: "this" ------------------------------------------------------------------------------- -./failing/matchers/Equals +Equals string matcher ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -661,7 +661,7 @@ warning: This one ran ------------------------------------------------------------------------------- -./failing/CatchSectionInfiniteLoop +A couple of nested sections followed by a failure ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -671,7 +671,7 @@ explicitly with message: to infinity and beyond ------------------------------------------------------------------------------- -./failing/CatchSectionInfiniteLoop +A couple of nested sections followed by a failure ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -681,7 +681,7 @@ explicitly with message: to infinity and beyond ------------------------------------------------------------------------------- -./failing/CatchSectionInfiniteLoop +A couple of nested sections followed by a failure ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -690,18 +690,10 @@ MiscTests.cpp:: FAILED: explicitly with message: to infinity and beyond -Message from section one -Message from section two -Some information -An error -Message from section one -Message from section two -Some information -An error hello hello ------------------------------------------------------------------------------- -./inprogress/failing/Tricky/trailing expression +Where the is more to the expression after the RHS[failing] ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -712,7 +704,7 @@ warning: error ------------------------------------------------------------------------------- -./inprogress/failing/Tricky/compound lhs +Where the LHS is not a simple value[failing] ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -723,7 +715,7 @@ warning: error ------------------------------------------------------------------------------- -./failing/Tricky/non streamable type +A failing expression with a non streamable type is still captured[failing] ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -739,7 +731,7 @@ with expansion: {?} == {?} ------------------------------------------------------------------------------- -./failing/string literals +string literals of different sizes can be compared[failing] ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -750,5 +742,5 @@ with expansion: "first" == "second" =============================================================================== -122 test cases - 35 failed (753 assertions - 90 failed) +120 test cases - 35 failed (673 assertions - 90 failed) diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index c85230c3..7c39bd07 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -4,7 +4,7 @@ CatchSelfTest is a host application. Run with -? for options ------------------------------------------------------------------------------- -./succeeding/Approx/simple +Some simple comparisons between doubles ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -46,7 +46,7 @@ with expansion: Approx( 1.23 ) != 1.24 ------------------------------------------------------------------------------- -./succeeding/Approx/epsilon +Approximate comparisons with different epsilons ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -64,7 +64,7 @@ with expansion: 1.23 == Approx( 1.231 ) ------------------------------------------------------------------------------- -./succeeding/Approx/float +Approximate comparisons with floats ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -82,7 +82,7 @@ with expansion: 0 == Approx( 0 ) ------------------------------------------------------------------------------- -./succeeding/Approx/int +Approximate comparisons with ints ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -96,7 +96,7 @@ PASSED: REQUIRE( 0 == Approx( 0 ) ) ------------------------------------------------------------------------------- -./succeeding/Approx/mixed +Approximate comparisons with mixed numeric types ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -132,7 +132,7 @@ with expansion: 1.234 == Approx( 1.234 ) ------------------------------------------------------------------------------- -./succeeding/Approx/custom +Use a custom approx ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -204,7 +204,7 @@ with expansion: 3.1428571429 != Approx( 3.141 ) ------------------------------------------------------------------------------- -./succeeding/TestClass/succeedingCase +A METHOD_AS_TEST_CASE based test run that succeeds ------------------------------------------------------------------------------- ClassTests.cpp: ............................................................................... @@ -216,7 +216,7 @@ with expansion: "hello" == "hello" ------------------------------------------------------------------------------- -./failing/TestClass/failingCase +A METHOD_AS_TEST_CASE based test run that fails ------------------------------------------------------------------------------- ClassTests.cpp: ............................................................................... @@ -227,7 +227,7 @@ with expansion: "hello" == "world" ------------------------------------------------------------------------------- -./succeeding/Fixture/succeedingCase +A TEST_CASE_METHOD based test run that succeeds ------------------------------------------------------------------------------- ClassTests.cpp: ............................................................................... @@ -239,7 +239,7 @@ with expansion: 1 == 1 ------------------------------------------------------------------------------- -./failing/Fixture/failingCase +A TEST_CASE_METHOD based test run that fails ------------------------------------------------------------------------------- ClassTests.cpp: ............................................................................... @@ -250,7 +250,7 @@ with expansion: 1 == 2 ------------------------------------------------------------------------------- -./succeeding/conditions/equality +Equality checks that should succeed ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -298,7 +298,7 @@ with expansion: 1.3 == Approx( 1.3 ) ------------------------------------------------------------------------------- -./failing/conditions/equality +Equality checks that should fail] ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -369,7 +369,7 @@ with expansion: 1.3 == Approx( 1.301 ) ------------------------------------------------------------------------------- -./succeeding/conditions/inequality +Inequality checks that should succeed ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -441,7 +441,7 @@ with expansion: 5 != 6 ------------------------------------------------------------------------------- -./failing/conditions/inequality +Inequality checks that should fails ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -472,7 +472,7 @@ with expansion: 5 != 5 ------------------------------------------------------------------------------- -./succeeding/conditions/ordered +Ordering comparison checks that should succeed ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -580,7 +580,7 @@ with expansion: "hello" > "a" ------------------------------------------------------------------------------- -./failing/conditions/ordered +Ordering comparison checks that should fail ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -681,7 +681,7 @@ with expansion: "hello" <= "a" ------------------------------------------------------------------------------- -./succeeding/conditions/int literals +Comparisons with int literals don't warn when mixing signed/ unsigned ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -765,7 +765,7 @@ with expansion: 0x > 4 ------------------------------------------------------------------------------- -./succeeding/conditions//long_to_unsigned_x +comparisons between int variables ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -795,7 +795,7 @@ with expansion: 1 == 1 ------------------------------------------------------------------------------- -./succeeding/conditions/const ints to int literal +comparisons between const int variables ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -825,7 +825,8 @@ with expansion: 1 == 1 ------------------------------------------------------------------------------- -./succeeding/conditions/negative ints +Comparisons between unsigned ints and negative signed ints match c++ standard +behaviour ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -867,7 +868,7 @@ with expansion: -2147483648 > 2 ------------------------------------------------------------------------------- -./succeeding/conditions/computed ints +Comparisons between ints where one side is computed ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -879,7 +880,7 @@ with expansion: 54 == 54 ------------------------------------------------------------------------------- -./succeeding/conditions/ptr +Pointers can be compared to null ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -933,7 +934,7 @@ with expansion: 0 != 0x ------------------------------------------------------------------------------- -./succeeding/conditions/not +'Not' checks that should succeed ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -981,7 +982,7 @@ with expansion: !(1 == 2) ------------------------------------------------------------------------------- -./failing/conditions/not +'Not' checks that should fail ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -1021,7 +1022,7 @@ with expansion: !(1 == 1) ------------------------------------------------------------------------------- -./succeeding/exceptions/explicit +When checked exceptions are thrown they can be expected or unexpected ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -1039,7 +1040,7 @@ PASSED: REQUIRE_THROWS( thisThrows() ) ------------------------------------------------------------------------------- -./failing/exceptions/explicit +Expected exceptions that don't throw or unexpected exceptions fail the test ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -1059,7 +1060,7 @@ due to unexpected exception with message: expected exception ------------------------------------------------------------------------------- -./failing/exceptions/implicit +When unchecked exceptions are thrown directly they are always failures ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -1069,7 +1070,7 @@ due to unexpected exception with message: unexpected exception ------------------------------------------------------------------------------- -./failing/exceptions/implicit/2 +An unchecked exception reports the line of the last assertion ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -1084,7 +1085,7 @@ due to unexpected exception with message: unexpected exception ------------------------------------------------------------------------------- -./failing/exceptions/implicit/3 +When unchecked exceptions are thrown from sections they are always failures section name ------------------------------------------------------------------------------- ExceptionTests.cpp: @@ -1095,7 +1096,7 @@ due to unexpected exception with message: unexpected exception ------------------------------------------------------------------------------- -./failing/exceptions/implicit/4 +When unchecked exceptions are thrown from functions they are always failures ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -1106,16 +1107,16 @@ due to unexpected exception with message: expected exception ------------------------------------------------------------------------------- -./succeeding/exceptions/implicit +When unchecked exceptions are thrown, but caught, they do not affect the test ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... -No assertions in test case './succeeding/exceptions/implicit' +No assertions in test case 'When unchecked exceptions are thrown, but caught, they do not affect the test' ------------------------------------------------------------------------------- -./failing/exceptions/custom +Unexpected custom exceptions can be translated ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -1125,7 +1126,7 @@ due to unexpected exception with message: custom exception ------------------------------------------------------------------------------- -./failing/exceptions/custom/nothrow +Custom exceptions can be translated when testing for nothrow ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -1136,7 +1137,7 @@ due to unexpected exception with message: custom exception - not std ------------------------------------------------------------------------------- -./failing/exceptions/custom/throw +Custom exceptions can be translated when testing for throwing as something else ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -1147,7 +1148,7 @@ due to unexpected exception with message: custom exception - not std ------------------------------------------------------------------------------- -./failing/exceptions/custom/double +Unexpected exceptions can be translated ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -1157,7 +1158,7 @@ due to unexpected exception with message: 3.14 ------------------------------------------------------------------------------- -./succeeding/exceptions/notimplemented +NotImplemented exception ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -1167,7 +1168,7 @@ PASSED: REQUIRE_THROWS( thisFunctionNotImplemented( 7 ) ) ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1185,7 +1186,7 @@ with expansion: 200 == 200 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1203,7 +1204,7 @@ with expansion: 200 == 200 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1221,7 +1222,7 @@ with expansion: 200 == 200 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1239,7 +1240,7 @@ with expansion: 200 == 200 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1257,7 +1258,7 @@ with expansion: 200 == 200 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1275,7 +1276,7 @@ with expansion: 200 == 200 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1293,7 +1294,7 @@ with expansion: 200 == 200 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1311,7 +1312,7 @@ with expansion: 200 == 200 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1329,7 +1330,7 @@ with expansion: 200 == 200 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1347,7 +1348,7 @@ with expansion: 202 == 202 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1365,7 +1366,7 @@ with expansion: 202 == 202 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1383,7 +1384,7 @@ with expansion: 202 == 202 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1401,7 +1402,7 @@ with expansion: 202 == 202 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1419,7 +1420,7 @@ with expansion: 202 == 202 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1437,7 +1438,7 @@ with expansion: 202 == 202 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1455,7 +1456,7 @@ with expansion: 202 == 202 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1473,7 +1474,7 @@ with expansion: 202 == 202 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1491,7 +1492,7 @@ with expansion: 202 == 202 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1509,7 +1510,7 @@ with expansion: 204 == 204 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1527,7 +1528,7 @@ with expansion: 204 == 204 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1545,7 +1546,7 @@ with expansion: 204 == 204 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1563,7 +1564,7 @@ with expansion: 204 == 204 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1581,7 +1582,7 @@ with expansion: 204 == 204 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1599,7 +1600,7 @@ with expansion: 204 == 204 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1617,7 +1618,7 @@ with expansion: 204 == 204 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1635,7 +1636,7 @@ with expansion: 204 == 204 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1653,7 +1654,7 @@ with expansion: 204 == 204 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1671,7 +1672,7 @@ with expansion: 206 == 206 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1689,7 +1690,7 @@ with expansion: 206 == 206 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1707,7 +1708,7 @@ with expansion: 206 == 206 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1725,7 +1726,7 @@ with expansion: 206 == 206 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1743,7 +1744,7 @@ with expansion: 206 == 206 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1761,7 +1762,7 @@ with expansion: 206 == 206 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1779,7 +1780,7 @@ with expansion: 206 == 206 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1797,7 +1798,7 @@ with expansion: 206 == 206 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1815,7 +1816,7 @@ with expansion: 206 == 206 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1833,7 +1834,7 @@ with expansion: 208 == 208 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1851,7 +1852,7 @@ with expansion: 208 == 208 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1869,7 +1870,7 @@ with expansion: 208 == 208 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1887,7 +1888,7 @@ with expansion: 208 == 208 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1905,7 +1906,7 @@ with expansion: 208 == 208 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1923,7 +1924,7 @@ with expansion: 208 == 208 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1941,7 +1942,7 @@ with expansion: 208 == 208 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1959,7 +1960,7 @@ with expansion: 208 == 208 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1977,7 +1978,7 @@ with expansion: 208 == 208 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -1995,7 +1996,7 @@ with expansion: 210 == 210 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2013,7 +2014,7 @@ with expansion: 210 == 210 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2031,7 +2032,7 @@ with expansion: 210 == 210 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2049,7 +2050,7 @@ with expansion: 210 == 210 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2067,7 +2068,7 @@ with expansion: 210 == 210 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2085,7 +2086,7 @@ with expansion: 210 == 210 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2103,7 +2104,7 @@ with expansion: 210 == 210 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2121,7 +2122,7 @@ with expansion: 210 == 210 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2139,7 +2140,7 @@ with expansion: 210 == 210 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2157,7 +2158,7 @@ with expansion: 212 == 212 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2175,7 +2176,7 @@ with expansion: 212 == 212 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2193,7 +2194,7 @@ with expansion: 212 == 212 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2211,7 +2212,7 @@ with expansion: 212 == 212 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2229,7 +2230,7 @@ with expansion: 212 == 212 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2247,7 +2248,7 @@ with expansion: 212 == 212 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2265,7 +2266,7 @@ with expansion: 212 == 212 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2283,7 +2284,7 @@ with expansion: 212 == 212 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2301,7 +2302,7 @@ with expansion: 212 == 212 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2319,7 +2320,7 @@ with expansion: 214 == 214 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2337,7 +2338,7 @@ with expansion: 214 == 214 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2355,7 +2356,7 @@ with expansion: 214 == 214 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2373,7 +2374,7 @@ with expansion: 214 == 214 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2391,7 +2392,7 @@ with expansion: 214 == 214 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2409,7 +2410,7 @@ with expansion: 214 == 214 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2427,7 +2428,7 @@ with expansion: 214 == 214 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2445,7 +2446,7 @@ with expansion: 214 == 214 ------------------------------------------------------------------------------- -./succeeding/generators/1 +Generators over two ranges ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2463,7 +2464,7 @@ with expansion: 214 == 214 ------------------------------------------------------------------------------- -./succeeding/generators/2 +Generator over a range of pairs ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2475,7 +2476,7 @@ with expansion: 0 == 0 ------------------------------------------------------------------------------- -./succeeding/generators/2 +Generator over a range of pairs ------------------------------------------------------------------------------- GeneratorTests.cpp: ............................................................................... @@ -2487,7 +2488,7 @@ with expansion: 2 == 2 ------------------------------------------------------------------------------- -./succeeding/message +INFO and WARN do not abort tests ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -2498,10 +2499,10 @@ warning: this is a warning -No assertions in test case './succeeding/message' +No assertions in test case 'INFO and WARN do not abort tests' ------------------------------------------------------------------------------- -./succeeding/succeed +SUCCEED counts as a test pass ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -2512,7 +2513,7 @@ with message: this is a success ------------------------------------------------------------------------------- -./failing/message/info/1 +INFO gets logged on failure ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -2526,7 +2527,7 @@ with messages: so should this ------------------------------------------------------------------------------- -./mixed/message/info/2 +INFO gets logged on failure, even if captured before successful assertions ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -2562,7 +2563,7 @@ with message: but not this ------------------------------------------------------------------------------- -./failing/message/fail +FAIL aborts the test ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -2572,7 +2573,7 @@ explicitly with message: This is a failure ------------------------------------------------------------------------------- -./failing/message/sections +Output from all sections is reported one ------------------------------------------------------------------------------- MessageTests.cpp: @@ -2583,7 +2584,7 @@ explicitly with message: Message from section one ------------------------------------------------------------------------------- -./failing/message/sections +Output from all sections is reported two ------------------------------------------------------------------------------- MessageTests.cpp: @@ -2595,7 +2596,7 @@ explicitly with message: Message from section one ------------------------------------------------------------------------------- -./succeeding/message/sections/stdout +Standard output from all sections is reported one ------------------------------------------------------------------------------- MessageTests.cpp: @@ -2606,7 +2607,7 @@ No assertions in section 'one' Message from section two ------------------------------------------------------------------------------- -./succeeding/message/sections/stdout +Standard output from all sections is reported two ------------------------------------------------------------------------------- MessageTests.cpp: @@ -2616,7 +2617,7 @@ MessageTests.cpp: No assertions in section 'two' ------------------------------------------------------------------------------- -./mixed/message/scoped +SCOPED_INFO is reset for each loop ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -2720,7 +2721,7 @@ with messages: i := 10 ------------------------------------------------------------------------------- -./succeeding/nofail +The NO_FAIL macro reports a failure but does not fail the test ------------------------------------------------------------------------------- MessageTests.cpp: ............................................................................... @@ -2730,7 +2731,7 @@ FAILED - but was ok: CHECK_NOFAIL( 1 == 2 ) -No assertions in test case './succeeding/nofail' +No assertions in test case 'The NO_FAIL macro reports a failure but does not fail the test' ------------------------------------------------------------------------------- just info @@ -2752,7 +2753,19 @@ explicitly with message: Previous info should not be seen ------------------------------------------------------------------------------- -./succeeding/Misc/Sections +sends information to INFO +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: FAILED: + REQUIRE( false ) +with messages: + hi + i := 7 + +------------------------------------------------------------------------------- +random SECTION tests s1 ------------------------------------------------------------------------------- MiscTests.cpp: @@ -2771,7 +2784,7 @@ with expansion: 2 != 1 ------------------------------------------------------------------------------- -./succeeding/Misc/Sections +random SECTION tests s2 ------------------------------------------------------------------------------- MiscTests.cpp: @@ -2784,7 +2797,7 @@ with expansion: 1 != 2 ------------------------------------------------------------------------------- -./succeeding/Misc/Sections/nested +nested SECTION tests s1 ------------------------------------------------------------------------------- MiscTests.cpp: @@ -2803,7 +2816,7 @@ with expansion: 2 != 1 ------------------------------------------------------------------------------- -./succeeding/Misc/Sections/nested +nested SECTION tests s1 ------------------------------------------------------------------------------- MiscTests.cpp: @@ -2822,7 +2835,7 @@ with expansion: 2 != 1 ------------------------------------------------------------------------------- -./succeeding/Misc/Sections/nested +nested SECTION tests s1 s2 ------------------------------------------------------------------------------- @@ -2836,7 +2849,7 @@ with expansion: 1 != 2 ------------------------------------------------------------------------------- -./mixed/Misc/Sections/nested2 +more nested SECTION tests s1 s2 ------------------------------------------------------------------------------- @@ -2849,7 +2862,7 @@ with expansion: 1 == 2 ------------------------------------------------------------------------------- -./mixed/Misc/Sections/nested2 +more nested SECTION tests s1 s3 ------------------------------------------------------------------------------- @@ -2863,7 +2876,7 @@ with expansion: 1 != 2 ------------------------------------------------------------------------------- -./mixed/Misc/Sections/nested2 +more nested SECTION tests s1 s4 ------------------------------------------------------------------------------- @@ -2877,7 +2890,7 @@ with expansion: 1 < 2 ------------------------------------------------------------------------------- -./Sections/nested/a/b +even more nested SECTION tests c d (leaf) ------------------------------------------------------------------------------- @@ -2888,7 +2901,7 @@ MiscTests.cpp: No assertions in section 'd (leaf)' ------------------------------------------------------------------------------- -./Sections/nested/a/b +even more nested SECTION tests c e (leaf) ------------------------------------------------------------------------------- @@ -2899,7 +2912,7 @@ MiscTests.cpp: No assertions in section 'e (leaf)' ------------------------------------------------------------------------------- -./Sections/nested/a/b +even more nested SECTION tests f (leaf) ------------------------------------------------------------------------------- MiscTests.cpp: @@ -2909,7 +2922,7 @@ MiscTests.cpp: No assertions in section 'f (leaf)' ------------------------------------------------------------------------------- -./mixed/Misc/Sections/loops +looped SECTION tests s1 ------------------------------------------------------------------------------- MiscTests.cpp: @@ -2921,7 +2934,7 @@ with expansion: 0 > 1 ------------------------------------------------------------------------------- -./mixed/Misc/loops +looped tests ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -2987,16 +3000,16 @@ with message: Some information An error ------------------------------------------------------------------------------- -./succeeding/Misc/stdout,stderr +Sends stuff to stdout and stderr ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... -No assertions in test case './succeeding/Misc/stdout,stderr' +No assertions in test case 'Sends stuff to stdout and stderr' ------------------------------------------------------------------------------- -./succeeding/Misc/null strings +null strings ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3014,19 +3027,7 @@ with expansion: {null string} == {null string} ------------------------------------------------------------------------------- -./failing/info -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - REQUIRE( false ) -with messages: - hi - i := 7 - -------------------------------------------------------------------------------- -./succeeding/checkedif +checkedIf ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3044,7 +3045,7 @@ with expansion: true ------------------------------------------------------------------------------- -./failing/checkedif +checkedIf, failing ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3060,7 +3061,7 @@ with expansion: false ------------------------------------------------------------------------------- -./succeeding/checkedelse +checkedElse ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3078,7 +3079,7 @@ with expansion: true ------------------------------------------------------------------------------- -./failing/checkedelse +checkedElse, failing ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3094,7 +3095,7 @@ with expansion: false ------------------------------------------------------------------------------- -./misc/xmlentitycheck +xmlentitycheck embedded xml ------------------------------------------------------------------------------- MiscTests.cpp: @@ -3104,7 +3105,7 @@ MiscTests.cpp: No assertions in section 'embedded xml' ------------------------------------------------------------------------------- -./misc/xmlentitycheck +xmlentitycheck encoded chars ------------------------------------------------------------------------------- MiscTests.cpp: @@ -3114,7 +3115,7 @@ MiscTests.cpp: No assertions in section 'encoded chars' ------------------------------------------------------------------------------- -./manual/onechar +send a single char to INFO ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3125,7 +3126,7 @@ with message: 3 ------------------------------------------------------------------------------- -./succeeding/atomic if +atomic if ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3137,7 +3138,7 @@ with expansion: 0 == 0 ------------------------------------------------------------------------------- -./succeeding/matchers +String matchers ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3167,7 +3168,7 @@ with expansion: "this string contains 'abc' as a substring" ends with: "substring" ------------------------------------------------------------------------------- -./failing/matchers/Contains +Contains string matcher ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3178,7 +3179,7 @@ with expansion: "this string contains 'abc' as a substring" contains: "not there" ------------------------------------------------------------------------------- -./failing/matchers/StartsWith +StartsWith string matcher ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3189,7 +3190,7 @@ with expansion: "this string contains 'abc' as a substring" starts with: "string" ------------------------------------------------------------------------------- -./failing/matchers/EndsWith +EndsWith string matcher ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3200,7 +3201,7 @@ with expansion: "this string contains 'abc' as a substring" ends with: "this" ------------------------------------------------------------------------------- -./failing/matchers/Equals +Equals string matcher ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3211,7 +3212,7 @@ with expansion: "this string contains 'abc' as a substring" equals: "something else" ------------------------------------------------------------------------------- -string +Equals string matcher, with NULL ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3223,7 +3224,7 @@ with expansion: "" equals: "" ------------------------------------------------------------------------------- -./succeeding/matchers/AllOf +AllOf matcher ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3236,7 +3237,7 @@ with expansion: contains: "abc" ) ------------------------------------------------------------------------------- -./succeeding/matchers/AnyOf +AnyOf matcher ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3256,7 +3257,7 @@ with expansion: contains: "string" ) ------------------------------------------------------------------------------- -./succeeding/matchers/Equals +Equals ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3305,13 +3306,13 @@ with expansion: 0x == 3628800 ------------------------------------------------------------------------------- -empty +An empty test with no assertions ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... -No assertions in test case 'empty' +No assertions in test case 'An empty test with no assertions' ------------------------------------------------------------------------------- Nice descriptive name @@ -3562,7 +3563,7 @@ with expansion: 5 >= 5 ------------------------------------------------------------------------------- -./failing/CatchSectionInfiniteLoop +A couple of nested sections followed by a failure ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3572,7 +3573,7 @@ explicitly with message: to infinity and beyond ------------------------------------------------------------------------------- -./failing/CatchSectionInfiniteLoop +A couple of nested sections followed by a failure ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3582,7 +3583,7 @@ explicitly with message: to infinity and beyond ------------------------------------------------------------------------------- -./failing/CatchSectionInfiniteLoop +A couple of nested sections followed by a failure Outer Inner ------------------------------------------------------------------------------- @@ -3595,7 +3596,7 @@ with message: that's not flying - that's failing in style ------------------------------------------------------------------------------- -./failing/CatchSectionInfiniteLoop +A couple of nested sections followed by a failure ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... @@ -3604,458 +3605,6 @@ MiscTests.cpp:: FAILED: explicitly with message: to infinity and beyond -------------------------------------------------------------------------------- -selftest/main - selftest/expected result - selftest/expected result/failing tests -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests failed, as expected - -------------------------------------------------------------------------------- -selftest/main - selftest/expected result - selftest/expected result/succeeding tests -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -Message from section one -Message from section two -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -Some information -An error -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -catch_self_test.hpp:: -PASSED: -with message: - Tests passed, as expected - -Message from section one -Message from section two -Some information -An error -------------------------------------------------------------------------------- -selftest/main - selftest/test counts - selftest/test counts/succeeding tests -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK( totals.assertions.passed == 298 ) -with expansion: - 298 == 298 - -TestMain.cpp:: -PASSED: - CHECK( totals.assertions.failed == 0 ) -with expansion: - 0 == 0 - -------------------------------------------------------------------------------- -selftest/main - selftest/test counts - selftest/test counts/failing tests -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK( totals.assertions.passed == 2 ) -with expansion: - 2 == 2 - -TestMain.cpp:: -PASSED: - CHECK( totals.assertions.failed == 77 ) -with expansion: - 77 == 77 - -------------------------------------------------------------------------------- -meta/Misc/Sections -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK( totals.assertions.passed == 2 ) -with expansion: - 2 == 2 - -TestMain.cpp:: -PASSED: - CHECK( totals.assertions.failed == 1 ) -with expansion: - 1 == 1 - ------------------------------------------------------------------------------- Process can be configured on command line default - no arguments @@ -6414,7 +5963,7 @@ with expansion: ... message truncated due to excessive size ------------------------------------------------------------------------------- -./succeeding/Tricky/std::pair +Parsing a std::pair ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -6426,7 +5975,7 @@ with expansion: std::pair( 1, 2 ) == std::pair( 1, 2 ) ------------------------------------------------------------------------------- -./inprogress/failing/Tricky/trailing expression +Where the is more to the expression after the RHS[failing] ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -6437,10 +5986,10 @@ warning: error -No assertions in test case './inprogress/failing/Tricky/trailing expression' +No assertions in test case 'Where the is more to the expression after the RHS[failing]' ------------------------------------------------------------------------------- -./inprogress/failing/Tricky/compound lhs +Where the LHS is not a simple value[failing] ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -6451,10 +6000,10 @@ warning: error -No assertions in test case './inprogress/failing/Tricky/compound lhs' +No assertions in test case 'Where the LHS is not a simple value[failing]' ------------------------------------------------------------------------------- -./failing/Tricky/non streamable type +A failing expression with a non streamable type is still captured[failing] ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -6470,7 +6019,7 @@ with expansion: {?} == {?} ------------------------------------------------------------------------------- -./failing/string literals +string literals of different sizes can be compared[failing] ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -6481,7 +6030,7 @@ with expansion: "first" == "second" ------------------------------------------------------------------------------- -./succeeding/side-effects +An expression with side-effects should only be evaluated once ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -6499,7 +6048,7 @@ with expansion: 8 == 8 ------------------------------------------------------------------------------- -./succeeding/koenig +Operators at different namespace levels not hijacked by Koenig lookup ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -6511,7 +6060,7 @@ with expansion: 0x == {?} ------------------------------------------------------------------------------- -./succeeding/non-const== +Demonstrate that a non-const == is not used ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -6523,7 +6072,7 @@ with expansion: {?} == 1 ------------------------------------------------------------------------------- -./succeeding/enum/bits +Test enum bit values ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -6535,7 +6084,7 @@ with expansion: 0x == 3221225472 ------------------------------------------------------------------------------- -./succeeding/boolean member +boolean member ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -6547,7 +6096,7 @@ with expansion: 0x != 0 ------------------------------------------------------------------------------- -./succeeding/unimplemented static bool +(unimplemented) static bools can be evaluated compare to true ------------------------------------------------------------------------------- TrickyTests.cpp: @@ -6566,7 +6115,7 @@ with expansion: true == true ------------------------------------------------------------------------------- -./succeeding/unimplemented static bool +(unimplemented) static bools can be evaluated compare to false ------------------------------------------------------------------------------- TrickyTests.cpp: @@ -6585,7 +6134,7 @@ with expansion: false == false ------------------------------------------------------------------------------- -./succeeding/unimplemented static bool +(unimplemented) static bools can be evaluated negation ------------------------------------------------------------------------------- TrickyTests.cpp: @@ -6598,7 +6147,7 @@ with expansion: true ------------------------------------------------------------------------------- -./succeeding/unimplemented static bool +(unimplemented) static bools can be evaluated double negation ------------------------------------------------------------------------------- TrickyTests.cpp: @@ -6611,7 +6160,7 @@ with expansion: true ------------------------------------------------------------------------------- -./succeeding/unimplemented static bool +(unimplemented) static bools can be evaluated direct ------------------------------------------------------------------------------- TrickyTests.cpp: @@ -6630,7 +6179,7 @@ with expansion: !false ------------------------------------------------------------------------------- -./succeeding/SafeBool +Objects that evaluated in boolean contexts can be checked ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... @@ -7574,5 +7123,5 @@ with expansion: true =============================================================================== -122 test cases - 50 failed (772 assertions - 109 failed) +120 test cases - 50 failed (692 assertions - 109 failed) diff --git a/projects/SelfTest/Baselines/console.swa4.approved.txt b/projects/SelfTest/Baselines/console.swa4.approved.txt index aa5e2493..65a96d7d 100644 --- a/projects/SelfTest/Baselines/console.swa4.approved.txt +++ b/projects/SelfTest/Baselines/console.swa4.approved.txt @@ -4,7 +4,7 @@ CatchSelfTest is a host application. Run with -? for options ------------------------------------------------------------------------------- -./succeeding/Approx/simple +Some simple comparisons between doubles ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -46,7 +46,7 @@ with expansion: Approx( 1.23 ) != 1.24 ------------------------------------------------------------------------------- -./succeeding/Approx/epsilon +Approximate comparisons with different epsilons ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -64,7 +64,7 @@ with expansion: 1.23 == Approx( 1.231 ) ------------------------------------------------------------------------------- -./succeeding/Approx/float +Approximate comparisons with floats ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -82,7 +82,7 @@ with expansion: 0 == Approx( 0 ) ------------------------------------------------------------------------------- -./succeeding/Approx/int +Approximate comparisons with ints ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -96,7 +96,7 @@ PASSED: REQUIRE( 0 == Approx( 0 ) ) ------------------------------------------------------------------------------- -./succeeding/Approx/mixed +Approximate comparisons with mixed numeric types ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -132,7 +132,7 @@ with expansion: 1.234 == Approx( 1.234 ) ------------------------------------------------------------------------------- -./succeeding/Approx/custom +Use a custom approx ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... @@ -204,7 +204,7 @@ with expansion: 3.1428571429 != Approx( 3.141 ) ------------------------------------------------------------------------------- -./succeeding/TestClass/succeedingCase +A METHOD_AS_TEST_CASE based test run that succeeds ------------------------------------------------------------------------------- ClassTests.cpp: ............................................................................... @@ -216,7 +216,7 @@ with expansion: "hello" == "hello" ------------------------------------------------------------------------------- -./failing/TestClass/failingCase +A METHOD_AS_TEST_CASE based test run that fails ------------------------------------------------------------------------------- ClassTests.cpp: ............................................................................... @@ -227,7 +227,7 @@ with expansion: "hello" == "world" ------------------------------------------------------------------------------- -./succeeding/Fixture/succeedingCase +A TEST_CASE_METHOD based test run that succeeds ------------------------------------------------------------------------------- ClassTests.cpp: ............................................................................... @@ -239,7 +239,7 @@ with expansion: 1 == 1 ------------------------------------------------------------------------------- -./failing/Fixture/failingCase +A TEST_CASE_METHOD based test run that fails ------------------------------------------------------------------------------- ClassTests.cpp: ............................................................................... @@ -250,7 +250,7 @@ with expansion: 1 == 2 ------------------------------------------------------------------------------- -./succeeding/conditions/equality +Equality checks that should succeed ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... @@ -298,7 +298,7 @@ with expansion: 1.3 == Approx( 1.3 ) ------------------------------------------------------------------------------- -./failing/conditions/equality +Equality checks that should fail] ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index b292d258..0bb7c778 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,26 +1,26 @@ - - - - - - - + + + + + + + - - + + ClassTests.cpp: - - + + ClassTests.cpp: - - + + ConditionTests.cpp: @@ -61,8 +61,8 @@ ConditionTests.cpp: ConditionTests.cpp: - - + + ConditionTests.cpp: @@ -79,8 +79,8 @@ ConditionTests.cpp: ConditionTests.cpp: - - + + ConditionTests.cpp: @@ -139,14 +139,14 @@ ConditionTests.cpp: ConditionTests.cpp: - - - - - - - - + + + + + + + + ConditionTests.cpp: @@ -172,8 +172,8 @@ ConditionTests.cpp: ConditionTests.cpp: - - + + expected exception ExceptionTests.cpp: @@ -186,67 +186,67 @@ expected exception ExceptionTests.cpp: - + unexpected exception ExceptionTests.cpp: - + unexpected exception ExceptionTests.cpp: - + unexpected exception ExceptionTests.cpp: - + expected exception ExceptionTests.cpp: - + custom exception ExceptionTests.cpp: - + custom exception - not std ExceptionTests.cpp: - + custom exception - not std ExceptionTests.cpp: - + 3.14 ExceptionTests.cpp: - - - - - - + + + + + + this message should be logged so should this MessageTests.cpp: - + this message should be logged MessageTests.cpp: @@ -256,61 +256,68 @@ and this, but later MessageTests.cpp: - + This is a failure MessageTests.cpp: - + Message from section one MessageTests.cpp: - + Message from section two MessageTests.cpp: - + Message from section one Message from section two - + current counter 10 i := 10 MessageTests.cpp: - + Previous info should not be seen MessageTests.cpp: - - - - - + + +hi +i := 7 +MessageTests.cpp: + + + + + + + MiscTests.cpp: - - - + + + MiscTests.cpp: - + Testing if fib[0] (1) is even MiscTests.cpp: @@ -336,7 +343,7 @@ Testing if fib[7] (21) is even MiscTests.cpp: - + Some information @@ -344,16 +351,9 @@ Some information An error - - - -hi -i := 7 -MiscTests.cpp: - - - - + + + MiscTests.cpp: @@ -361,8 +361,8 @@ MiscTests.cpp: MiscTests.cpp: - - + + MiscTests.cpp: @@ -370,38 +370,38 @@ MiscTests.cpp: MiscTests.cpp: - + 3 MiscTests.cpp: - - - + + + MiscTests.cpp: - + MiscTests.cpp: - + MiscTests.cpp: - + MiscTests.cpp: - - - - + + + + @@ -410,7 +410,7 @@ MiscTests.cpp: - + to infinity and beyond MiscTests.cpp: @@ -424,25 +424,7 @@ to infinity and beyond MiscTests.cpp: - - - - - - -Message from section one -Message from section two -Some information -Message from section one -Message from section two -Some information - - -An error -An error - - - + @@ -493,10 +475,10 @@ hello - - - - + + + + TrickyTests.cpp: @@ -504,22 +486,22 @@ TrickyTests.cpp: TrickyTests.cpp: - + TrickyTests.cpp: - - - - - - - - - - - + + + + + + + + + + + @@ -563,18 +545,10 @@ TrickyTests.cpp: Message from section one Message from section two Some information -Message from section one -Message from section two -Some information -Message from section one -Message from section two -Some information hello hello -An error -An error An error diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index 2a2c41de..ded8c1f2 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -1,6 +1,6 @@ - + d == Approx( 1.23 ) @@ -51,7 +51,7 @@ - + d != Approx( 1.231 ) @@ -70,7 +70,7 @@ - + 1.23f == Approx( 1.23f ) @@ -89,7 +89,7 @@ - + 1 == Approx( 1 ) @@ -108,7 +108,7 @@ - + 1.0f == Approx( 1 ) @@ -151,7 +151,7 @@ - + d == approx( 1.23 ) @@ -237,7 +237,7 @@ - + s == "hello" @@ -248,7 +248,7 @@ - + s == "world" @@ -259,7 +259,7 @@ - + m_a == 1 @@ -270,7 +270,7 @@ - + m_a == 2 @@ -281,7 +281,7 @@ - + data.int_seven == 7 @@ -340,7 +340,7 @@ - + data.int_seven == 6 @@ -447,7 +447,7 @@ - + data.int_seven != 6 @@ -538,7 +538,7 @@ - + data.int_seven != 7 @@ -581,7 +581,7 @@ - + data.int_seven < 8 @@ -720,7 +720,7 @@ - + data.int_seven > 7 @@ -875,7 +875,7 @@ - + i == 1 @@ -982,7 +982,7 @@ - + long_var == unsigned_char_var @@ -1017,7 +1017,7 @@ - + unsigned_char_var == 1 @@ -1052,7 +1052,7 @@ - + ( -1 > 2u ) @@ -1103,7 +1103,7 @@ - + 54 == 6*9 @@ -1114,7 +1114,7 @@ - + p == __null @@ -1181,7 +1181,7 @@ - + false == false @@ -1248,7 +1248,7 @@ - + false != false @@ -1315,7 +1315,7 @@ - + thisThrows() @@ -1342,7 +1342,7 @@ - + thisThrows() @@ -1375,13 +1375,13 @@ - + unexpected exception - + 1 == 1 @@ -1403,7 +1403,7 @@ - +
unexpected exception @@ -1412,7 +1412,7 @@
- + thisThrows() == 0 @@ -1426,16 +1426,16 @@ - + - + custom exception - + throwCustom() @@ -1449,7 +1449,7 @@ - + throwCustom() @@ -1463,13 +1463,13 @@ - + 3.14 - + thisFunctionNotImplemented( 7 ) @@ -1480,7 +1480,7 @@ - + multiply( i, 2 ) == i*2 @@ -2635,7 +2635,7 @@ - + i->first == i->second-1 @@ -2654,7 +2654,7 @@ - + this is a message @@ -2663,10 +2663,10 @@ - + - + this message should be logged @@ -2683,7 +2683,7 @@ - + a == 2 @@ -2724,13 +2724,13 @@ - + This is a failure - +
Message from section one @@ -2745,7 +2745,7 @@
- +
@@ -2754,7 +2754,7 @@
- + i < 10 @@ -2851,7 +2851,7 @@ - + 1 == 2 @@ -2871,7 +2871,24 @@ - + + + hi + + + i := 7 + + + + false + + + false + + + + +
@@ -2904,7 +2921,7 @@
- +
@@ -2956,7 +2973,7 @@
- +
@@ -3004,7 +3021,7 @@
- +
@@ -3025,7 +3042,7 @@
- +
@@ -3039,7 +3056,7 @@
- + Testing if fib[0] (1) is even @@ -3124,10 +3141,10 @@ - + - + makeString( false ) != static_cast<char*>(__null) @@ -3146,24 +3163,7 @@ - - - hi - - - i := 7 - - - - false - - - false - - - - - + flag @@ -3182,7 +3182,7 @@ - + flag @@ -3201,7 +3201,7 @@ - + flag @@ -3220,7 +3220,7 @@ - + flag @@ -3239,7 +3239,7 @@ - +
@@ -3248,7 +3248,7 @@
- + 3 @@ -3262,7 +3262,7 @@ - + x == 0 @@ -3273,7 +3273,7 @@ - + testStringForMatching() Contains( "string" ) @@ -3308,7 +3308,7 @@ - + testStringForMatching() Contains( "not there" ) @@ -3319,7 +3319,7 @@ - + testStringForMatching() StartsWith( "string" ) @@ -3330,7 +3330,7 @@ - + testStringForMatching() EndsWith( "this" ) @@ -3341,7 +3341,7 @@ - + testStringForMatching() Equals( "something else" ) @@ -3352,7 +3352,7 @@ - + "" Equals(__null) @@ -3363,7 +3363,7 @@ - + testStringForMatching() AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) @@ -3374,7 +3374,7 @@ - + testStringForMatching() AnyOf( Catch::Contains( "string" ), Catch::Contains( "not there" ) ) @@ -3393,7 +3393,7 @@ - + testStringForMatching() Equals( "this string contains 'abc' as a substring" ) @@ -3447,7 +3447,7 @@ - + @@ -3667,7 +3667,7 @@ - + to infinity and beyond @@ -3688,90 +3688,6 @@ - -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
-
-
- - - totals.assertions.passed == 298 - - - 298 == 298 - - - - - totals.assertions.failed == 0 - - - 0 == 0 - - - -
- -
-
-
- - - totals.assertions.passed == 2 - - - 2 == 2 - - - - - totals.assertions.failed == 77 - - - 77 == 77 - - - -
- -
- -
- - - - totals.assertions.passed == 2 - - - 2 == 2 - - - - - totals.assertions.failed == 1 - - - 1 == 1 - - - -
@@ -6374,7 +6290,7 @@ there" - + (std::pair<int, int>( 1, 2 )) == aNicePair @@ -6385,19 +6301,19 @@ there" - + 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 - + &o1 == &o2 @@ -6416,7 +6332,7 @@ there" - + std::string( "first" ) == "second" @@ -6427,7 +6343,7 @@ there" - + i++ == 7 @@ -6446,7 +6362,7 @@ there" - + 0x == o @@ -6457,7 +6373,7 @@ there" - + t == 1u @@ -6468,7 +6384,7 @@ there" - + 0x == bit30and31 @@ -6479,7 +6395,7 @@ there" - + obj.prop != __null @@ -6490,7 +6406,7 @@ there" - +
@@ -6572,7 +6488,7 @@ there"
- + True @@ -7482,7 +7398,7 @@ there"
- +
- +
diff --git a/projects/SelfTest/ClassTests.cpp b/projects/SelfTest/ClassTests.cpp index 573f5aaa..e22f3d24 100644 --- a/projects/SelfTest/ClassTests.cpp +++ b/projects/SelfTest/ClassTests.cpp @@ -31,8 +31,8 @@ namespace } -METHOD_AS_TEST_CASE( TestClass::succeedingCase, "./succeeding/TestClass/succeedingCase", "A method based test run that succeeds [class]" ) -METHOD_AS_TEST_CASE( TestClass::failingCase, "./failing/TestClass/failingCase", "A method based test run that fails [class]" ) +METHOD_AS_TEST_CASE( TestClass::succeedingCase, "A METHOD_AS_TEST_CASE based test run that succeeds", "[class]" ) +METHOD_AS_TEST_CASE( TestClass::failingCase, "A METHOD_AS_TEST_CASE based test run that fails", "[.][class][failing]" ) struct Fixture @@ -42,7 +42,7 @@ struct Fixture int m_a; }; -TEST_CASE_METHOD( Fixture, "./succeeding/Fixture/succeedingCase", "A method based test run that succeeds [class]" ) +TEST_CASE_METHOD( Fixture, "A TEST_CASE_METHOD based test run that succeeds", "[class]" ) { REQUIRE( m_a == 1 ); } @@ -50,7 +50,7 @@ TEST_CASE_METHOD( Fixture, "./succeeding/Fixture/succeedingCase", "A method base // We should be able to write our tests within a different namespace namespace Inner { - TEST_CASE_METHOD( Fixture, "./failing/Fixture/failingCase", "A method based test run that fails [class]" ) + TEST_CASE_METHOD( Fixture, "A TEST_CASE_METHOD based test run that fails", "[.][class][failing]" ) { REQUIRE( m_a == 2 ); } diff --git a/projects/SelfTest/ConditionTests.cpp b/projects/SelfTest/ConditionTests.cpp index b298de1d..a2dabfa1 100644 --- a/projects/SelfTest/ConditionTests.cpp +++ b/projects/SelfTest/ConditionTests.cpp @@ -43,8 +43,7 @@ struct TestDef { // This allows us to see all results, even if an earlier check fails // Equality tests -TEST_CASE( "./succeeding/conditions/equality", - "Equality checks that should succeed" ) +TEST_CASE( "Equality checks that should succeed", "" ) { TestDef td; @@ -63,8 +62,7 @@ TEST_CASE( "./succeeding/conditions/equality", REQUIRE( x == Approx( 1.3 ) ); } -TEST_CASE( "./failing/conditions/equality", - "Equality checks that should fail" ) +TEST_CASE( "Equality checks that should fail]", "[.][failing]" ) { TestData data; @@ -85,8 +83,7 @@ TEST_CASE( "./failing/conditions/equality", CHECK( x == Approx( 1.301 ) ); } -TEST_CASE( "./succeeding/conditions/inequality", - "Inequality checks that should succeed" ) +TEST_CASE( "Inequality checks that should succeed", "" ) { TestData data; @@ -103,8 +100,7 @@ TEST_CASE( "./succeeding/conditions/inequality", REQUIRE( data.str_hello.size() != 6 ); } -TEST_CASE( "./failing/conditions/inequality", - "Inequality checks that should fails" ) +TEST_CASE( "Inequality checks that should fails", "[.][failing]" ) { TestData data; @@ -116,8 +112,7 @@ TEST_CASE( "./failing/conditions/inequality", } // Ordering comparison tests -TEST_CASE( "./succeeding/conditions/ordered", - "Ordering comparison checks that should succeed" ) +TEST_CASE( "Ordering comparison checks that should succeed", "" ) { TestData data; @@ -144,8 +139,7 @@ TEST_CASE( "./succeeding/conditions/ordered", REQUIRE( data.str_hello > "a" ); } -TEST_CASE( "./failing/conditions/ordered", - "Ordering comparison checks that should fail" ) +TEST_CASE( "Ordering comparison checks that should fail", "[.][failing]" ) { TestData data; @@ -175,8 +169,7 @@ TEST_CASE( "./failing/conditions/ordered", } // Comparisons with int literals -TEST_CASE( "./succeeding/conditions/int literals", - "Comparisons with int literals don't warn when mixing signed/ unsigned" ) +TEST_CASE( "Comparisons with int literals don't warn when mixing signed/ unsigned", "" ) { int i = 1; unsigned int ui = 2; @@ -214,8 +207,7 @@ TEST_CASE( "./succeeding/conditions/int literals", #pragma warning(disable:4389) // '==' : signed/unsigned mismatch #endif -TEST_CASE( "./succeeding/conditions//long_to_unsigned_x", - "comparisons between int variables" ) +TEST_CASE( "comparisons between int variables", "" ) { long long_var = 1L; unsigned char unsigned_char_var = 1; @@ -229,8 +221,7 @@ TEST_CASE( "./succeeding/conditions//long_to_unsigned_x", REQUIRE( long_var == unsigned_long_var ); } -TEST_CASE( "./succeeding/conditions/const ints to int literal", - "comparisons between const int variables" ) +TEST_CASE( "comparisons between const int variables", "" ) { const unsigned char unsigned_char_var = 1; const unsigned short unsigned_short_var = 1; @@ -243,8 +234,7 @@ TEST_CASE( "./succeeding/conditions/const ints to int literal", REQUIRE( unsigned_long_var == 1 ); } -TEST_CASE( "./succeeding/conditions/negative ints", - "Comparisons between unsigned ints and negative signed ints match c++ standard behaviour" ) +TEST_CASE( "Comparisons between unsigned ints and negative signed ints match c++ standard behaviour", "" ) { CHECK( ( -1 > 2u ) ); CHECK( -1 > 2u ); @@ -266,8 +256,7 @@ struct Ex T operator * ( const T& ) const { return T(); } }; -TEST_CASE( "./succeeding/conditions/computed ints", - "Comparisons between ints where one side is computed" ) +TEST_CASE( "Comparisons between ints where one side is computed", "" ) { CHECK( 54 == 6*9 ); } @@ -279,8 +268,7 @@ TEST_CASE( "./succeeding/conditions/computed ints", inline const char* returnsConstNull(){ return NULL; } inline char* returnsNull(){ return NULL; } -TEST_CASE( "./succeeding/conditions/ptr", - "Pointers can be compared to null" ) +TEST_CASE( "Pointers can be compared to null", "" ) { TestData* p = NULL; TestData* pNULL = NULL; @@ -312,8 +300,7 @@ TEST_CASE( "./succeeding/conditions/ptr", // is detected and a warning issued. // An alternative form of the macros (CHECK_FALSE and REQUIRE_FALSE) can be used instead to capture // the operand value. -TEST_CASE( "./succeeding/conditions/not", - "'Not' checks that should succeed" ) +TEST_CASE( "'Not' checks that should succeed", "" ) { bool falseValue = false; @@ -329,8 +316,7 @@ TEST_CASE( "./succeeding/conditions/not", REQUIRE_FALSE( 1 == 2 ); } -TEST_CASE( "./failing/conditions/not", - "'Not' checks that should fail" ) +TEST_CASE( "'Not' checks that should fail", "[.][failing]" ) { bool trueValue = true; diff --git a/projects/SelfTest/ExceptionTests.cpp b/projects/SelfTest/ExceptionTests.cpp index 123e8cef..d15c3f67 100644 --- a/projects/SelfTest/ExceptionTests.cpp +++ b/projects/SelfTest/ExceptionTests.cpp @@ -28,33 +28,33 @@ namespace } } -TEST_CASE( "./succeeding/exceptions/explicit", "When checked exceptions are thrown they can be expected or unexpected" ) +TEST_CASE( "When checked exceptions are thrown they can be expected or unexpected", "" ) { REQUIRE_THROWS_AS( thisThrows(), std::domain_error ); REQUIRE_NOTHROW( thisDoesntThrow() ); REQUIRE_THROWS( thisThrows() ); } -TEST_CASE( "./failing/exceptions/explicit", "When checked exceptions are thrown they can be expected or unexpected" ) +TEST_CASE( "Expected exceptions that don't throw or unexpected exceptions fail the test", "[.][failing]" ) { CHECK_THROWS_AS( thisThrows(), std::string ); CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ); CHECK_NOTHROW( thisThrows() ); } -TEST_CASE( "./failing/exceptions/implicit", "When unchecked exceptions are thrown they are always failures" ) +TEST_CASE( "When unchecked exceptions are thrown directly they are always failures", "[.][failing]" ) { if( Catch::isTrue( true ) ) throw std::domain_error( "unexpected exception" ); } -TEST_CASE( "./failing/exceptions/implicit/2", "An unchecked exception reports the line of the last assertion" ) +TEST_CASE( "An unchecked exception reports the line of the last assertion", "[.][failing]" ) { CHECK( 1 == 1 ); if( Catch::isTrue( true ) ) throw std::domain_error( "unexpected exception" ); } -TEST_CASE( "./failing/exceptions/implicit/3", "When unchecked exceptions are thrown they are always failures" ) +TEST_CASE( "When unchecked exceptions are thrown from sections they are always failures", "[.][failing]" ) { SECTION( "section name", "" ) { @@ -63,12 +63,12 @@ TEST_CASE( "./failing/exceptions/implicit/3", "When unchecked exceptions are thr } } -TEST_CASE( "./failing/exceptions/implicit/4", "When unchecked exceptions are thrown they are always failures" ) +TEST_CASE( "When unchecked exceptions are thrown from functions they are always failures", "[.][failing]" ) { CHECK( thisThrows() == 0 ); } -TEST_CASE( "./succeeding/exceptions/implicit", "When unchecked exceptions are thrown, but caught, they do not affect the test" ) +TEST_CASE( "When unchecked exceptions are thrown, but caught, they do not affect the test", "" ) { try { @@ -105,7 +105,7 @@ CATCH_TRANSLATE_EXCEPTION( double& ex ) return Catch::toString( ex ); } -TEST_CASE( "./failing/exceptions/custom", "Unexpected custom exceptions can be translated" ) +TEST_CASE("Unexpected custom exceptions can be translated", "[.][failing]" ) { if( Catch::isTrue( true ) ) throw CustomException( "custom exception" ); @@ -116,18 +116,18 @@ inline void throwCustom() { throw CustomException( "custom exception - not std" ); } -TEST_CASE( "./failing/exceptions/custom/nothrow", "Custom exceptions can be translated when testing for nothrow" ) +TEST_CASE( "Custom exceptions can be translated when testing for nothrow", "[.][failing]" ) { REQUIRE_NOTHROW( throwCustom() ); } -TEST_CASE( "./failing/exceptions/custom/throw", "Custom exceptions can be translated when testing for throwing as something else" ) +TEST_CASE( "Custom exceptions can be translated when testing for throwing as something else", "[.][failing]" ) { REQUIRE_THROWS_AS( throwCustom(), std::exception ); } -TEST_CASE( "./failing/exceptions/custom/double", "Unexpected custom exceptions can be translated" ) +TEST_CASE( "Unexpected exceptions can be translated", "[.][failing]" ) { if( Catch::isTrue( true ) ) throw double( 3.14 ); @@ -137,7 +137,7 @@ inline int thisFunctionNotImplemented( int ) { CATCH_NOT_IMPLEMENTED; } -TEST_CASE( "./succeeding/exceptions/notimplemented", "" ) +TEST_CASE( "NotImplemented exception", "" ) { REQUIRE_THROWS( thisFunctionNotImplemented( 7 ) ); } diff --git a/projects/SelfTest/GeneratorTests.cpp b/projects/SelfTest/GeneratorTests.cpp index b21e22dd..a961b698 100644 --- a/projects/SelfTest/GeneratorTests.cpp +++ b/projects/SelfTest/GeneratorTests.cpp @@ -16,7 +16,7 @@ inline int multiply( int a, int b ) return a*b; } -CATCH_TEST_CASE( "./succeeding/generators/1", "Generators over two ranges" ) +CATCH_TEST_CASE( "Generators over two ranges", "[generators]" ) { using namespace Catch::Generators; @@ -29,7 +29,7 @@ CATCH_TEST_CASE( "./succeeding/generators/1", "Generators over two ranges" ) struct IntPair { int first, second; }; -CATCH_TEST_CASE( "./succeeding/generators/2", "Generator over a range of pairs" ) +CATCH_TEST_CASE( "Generator over a range of pairs", "[generators]" ) { using namespace Catch::Generators; diff --git a/projects/SelfTest/MessageTests.cpp b/projects/SelfTest/MessageTests.cpp index 9ba6eaec..2065708d 100644 --- a/projects/SelfTest/MessageTests.cpp +++ b/projects/SelfTest/MessageTests.cpp @@ -8,17 +8,17 @@ #include "catch.hpp" -TEST_CASE( "./succeeding/message", "INFO and WARN do not abort tests" ) +TEST_CASE( "INFO and WARN do not abort tests", "[messages]" ) { INFO( "this is a " << "message" ); // This should output the message if a failure occurs WARN( "this is a " << "warning" ); // This should always output the message but then continue } -TEST_CASE( "./succeeding/succeed", "SUCCEED counts as a test pass" ) +TEST_CASE( "SUCCEED counts as a test pass" ) { SUCCEED( "this is a " << "success" ); } -TEST_CASE( "./failing/message/info/1", "INFO gets logged on failure" ) +TEST_CASE( "INFO gets logged on failure", "[failing][messages][.]" ) { INFO( "this message should be logged" ); INFO( "so should this" ); @@ -26,7 +26,7 @@ TEST_CASE( "./failing/message/info/1", "INFO gets logged on failure" ) REQUIRE( a == 1 ); } -TEST_CASE( "./mixed/message/info/2", "INFO gets logged on failure" ) +TEST_CASE( "INFO gets logged on failure, even if captured before successful assertions", "[failing][messages][.]" ) { INFO( "this message may be logged later" ); int a = 2; @@ -45,13 +45,13 @@ TEST_CASE( "./mixed/message/info/2", "INFO gets logged on failure" ) CHECK( a == 2 ); } -TEST_CASE( "./failing/message/fail", "FAIL aborts the test" ) +TEST_CASE( "FAIL aborts the test", "[failing][messages][.]" ) { if( Catch::isTrue( true ) ) FAIL( "This is a " << "failure" ); // This should output the message and abort } -TEST_CASE( "./failing/message/sections", "Output from all sections is reported" ) +TEST_CASE( "Output from all sections is reported", "[failing][messages][.]" ) { SECTION( "one", "" ) { @@ -64,7 +64,7 @@ TEST_CASE( "./failing/message/sections", "Output from all sections is reported" } } -TEST_CASE( "./succeeding/message/sections/stdout", "Output from all sections is reported" ) +TEST_CASE( "Standard output from all sections is reported", "[messages]" ) { SECTION( "one", "" ) { @@ -77,7 +77,7 @@ TEST_CASE( "./succeeding/message/sections/stdout", "Output from all sections is } } -TEST_CASE( "./mixed/message/scoped", "" ) +TEST_CASE( "SCOPED_INFO is reset for each loop", "[messages][failing][.]" ) { for( int i=0; i<100; i++ ) { @@ -87,16 +87,25 @@ TEST_CASE( "./mixed/message/scoped", "" ) } } -TEST_CASE( "./succeeding/nofail", "The NO_FAIL macro reports a failure but does not fail the test" ) +TEST_CASE( "The NO_FAIL macro reports a failure but does not fail the test", "[messages]" ) { CHECK_NOFAIL( 1 == 2 ); } -TEST_CASE( "just info", "[info][isolated info][.]" ) +TEST_CASE( "just info", "[info][isolated info][messages]" ) { INFO( "this should never be seen" ); } -TEST_CASE( "just failure", "[fail][isolated info][.]" ) +TEST_CASE( "just failure", "[fail][isolated info][.][messages]" ) { FAIL( "Previous info should not be seen" ); } + + +TEST_CASE( "sends information to INFO", "[.][failing]" ) +{ + INFO( "hi" ); + int i = 7; + CAPTURE( i ); + REQUIRE( false ); +} diff --git a/projects/SelfTest/MiscTests.cpp b/projects/SelfTest/MiscTests.cpp index ad3b239c..4a9f172f 100644 --- a/projects/SelfTest/MiscTests.cpp +++ b/projects/SelfTest/MiscTests.cpp @@ -11,7 +11,7 @@ #include -TEST_CASE( "./succeeding/Misc/Sections", "random SECTION tests" ) +TEST_CASE( "random SECTION tests", "[.][sections][failing]" ) { int a = 1; int b = 2; @@ -28,7 +28,7 @@ TEST_CASE( "./succeeding/Misc/Sections", "random SECTION tests" ) } } -TEST_CASE( "./succeeding/Misc/Sections/nested", "nested SECTION tests" ) +TEST_CASE( "nested SECTION tests", "[.][sections][failing]" ) { int a = 1; int b = 2; @@ -45,7 +45,7 @@ TEST_CASE( "./succeeding/Misc/Sections/nested", "nested SECTION tests" ) } } -TEST_CASE( "./mixed/Misc/Sections/nested2", "nested SECTION tests" ) +TEST_CASE( "more nested SECTION tests", "[sections][failing][.]" ) { int a = 1; int b = 2; @@ -68,7 +68,7 @@ TEST_CASE( "./mixed/Misc/Sections/nested2", "nested SECTION tests" ) } } -TEST_CASE( "./Sections/nested/a/b", "nested SECTION tests" ) +TEST_CASE( "even more nested SECTION tests", "[sections]" ) { SECTION( "c", "" ) { @@ -86,7 +86,7 @@ TEST_CASE( "./Sections/nested/a/b", "nested SECTION tests" ) } } -TEST_CASE( "./mixed/Misc/Sections/loops", "looped SECTION tests" ) +TEST_CASE( "looped SECTION tests", "[.][failing][sections]" ) { int a = 1; @@ -101,7 +101,7 @@ TEST_CASE( "./mixed/Misc/Sections/loops", "looped SECTION tests" ) } } -TEST_CASE( "./mixed/Misc/loops", "looped tests" ) +TEST_CASE( "looped tests", "[.][failing]" ) { static const int fib[] = { 1, 1, 2, 3, 5, 8, 13, 21 }; @@ -112,7 +112,7 @@ TEST_CASE( "./mixed/Misc/loops", "looped tests" ) } } -TEST_CASE( "./succeeding/Misc/stdout,stderr", "Sends stuff to stdout and stderr" ) +TEST_CASE( "Sends stuff to stdout and stderr", "" ) { std::cout << "Some information" << std::endl; @@ -124,19 +124,12 @@ inline const char* makeString( bool makeNull ) return makeNull ? NULL : "valid string"; } -TEST_CASE( "./succeeding/Misc/null strings", "" ) +TEST_CASE( "null strings", "" ) { REQUIRE( makeString( false ) != static_cast(NULL)); REQUIRE( makeString( true ) == static_cast(NULL)); } -TEST_CASE( "./failing/info", "sends information to INFO" ) -{ - INFO( "hi" ); - int i = 7; - CAPTURE( i ); - REQUIRE( false ); -} inline bool testCheckedIf( bool flag ) { @@ -146,12 +139,12 @@ inline bool testCheckedIf( bool flag ) return false; } -TEST_CASE( "./succeeding/checkedif", "" ) +TEST_CASE( "checkedIf", "" ) { REQUIRE( testCheckedIf( true ) ); } -TEST_CASE( "./failing/checkedif", "" ) +TEST_CASE( "checkedIf, failing", "[failing][.]" ) { REQUIRE( testCheckedIf( false ) ); } @@ -164,17 +157,17 @@ inline bool testCheckedElse( bool flag ) return true; } -TEST_CASE( "./succeeding/checkedelse", "" ) +TEST_CASE( "checkedElse", "" ) { REQUIRE( testCheckedElse( true ) ); } -TEST_CASE( "./failing/checkedelse", "" ) +TEST_CASE( "checkedElse, failing", "[failing][.]" ) { REQUIRE( testCheckedElse( false ) ); } -TEST_CASE( "./misc/xmlentitycheck", "" ) +TEST_CASE( "xmlentitycheck", "" ) { SECTION( "embedded xml", "it should be possible to embed xml characters, such as <, \" or &, or even whole documents within an attribute" ) { @@ -186,13 +179,13 @@ TEST_CASE( "./misc/xmlentitycheck", "" ) } } -TEST_CASE( "./manual/onechar", "send a single char to INFO" ) +TEST_CASE( "send a single char to INFO", "[failing][.]" ) { INFO(3); REQUIRE(false); } -TEST_CASE("./succeeding/atomic if", "") +TEST_CASE( "atomic if", "[failing][0]") { size_t x = 0; @@ -207,7 +200,7 @@ inline const char* testStringForMatching() return "this string contains 'abc' as a substring"; } -TEST_CASE("./succeeding/matchers", "") +TEST_CASE("String matchers", "[matchers]" ) { REQUIRE_THAT( testStringForMatching(), Contains( "string" ) ); CHECK_THAT( testStringForMatching(), Contains( "abc" ) ); @@ -216,40 +209,40 @@ TEST_CASE("./succeeding/matchers", "") CHECK_THAT( testStringForMatching(), EndsWith( "substring" ) ); } -TEST_CASE("./failing/matchers/Contains", "") +TEST_CASE("Contains string matcher", "[.][failing][matchers]") { CHECK_THAT( testStringForMatching(), Contains( "not there" ) ); } -TEST_CASE("./failing/matchers/StartsWith", "") +TEST_CASE("StartsWith string matcher", "[.][failing][matchers]") { CHECK_THAT( testStringForMatching(), StartsWith( "string" ) ); } -TEST_CASE("./failing/matchers/EndsWith", "") +TEST_CASE("EndsWith string matcher", "[.][failing][matchers]") { CHECK_THAT( testStringForMatching(), EndsWith( "this" ) ); } -TEST_CASE("./failing/matchers/Equals", "") +TEST_CASE("Equals string matcher", "[.][failing][matchers]") { CHECK_THAT( testStringForMatching(), Equals( "something else" ) ); } -TEST_CASE("string", "Equals with NULL") +TEST_CASE("Equals string matcher, with NULL", "[matchers]") { REQUIRE_THAT("", Equals(NULL)); } -TEST_CASE("./succeeding/matchers/AllOf", "") +TEST_CASE("AllOf matcher", "[matchers]") { CHECK_THAT( testStringForMatching(), AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) ); } -TEST_CASE("./succeeding/matchers/AnyOf", "") +TEST_CASE("AnyOf matcher", "[matchers]") { CHECK_THAT( testStringForMatching(), AnyOf( Catch::Contains( "string" ), Catch::Contains( "not there" ) ) ); CHECK_THAT( testStringForMatching(), AnyOf( Catch::Contains( "not there" ), Catch::Contains( "string" ) ) ); } -TEST_CASE("./succeeding/matchers/Equals", "") +TEST_CASE("Equals", "[matchers]") { CHECK_THAT( testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) ); } @@ -268,7 +261,7 @@ TEST_CASE( "Factorials are computed", "[factorial]" ) { REQUIRE( Factorial(10) == 3628800 ); } -TEST_CASE( "empty", "An empty test with no assertions" ) +TEST_CASE( "An empty test with no assertions", "[empty]" ) { } @@ -333,7 +326,7 @@ TEST_CASE( "vectors can be sized and resized", "[vector]" ) { } // https://github.com/philsquared/Catch/issues/166 -TEST_CASE("./failing/CatchSectionInfiniteLoop", "") +TEST_CASE("A couple of nested sections followed by a failure", "[failing][.]") { SECTION("Outer", "") SECTION("Inner", "") diff --git a/projects/SelfTest/TestMain.cpp b/projects/SelfTest/TestMain.cpp index dc2684ed..00796e93 100644 --- a/projects/SelfTest/TestMain.cpp +++ b/projects/SelfTest/TestMain.cpp @@ -13,52 +13,6 @@ #include "internal/catch_text.h" #include "internal/catch_console_colour.hpp" -TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" ) { - using namespace Catch; - - /////////////////////////////////////////////////////////////////////////// - SECTION( "selftest/expected result", - "Tests do what they claim" ) { - - SECTION( "selftest/expected result/failing tests", - "Tests in the 'failing' branch fail" ) { - MetaTestRunner::runMatching( "./failing/*", MetaTestRunner::Expected::ToFail, 0, 2 ); - } - - SECTION( "selftest/expected result/succeeding tests", - "Tests in the 'succeeding' branch succeed" ) { - MetaTestRunner::runMatching( "./succeeding/*", MetaTestRunner::Expected::ToSucceed, 1, 2 ); - } - } - - /////////////////////////////////////////////////////////////////////////// - SECTION( "selftest/test counts", - "Number of test cases that run is fixed" ) { - EmbeddedRunner runner; - - SECTION( "selftest/test counts/succeeding tests", - "Number of 'succeeding' tests is fixed" ) { - Totals totals = runner.runMatching( "./succeeding/*", 0, 2 ); - CHECK( totals.assertions.passed == 298 ); - CHECK( totals.assertions.failed == 0 ); - } - - SECTION( "selftest/test counts/failing tests", - "Number of 'failing' tests is fixed" ) { - Totals totals = runner.runMatching( "./failing/*", 1, 2 ); - CHECK( totals.assertions.passed == 2 ); - CHECK( totals.assertions.failed == 77 ); - } - } -} - -TEST_CASE( "meta/Misc/Sections", "looped tests" ) { - Catch::EmbeddedRunner runner; - - Catch::Totals totals = runner.runMatching( "./mixed/Misc/Sections/nested2", 0, 1 ); - CHECK( totals.assertions.passed == 2 ); - CHECK( totals.assertions.failed == 1 ); -} #ifdef __clang__ #pragma clang diagnostic ignored "-Wweak-vtables" diff --git a/projects/SelfTest/TrickyTests.cpp b/projects/SelfTest/TrickyTests.cpp index 27e1b8fd..624ba264 100644 --- a/projects/SelfTest/TrickyTests.cpp +++ b/projects/SelfTest/TrickyTests.cpp @@ -27,8 +27,8 @@ namespace Catch /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./succeeding/Tricky/std::pair", - "Parsing a std::pair" + "Parsing a std::pair", + "[Tricky][std::pair]" ) { std::pair aNicePair( 1, 2 ); @@ -39,8 +39,8 @@ TEST_CASE /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./inprogress/failing/Tricky/trailing expression", - "Where the is more to the expression after the RHS" + "Where the is more to the expression after the RHS[failing]", + "[Tricky][failing][.]" ) { // int a = 1, b = 2; @@ -50,8 +50,8 @@ TEST_CASE /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./inprogress/failing/Tricky/compound lhs", - "Where the LHS is not a simple value" + "Where the LHS is not a simple value[failing]", + "[Tricky][failing][.]" ) { /* @@ -76,8 +76,8 @@ struct Opaque /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./failing/Tricky/non streamable type", - "A failing expression with a non streamable type is still captured" + "A failing expression with a non streamable type is still captured[failing]", + "[Tricky][failing][.]" ) { @@ -92,8 +92,8 @@ TEST_CASE /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./failing/string literals", - "string literals of different sizes can be compared" + "string literals of different sizes can be compared[failing]", + "[Tricky][failing][.]" ) { REQUIRE( std::string( "first" ) == "second" ); @@ -103,8 +103,8 @@ TEST_CASE /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./succeeding/side-effects", - "An expression with side-effects should only be evaluated once" + "An expression with side-effects should only be evaluated once", + "[Tricky]" ) { int i = 7; @@ -151,8 +151,8 @@ inline bool operator==(const B::Y& lhs, const A::X& rhs) /* This, currently, does not compile with LLVM TEST_CASE ( - "./succeeding/koenig", "Operators at different namespace levels not hijacked by Koenig lookup" + "[Tricky]" ) { A::X x; @@ -171,8 +171,8 @@ namespace ObjectWithConversions /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( - "./succeeding/koenig", - "Operators at different namespace levels not hijacked by Koenig lookup" + "Operators at different namespace levels not hijacked by Koenig lookup", + "[Tricky]" ) { Object o; @@ -199,7 +199,7 @@ namespace ObjectWithNonConstEqualityOperator unsigned int m_value; }; - TEST_CASE("./succeeding/non-const==", "Demonstrate that a non-const == is not used") + TEST_CASE("Demonstrate that a non-const == is not used", "[Tricky]" ) { Test t( 1 ); REQUIRE( t == 1u ); @@ -212,7 +212,7 @@ namespace EnumBitFieldTests bit30 = 0x40000000, bit31 = 0x80000000, bit30and31 = 0xc0000000}; - TEST_CASE("./succeeding/enum/bits", "Test enum bit values") + TEST_CASE( "Test enum bit values", "[Tricky]" ) { REQUIRE( 0xc0000000 == bit30and31 ); } @@ -226,7 +226,7 @@ struct Obj int* prop; }; -TEST_CASE("./succeeding/boolean member", "") +TEST_CASE("boolean member", "[Tricky]") { Obj obj; REQUIRE( obj.prop != NULL ); @@ -238,14 +238,14 @@ TEST_CASE("./succeeding/boolean member", "") // struct it is declared in - but when evaluating it in a deduced // context it appears to require the extra definition. // The issue was fixed by adding bool overloads to bypass the -// templates that were deduce it. +// templates that were there to deduce it. template struct is_true { static const bool value = B; }; -TEST_CASE( "./succeeding/unimplemented static bool", "static bools can be evaluated" ) +TEST_CASE( "(unimplemented) static bools can be evaluated", "[Tricky]" ) { SECTION("compare to true","") { @@ -277,11 +277,11 @@ TEST_CASE( "./succeeding/unimplemented static bool", "static bools can be evalua // Uncomment these tests to produce an error at test registration time /* -TEST_CASE( "./sameName", "Tests with the same name are not allowed" ) +TEST_CASE( "Tests with the same name are not allowed", "[Tricky]" ) { } -TEST_CASE( "./sameName", "Tests with the same name are not allowed" ) +TEST_CASE( "Tests with the same name are not allowed", "[Tricky]" ) { } @@ -298,7 +298,7 @@ struct Boolable bool m_value; }; -TEST_CASE( "./succeeding/SafeBool", "Objects that evaluated in boolean contexts can be checked") +TEST_CASE( "Objects that evaluated in boolean contexts can be checked", "[Tricky][SafeBool]" ) { Boolable True( true ); Boolable False( false ); @@ -308,7 +308,7 @@ TEST_CASE( "./succeeding/SafeBool", "Objects that evaluated in boolean contexts CHECK_FALSE( False ); } -TEST_CASE( "Assertions then sections", "" ) +TEST_CASE( "Assertions then sections", "[Tricky]" ) { // This was causing a failure due to the way the console reporter was handling // the current section @@ -335,7 +335,7 @@ struct Awkward operator int() const { return 7; } }; -TEST_CASE( "non streamable - with conv. op", "" ) +TEST_CASE( "non streamable - with conv. op", "[Tricky]" ) { Awkward awkward; std::string s = Catch::toString( awkward ); @@ -346,7 +346,7 @@ inline void foo() {} typedef void (*fooptr_t)(); -TEST_CASE( "Comparing function pointers", "[function pointer]" ) +TEST_CASE( "Comparing function pointers", "[Tricky][function pointer]" ) { // This was giving a warning in VS2010 // #179 @@ -358,7 +358,7 @@ TEST_CASE( "Comparing function pointers", "[function pointer]" ) class ClassName {}; -TEST_CASE( "pointer to class", "" ) +TEST_CASE( "pointer to class", "[Tricky]" ) { ClassName *p = 0; REQUIRE( p == 0 ); @@ -368,7 +368,7 @@ TEST_CASE( "pointer to class", "" ) #include -TEST_CASE( "null_ptr", "" ) +TEST_CASE( "null_ptr", "[Tricky]" ) { std::unique_ptr ptr; REQUIRE(ptr.get() == nullptr); @@ -376,7 +376,7 @@ TEST_CASE( "null_ptr", "" ) #endif -TEST_CASE( "X/level/0/a", "" ) { SUCCEED(""); } -TEST_CASE( "X/level/0/b", "[fizz]" ) { SUCCEED(""); } -TEST_CASE( "X/level/1/a", "" ) { SUCCEED(""); } -TEST_CASE( "X/level/1/b", "" ) { SUCCEED("");} +TEST_CASE( "X/level/0/a", "[Tricky]" ) { SUCCEED(""); } +TEST_CASE( "X/level/0/b", "[Tricky][fizz]" ){ SUCCEED(""); } +TEST_CASE( "X/level/1/a", "[Tricky]" ) { SUCCEED(""); } +TEST_CASE( "X/level/1/b", "[Tricky]" ) { SUCCEED(""); } diff --git a/projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj b/projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj index f140739c..619378e1 100644 --- a/projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj +++ b/projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj @@ -145,9 +145,6 @@ - - -