diff options
| author | Martin Hořeňovský | 2022-04-23 23:34:27 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-04-23 23:34:27 +0200 |
| commit | 5baa29b6b9405913455ba5f628679575c7b915ee (patch) | |
| tree | 662605879991aa78f7f939d8a2c865ccb880d7b3 | |
| parent | 291b35b389b8e6d7b560cf7e43b6c72c4b73e522 (diff) | |
| download | catch3-5baa29b6b9405913455ba5f628679575c7b915ee.tar.gz | |
Add test for %debug stream name
18 files changed, 74 insertions, 14 deletions
diff --git a/tests/SelfTest/Baselines/automake.sw.approved.txt b/tests/SelfTest/Baselines/automake.sw.approved.txt index 8da193da..a0e83826 100644 --- a/tests/SelfTest/Baselines/automake.sw.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.approved.txt @@ -320,6 +320,7 @@ loose text artifact :test-result: PASS long long :test-result: FAIL looped SECTION tests :test-result: FAIL looped tests +:test-result: PASS makeStream recognizes %debug stream name :test-result: PASS make_unique reimplementation :test-result: PASS mean :test-result: PASS measure diff --git a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt index c95a970d..a1dd3ffc 100644 --- a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt @@ -312,6 +312,7 @@ :test-result: PASS long long :test-result: FAIL looped SECTION tests :test-result: FAIL looped tests +:test-result: PASS makeStream recognizes %debug stream name :test-result: PASS make_unique reimplementation :test-result: PASS mean :test-result: PASS measure diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt index bf9482c6..0f5d6fb9 100644 --- a/tests/SelfTest/Baselines/compact.sw.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -2269,6 +2269,7 @@ Misc.tests.cpp:<line number>: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 mes Misc.tests.cpp:<line number>: passed: ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[5] (8) is even' Misc.tests.cpp:<line number>: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[6] (13) is even' Misc.tests.cpp:<line number>: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[7] (21) is even' +Stream.tests.cpp:<line number>: passed: Catch::makeStream( "%debug" ) UniquePtr.tests.cpp:<line number>: passed: !(lval.has_moved) for: !false UniquePtr.tests.cpp:<line number>: passed: rval.has_moved for: true UniquePtr.tests.cpp:<line number>: passed: *ptr == std::tuple<int, double, int>{1, 2., 3} for: {?} == {?} diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt index a94192eb..f3655ea8 100644 --- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt @@ -2261,6 +2261,7 @@ Misc.tests.cpp:<line number>: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 mes Misc.tests.cpp:<line number>: passed: ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[5] (8) is even' Misc.tests.cpp:<line number>: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[6] (13) is even' Misc.tests.cpp:<line number>: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[7] (21) is even' +Stream.tests.cpp:<line number>: passed: Catch::makeStream( "%debug" ) UniquePtr.tests.cpp:<line number>: passed: !(lval.has_moved) for: !false UniquePtr.tests.cpp:<line number>: passed: rval.has_moved for: true UniquePtr.tests.cpp:<line number>: passed: *ptr == std::tuple<int, double, int>{1, 2., 3} for: {?} == {?} diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt index c85a9203..fd2bff6e 100644 --- a/tests/SelfTest/Baselines/console.std.approved.txt +++ b/tests/SelfTest/Baselines/console.std.approved.txt @@ -1394,6 +1394,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 390 | 314 passed | 69 failed | 7 failed as expected -assertions: 2225 | 2070 passed | 128 failed | 27 failed as expected +test cases: 391 | 315 passed | 69 failed | 7 failed as expected +assertions: 2226 | 2071 passed | 128 failed | 27 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt index 8bb1c3db..acfbe42e 100644 --- a/tests/SelfTest/Baselines/console.sw.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.approved.txt @@ -15976,6 +15976,15 @@ with message: Testing if fib[7] (21) is even ------------------------------------------------------------------------------- +makeStream recognizes %debug stream name +------------------------------------------------------------------------------- +Stream.tests.cpp:<line number> +............................................................................... + +Stream.tests.cpp:<line number>: PASSED: + REQUIRE_NOTHROW( Catch::makeStream( "%debug" ) ) + +------------------------------------------------------------------------------- make_unique reimplementation From lvalue copies ------------------------------------------------------------------------------- @@ -17925,6 +17934,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 390 | 300 passed | 83 failed | 7 failed as expected -assertions: 2240 | 2070 passed | 143 failed | 27 failed as expected +test cases: 391 | 301 passed | 83 failed | 7 failed as expected +assertions: 2241 | 2071 passed | 143 failed | 27 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt index a64c56a5..1268daff 100644 --- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt @@ -15968,6 +15968,15 @@ with message: Testing if fib[7] (21) is even ------------------------------------------------------------------------------- +makeStream recognizes %debug stream name +------------------------------------------------------------------------------- +Stream.tests.cpp:<line number> +............................................................................... + +Stream.tests.cpp:<line number>: PASSED: + REQUIRE_NOTHROW( Catch::makeStream( "%debug" ) ) + +------------------------------------------------------------------------------- make_unique reimplementation From lvalue copies ------------------------------------------------------------------------------- @@ -17917,6 +17926,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 390 | 300 passed | 83 failed | 7 failed as expected -assertions: 2240 | 2070 passed | 143 failed | 27 failed as expected +test cases: 391 | 301 passed | 83 failed | 7 failed as expected +assertions: 2241 | 2071 passed | 143 failed | 27 failed as expected diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt index 1c2c3f93..fc059acd 100644 --- a/tests/SelfTest/Baselines/junit.sw.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuitesloose text artifact > - <testsuite name="<exe-name>" errors="17" failures="126" tests="2240" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="126" tests="2241" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="random-seed" value="1"/> <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/> @@ -1727,6 +1727,7 @@ Testing if fib[7] (21) is even Misc.tests.cpp:<line number> </failure> </testcase> + <testcase classname="<exe-name>.global" name="makeStream recognizes %debug stream name" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="make_unique reimplementation/From lvalue copies" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="make_unique reimplementation/From rvalue moves" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="make_unique reimplementation/Variadic constructor" time="{duration}" status="run"/> diff --git a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt index 6619466b..06ade42c 100644 --- a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuites> - <testsuite name="<exe-name>" errors="17" failures="126" tests="2240" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="126" tests="2241" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="random-seed" value="1"/> <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/> @@ -1726,6 +1726,7 @@ Testing if fib[7] (21) is even Misc.tests.cpp:<line number> </failure> </testcase> + <testcase classname="<exe-name>.global" name="makeStream recognizes %debug stream name" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="make_unique reimplementation/From lvalue copies" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="make_unique reimplementation/From rvalue moves" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="make_unique reimplementation/Variadic constructor" time="{duration}" status="run"/> diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt index f2ec6f49..4cdab2d3 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -224,6 +224,7 @@ <file path="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp"> <testCase name="Cout stream properly declares it writes to stdout" duration="{duration}"/> <testCase name="Empty stream name opens cout stream" duration="{duration}"/> + <testCase name="makeStream recognizes %debug stream name" duration="{duration}"/> <testCase name="request an unknown %-starting stream fails" duration="{duration}"/> <testCase name="stdout and stderr streams have %-starting name" duration="{duration}"/> </file> diff --git a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt index 98cb8b7d..d5608195 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt @@ -223,6 +223,7 @@ <file path="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp"> <testCase name="Cout stream properly declares it writes to stdout" duration="{duration}"/> <testCase name="Empty stream name opens cout stream" duration="{duration}"/> + <testCase name="makeStream recognizes %debug stream name" duration="{duration}"/> <testCase name="request an unknown %-starting stream fails" duration="{duration}"/> <testCase name="stdout and stderr streams have %-starting name" duration="{duration}"/> </file> diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index a2e69782..b893dcdd 100644 --- a/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -4019,6 +4019,8 @@ ok {test-number} - ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if f not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[6] (13) is even' # looped tests not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[7] (21) is even' +# makeStream recognizes %debug stream name +ok {test-number} - Catch::makeStream( "%debug" ) # make_unique reimplementation ok {test-number} - !(lval.has_moved) for: !false # make_unique reimplementation @@ -4483,5 +4485,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2240 +1..2241 diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt index 69d85c7a..3cbba8f6 100644 --- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt @@ -4011,6 +4011,8 @@ ok {test-number} - ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if f not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[6] (13) is even' # looped tests not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[7] (21) is even' +# makeStream recognizes %debug stream name +ok {test-number} - Catch::makeStream( "%debug" ) # make_unique reimplementation ok {test-number} - !(lval.has_moved) for: !false # make_unique reimplementation @@ -4475,5 +4477,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2240 +1..2241 diff --git a/tests/SelfTest/Baselines/teamcity.sw.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.approved.txt index 2ef7d121..c028b21a 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.approved.txt @@ -779,6 +779,8 @@ Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[6|] (13) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[7|] (21) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] ##teamcity[testFinished name='looped tests' duration="{duration}"] +##teamcity[testStarted name='makeStream recognizes %debug stream name'] +##teamcity[testFinished name='makeStream recognizes %debug stream name' duration="{duration}"] ##teamcity[testStarted name='make_unique reimplementation'] ##teamcity[testFinished name='make_unique reimplementation' duration="{duration}"] ##teamcity[testStarted name='mean'] diff --git a/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt index 4edcdab5..9f534639 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt @@ -778,6 +778,8 @@ Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[6|] (13) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[7|] (21) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] ##teamcity[testFinished name='looped tests' duration="{duration}"] +##teamcity[testStarted name='makeStream recognizes %debug stream name'] +##teamcity[testFinished name='makeStream recognizes %debug stream name' duration="{duration}"] ##teamcity[testStarted name='make_unique reimplementation'] ##teamcity[testFinished name='make_unique reimplementation' duration="{duration}"] ##teamcity[testStarted name='mean'] diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt index 95d1c51a..27dad165 100644 --- a/tests/SelfTest/Baselines/xml.sw.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -18765,6 +18765,17 @@ loose text artifact </Expression> <OverallResult success="false"/> </TestCase> + <TestCase name="makeStream recognizes %debug stream name" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > + <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > + <Original> + Catch::makeStream( "%debug" ) + </Original> + <Expanded> + Catch::makeStream( "%debug" ) + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> <TestCase name="make_unique reimplementation" tags="[internals][unique-ptr]" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Section name="From lvalue copies" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -21050,6 +21061,6 @@ loose text artifact </Section> <OverallResult success="true"/> </TestCase> - <OverallResults successes="2070" failures="143" expectedFailures="27"/> - <OverallResultsCases successes="300" failures="83" expectedFailures="7"/> + <OverallResults successes="2071" failures="143" expectedFailures="27"/> + <OverallResultsCases successes="301" failures="83" expectedFailures="7"/> </Catch2TestRun> diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt index a222ab37..40cca5e3 100644 --- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt @@ -18764,6 +18764,17 @@ There is no extra whitespace here </Expression> <OverallResult success="false"/> </TestCase> + <TestCase name="makeStream recognizes %debug stream name" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > + <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > + <Original> + Catch::makeStream( "%debug" ) + </Original> + <Expanded> + Catch::makeStream( "%debug" ) + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> <TestCase name="make_unique reimplementation" tags="[internals][unique-ptr]" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Section name="From lvalue copies" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -21049,6 +21060,6 @@ There is no extra whitespace here </Section> <OverallResult success="true"/> </TestCase> - <OverallResults successes="2070" failures="143" expectedFailures="27"/> - <OverallResultsCases successes="300" failures="83" expectedFailures="7"/> + <OverallResults successes="2071" failures="143" expectedFailures="27"/> + <OverallResultsCases successes="301" failures="83" expectedFailures="7"/> </Catch2TestRun> diff --git a/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp b/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp index 5ad92e8c..6b1d377c 100644 --- a/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp @@ -26,3 +26,7 @@ TEST_CASE( "stdout and stderr streams have %-starting name", "[streams]" ) { TEST_CASE( "request an unknown %-starting stream fails", "[streams]" ) { REQUIRE_THROWS( Catch::makeStream( "%somestream" ) ); } + +TEST_CASE( "makeStream recognizes %debug stream name", "[streams]" ) { + REQUIRE_NOTHROW( Catch::makeStream( "%debug" ) ); +} |