diff options
| author | Martin Hořeňovský | 2022-03-24 00:09:27 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-03-24 16:02:56 +0100 |
| commit | 6227ca317e4ca36769a5943587060064ccbe3729 (patch) | |
| tree | d388f40ef7a5b1b06d132cea16500afa2b5b65ee /tests/SelfTest | |
| parent | 081a1e9abaf32a759fd08a01fcf7a65860f91a63 (diff) | |
| download | catch3-6227ca317e4ca36769a5943587060064ccbe3729.tar.gz | |
Add tests for ColourGuard
Diffstat (limited to 'tests/SelfTest')
18 files changed, 405 insertions, 14 deletions
diff --git a/tests/SelfTest/Baselines/automake.sw.approved.txt b/tests/SelfTest/Baselines/automake.sw.approved.txt index f9ab0b77..fadb2747 100644 --- a/tests/SelfTest/Baselines/automake.sw.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.approved.txt @@ -104,6 +104,7 @@ Nor would this :test-result: PASS Character pretty printing :test-result: PASS Clara::Arg supports single-arg parse the way Opt does :test-result: PASS Clara::Opt supports accept-many lambdas +:test-result: PASS ColourGuard behaviour :test-result: PASS Combining MatchAllOfGeneric does not nest :test-result: PASS Combining MatchAnyOfGeneric does not nest :test-result: PASS Combining MatchNotOfGeneric does not nest diff --git a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt index f9a6431f..f05de0ab 100644 --- a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt @@ -102,6 +102,7 @@ :test-result: PASS Character pretty printing :test-result: PASS Clara::Arg supports single-arg parse the way Opt does :test-result: PASS Clara::Opt supports accept-many lambdas +:test-result: PASS ColourGuard behaviour :test-result: PASS Combining MatchAllOfGeneric does not nest :test-result: PASS Combining MatchAnyOfGeneric does not nest :test-result: PASS Combining MatchNotOfGeneric does not nest diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt index 723e6470..c4425048 100644 --- a/tests/SelfTest/Baselines/compact.sw.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -366,6 +366,33 @@ Clara.tests.cpp:<line number>: passed: name == "foo" for: "foo" == "foo" Clara.tests.cpp:<line number>: passed: !(parse_result) for: !{?} Clara.tests.cpp:<line number>: passed: parse_result for: {?} Clara.tests.cpp:<line number>: passed: res == std::vector<std::string>{ "aaa", "bbb" } for: { "aaa", "bbb" } == { "aaa", "bbb" } +ColourImpl.tests.cpp:<line number>: passed: streamWrapper.str().empty() for: true +ColourImpl.tests.cpp:<line number>: passed: streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" for: "1 +Using code: 2 +2 +Using code: 0 +3 +" +== +"1 +Using code: 2 +2 +Using code: 0 +3 +" +ColourImpl.tests.cpp:<line number>: passed: streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" for: "Using code: 2 +A +B +Using code: 0 +C +" +== +"Using code: 2 +A +B +Using code: 0 +C +" Matchers.tests.cpp:<line number>: passed: with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch::Matchers::Detail:: MatchAllOfGeneric<MatcherA, MatcherB, MatcherC>>::value' Matchers.tests.cpp:<line number>: passed: 1, ( MatcherA() && MatcherB() ) && MatcherC() for: 1 ( equals: (int) 1 or (float) 1.0f and equals: (long long) 1 and equals: (T) 1 ) Matchers.tests.cpp:<line number>: passed: with 1 message: 'std::is_same< decltype( MatcherA() && ( MatcherB() && MatcherC() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric<MatcherA, MatcherB, MatcherC>>::value' diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt index a39bbfdc..55d2cf6a 100644 --- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt @@ -364,6 +364,33 @@ Clara.tests.cpp:<line number>: passed: name == "foo" for: "foo" == "foo" Clara.tests.cpp:<line number>: passed: !(parse_result) for: !{?} Clara.tests.cpp:<line number>: passed: parse_result for: {?} Clara.tests.cpp:<line number>: passed: res == std::vector<std::string>{ "aaa", "bbb" } for: { "aaa", "bbb" } == { "aaa", "bbb" } +ColourImpl.tests.cpp:<line number>: passed: streamWrapper.str().empty() for: true +ColourImpl.tests.cpp:<line number>: passed: streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" for: "1 +Using code: 2 +2 +Using code: 0 +3 +" +== +"1 +Using code: 2 +2 +Using code: 0 +3 +" +ColourImpl.tests.cpp:<line number>: passed: streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" for: "Using code: 2 +A +B +Using code: 0 +C +" +== +"Using code: 2 +A +B +Using code: 0 +C +" Matchers.tests.cpp:<line number>: passed: with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch::Matchers::Detail:: MatchAllOfGeneric<MatcherA, MatcherB, MatcherC>>::value' Matchers.tests.cpp:<line number>: passed: 1, ( MatcherA() && MatcherB() ) && MatcherC() for: 1 ( equals: (int) 1 or (float) 1.0f and equals: (long long) 1 and equals: (T) 1 ) Matchers.tests.cpp:<line number>: passed: with 1 message: 'std::is_same< decltype( MatcherA() && ( MatcherB() && MatcherC() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric<MatcherA, MatcherB, MatcherC>>::value' diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt index e37fd27c..ca0a77e5 100644 --- a/tests/SelfTest/Baselines/console.std.approved.txt +++ b/tests/SelfTest/Baselines/console.std.approved.txt @@ -1395,6 +1395,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 385 | 309 passed | 69 failed | 7 failed as expected -assertions: 2216 | 2061 passed | 128 failed | 27 failed as expected +test cases: 386 | 310 passed | 69 failed | 7 failed as expected +assertions: 2219 | 2064 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 256d347d..9da51362 100644 --- a/tests/SelfTest/Baselines/console.sw.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.approved.txt @@ -3024,6 +3024,66 @@ with expansion: { "aaa", "bbb" } == { "aaa", "bbb" } ------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard is disengaged by default +------------------------------------------------------------------------------- +ColourImpl.tests.cpp:<line number> +............................................................................... + +ColourImpl.tests.cpp:<line number>: PASSED: + REQUIRE( streamWrapper.str().empty() ) +with expansion: + true + +------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard is engaged by op<< +------------------------------------------------------------------------------- +ColourImpl.tests.cpp:<line number> +............................................................................... + +ColourImpl.tests.cpp:<line number>: PASSED: + REQUIRE( streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" ) +with expansion: + "1 + Using code: 2 + 2 + Using code: 0 + 3 + " + == + "1 + Using code: 2 + 2 + Using code: 0 + 3 + " + +------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard can be engaged explicitly +------------------------------------------------------------------------------- +ColourImpl.tests.cpp:<line number> +............................................................................... + +ColourImpl.tests.cpp:<line number>: PASSED: + REQUIRE( streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" ) +with expansion: + "Using code: 2 + A + B + Using code: 0 + C + " + == + "Using code: 2 + A + B + Using code: 0 + C + " + +------------------------------------------------------------------------------- Combining MatchAllOfGeneric does not nest ------------------------------------------------------------------------------- Matchers.tests.cpp:<line number> @@ -17811,6 +17871,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 385 | 295 passed | 83 failed | 7 failed as expected -assertions: 2231 | 2061 passed | 143 failed | 27 failed as expected +test cases: 386 | 296 passed | 83 failed | 7 failed as expected +assertions: 2234 | 2064 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 27975ad9..4738113a 100644 --- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt @@ -3022,6 +3022,66 @@ with expansion: { "aaa", "bbb" } == { "aaa", "bbb" } ------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard is disengaged by default +------------------------------------------------------------------------------- +ColourImpl.tests.cpp:<line number> +............................................................................... + +ColourImpl.tests.cpp:<line number>: PASSED: + REQUIRE( streamWrapper.str().empty() ) +with expansion: + true + +------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard is engaged by op<< +------------------------------------------------------------------------------- +ColourImpl.tests.cpp:<line number> +............................................................................... + +ColourImpl.tests.cpp:<line number>: PASSED: + REQUIRE( streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" ) +with expansion: + "1 + Using code: 2 + 2 + Using code: 0 + 3 + " + == + "1 + Using code: 2 + 2 + Using code: 0 + 3 + " + +------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard can be engaged explicitly +------------------------------------------------------------------------------- +ColourImpl.tests.cpp:<line number> +............................................................................... + +ColourImpl.tests.cpp:<line number>: PASSED: + REQUIRE( streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" ) +with expansion: + "Using code: 2 + A + B + Using code: 0 + C + " + == + "Using code: 2 + A + B + Using code: 0 + C + " + +------------------------------------------------------------------------------- Combining MatchAllOfGeneric does not nest ------------------------------------------------------------------------------- Matchers.tests.cpp:<line number> @@ -17803,6 +17863,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 385 | 295 passed | 83 failed | 7 failed as expected -assertions: 2231 | 2061 passed | 143 failed | 27 failed as expected +test cases: 386 | 296 passed | 83 failed | 7 failed as expected +assertions: 2234 | 2064 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 84c3625e..3a099b4f 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="2231" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="126" tests="2234" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="random-seed" value="1"/> <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/> @@ -387,6 +387,9 @@ Exception.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Clara::Arg supports single-arg parse the way Opt does" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Clara::Opt supports accept-many lambdas/Parsing fails on multiple options without accept_many" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Clara::Opt supports accept-many lambdas/Parsing succeeds on multiple options with accept_many" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="ColourGuard behaviour/ColourGuard is disengaged by default" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="ColourGuard behaviour/ColourGuard is engaged by op<<" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="ColourGuard behaviour/ColourGuard can be engaged explicitly" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Combining MatchAllOfGeneric does not nest" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Combining MatchAnyOfGeneric does not nest" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Combining MatchNotOfGeneric does not nest" 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 d1a41e13..527f7ba0 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="2231" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="126" tests="2234" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="random-seed" value="1"/> <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/> @@ -386,6 +386,9 @@ Exception.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Clara::Arg supports single-arg parse the way Opt does" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Clara::Opt supports accept-many lambdas/Parsing fails on multiple options without accept_many" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Clara::Opt supports accept-many lambdas/Parsing succeeds on multiple options with accept_many" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="ColourGuard behaviour/ColourGuard is disengaged by default" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="ColourGuard behaviour/ColourGuard is engaged by op<<" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="ColourGuard behaviour/ColourGuard can be engaged explicitly" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Combining MatchAllOfGeneric does not nest" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Combining MatchAnyOfGeneric does not nest" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Combining MatchNotOfGeneric does not nest" time="{duration}" status="run"/> diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt index 9d6e859f..92db65df 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -94,6 +94,11 @@ <testCase name="Process can be configured on command line/Benchmark options/warmup-time" duration="{duration}"/> <testCase name="Test with special, characters "in name" duration="{duration}"/> </file> + <file path="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp"> + <testCase name="ColourGuard behaviour/ColourGuard is disengaged by default" duration="{duration}"/> + <testCase name="ColourGuard behaviour/ColourGuard is engaged by op<<" duration="{duration}"/> + <testCase name="ColourGuard behaviour/ColourGuard can be engaged explicitly" duration="{duration}"/> + </file> <file path="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp"> <testCase name="CaseInsensitiveEqualsTo is case insensitive/Degenerate cases" duration="{duration}"/> <testCase name="CaseInsensitiveEqualsTo is case insensitive/Plain comparisons" duration="{duration}"/> diff --git a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt index a412dbc2..c9074bf0 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt @@ -93,6 +93,11 @@ <testCase name="Process can be configured on command line/Benchmark options/warmup-time" duration="{duration}"/> <testCase name="Test with special, characters "in name" duration="{duration}"/> </file> + <file path="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp"> + <testCase name="ColourGuard behaviour/ColourGuard is disengaged by default" duration="{duration}"/> + <testCase name="ColourGuard behaviour/ColourGuard is engaged by op<<" duration="{duration}"/> + <testCase name="ColourGuard behaviour/ColourGuard can be engaged explicitly" duration="{duration}"/> + </file> <file path="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp"> <testCase name="CaseInsensitiveEqualsTo is case insensitive/Degenerate cases" duration="{duration}"/> <testCase name="CaseInsensitiveEqualsTo is case insensitive/Plain comparisons" duration="{duration}"/> diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index 3080c4a5..5da402f2 100644 --- a/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -730,6 +730,12 @@ ok {test-number} - !(parse_result) for: !{?} ok {test-number} - parse_result for: {?} # Clara::Opt supports accept-many lambdas ok {test-number} - res == std::vector<std::string>{ "aaa", "bbb" } for: { "aaa", "bbb" } == { "aaa", "bbb" } +# ColourGuard behaviour +ok {test-number} - streamWrapper.str().empty() for: true +# ColourGuard behaviour +ok {test-number} - streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" for: "1 Using code: 2 2 Using code: 0 3 " == "1 Using code: 2 2 Using code: 0 3 " +# ColourGuard behaviour +ok {test-number} - streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" for: "Using code: 2 A B Using code: 0 C " == "Using code: 2 A B Using code: 0 C " # Combining MatchAllOfGeneric does not nest ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch::Matchers::Detail:: MatchAllOfGeneric<MatcherA, MatcherB, MatcherC>>::value' # Combining MatchAllOfGeneric does not nest @@ -4464,5 +4470,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2231 +1..2234 diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt index 60011180..1e637a17 100644 --- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt @@ -728,6 +728,12 @@ ok {test-number} - !(parse_result) for: !{?} ok {test-number} - parse_result for: {?} # Clara::Opt supports accept-many lambdas ok {test-number} - res == std::vector<std::string>{ "aaa", "bbb" } for: { "aaa", "bbb" } == { "aaa", "bbb" } +# ColourGuard behaviour +ok {test-number} - streamWrapper.str().empty() for: true +# ColourGuard behaviour +ok {test-number} - streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" for: "1 Using code: 2 2 Using code: 0 3 " == "1 Using code: 2 2 Using code: 0 3 " +# ColourGuard behaviour +ok {test-number} - streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" for: "Using code: 2 A B Using code: 0 C " == "Using code: 2 A B Using code: 0 C " # Combining MatchAllOfGeneric does not nest ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch::Matchers::Detail:: MatchAllOfGeneric<MatcherA, MatcherB, MatcherC>>::value' # Combining MatchAllOfGeneric does not nest @@ -4456,5 +4462,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2231 +1..2234 diff --git a/tests/SelfTest/Baselines/teamcity.sw.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.approved.txt index 4963db33..43324e06 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.approved.txt @@ -241,6 +241,8 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpe ##teamcity[testFinished name='Clara::Arg supports single-arg parse the way Opt does' duration="{duration}"] ##teamcity[testStarted name='Clara::Opt supports accept-many lambdas'] ##teamcity[testFinished name='Clara::Opt supports accept-many lambdas' duration="{duration}"] +##teamcity[testStarted name='ColourGuard behaviour'] +##teamcity[testFinished name='ColourGuard behaviour' duration="{duration}"] ##teamcity[testStarted name='Combining MatchAllOfGeneric does not nest'] ##teamcity[testFinished name='Combining MatchAllOfGeneric does not nest' duration="{duration}"] ##teamcity[testStarted name='Combining MatchAnyOfGeneric does not nest'] diff --git a/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt index b91e8c75..3bc028a4 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt @@ -241,6 +241,8 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpe ##teamcity[testFinished name='Clara::Arg supports single-arg parse the way Opt does' duration="{duration}"] ##teamcity[testStarted name='Clara::Opt supports accept-many lambdas'] ##teamcity[testFinished name='Clara::Opt supports accept-many lambdas' duration="{duration}"] +##teamcity[testStarted name='ColourGuard behaviour'] +##teamcity[testFinished name='ColourGuard behaviour' duration="{duration}"] ##teamcity[testStarted name='Combining MatchAllOfGeneric does not nest'] ##teamcity[testFinished name='Combining MatchAllOfGeneric does not nest' duration="{duration}"] ##teamcity[testStarted name='Combining MatchAnyOfGeneric does not nest'] diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt index 5a028632..fdd4c3b7 100644 --- a/tests/SelfTest/Baselines/xml.sw.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -3308,6 +3308,66 @@ Nor would this </Section> <OverallResult success="true"/> </TestCase> + <TestCase name="ColourGuard behaviour" tags="[console-colours]" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Section name="ColourGuard is disengaged by default" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Original> + streamWrapper.str().empty() + </Original> + <Expanded> + true + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="ColourGuard is engaged by op<<" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Original> + streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" + </Original> + <Expanded> + "1 +Using code: 2 +2 +Using code: 0 +3 +" +== +"1 +Using code: 2 +2 +Using code: 0 +3 +" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="ColourGuard can be engaged explicitly" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Original> + streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" + </Original> + <Expanded> + "Using code: 2 +A +B +Using code: 0 +C +" +== +"Using code: 2 +A +B +Using code: 0 +C +" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <OverallResult success="true"/> + </TestCase> <TestCase name="Combining MatchAllOfGeneric does not nest" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Original> @@ -20931,6 +20991,6 @@ loose text artifact </Section> <OverallResult success="true"/> </TestCase> - <OverallResults successes="2061" failures="143" expectedFailures="27"/> - <OverallResultsCases successes="295" failures="83" expectedFailures="7"/> + <OverallResults successes="2064" failures="143" expectedFailures="27"/> + <OverallResultsCases successes="296" 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 da925a2f..5d0f7951 100644 --- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt @@ -3308,6 +3308,66 @@ Nor would this </Section> <OverallResult success="true"/> </TestCase> + <TestCase name="ColourGuard behaviour" tags="[console-colours]" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Section name="ColourGuard is disengaged by default" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Original> + streamWrapper.str().empty() + </Original> + <Expanded> + true + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="ColourGuard is engaged by op<<" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Original> + streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" + </Original> + <Expanded> + "1 +Using code: 2 +2 +Using code: 0 +3 +" +== +"1 +Using code: 2 +2 +Using code: 0 +3 +" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="ColourGuard can be engaged explicitly" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > + <Original> + streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" + </Original> + <Expanded> + "Using code: 2 +A +B +Using code: 0 +C +" +== +"Using code: 2 +A +B +Using code: 0 +C +" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <OverallResult success="true"/> + </TestCase> <TestCase name="Combining MatchAllOfGeneric does not nest" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Original> @@ -20930,6 +20990,6 @@ There is no extra whitespace here </Section> <OverallResult success="true"/> </TestCase> - <Ov |