diff options
| author | Martin Hořeňovský | 2025-11-30 12:56:06 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2025-11-30 14:30:19 +0100 |
| commit | 985a3f44605bf3ee7bd4a0c6129ca69ec53a7ebe (patch) | |
| tree | 45ad4f5e3587018288711564bc9e385b2f3b6cb2 /tests/SelfTest | |
| parent | a1faad9315ece8e7146e9d2263ceb3d42ea0619a (diff) | |
| download | catch3-985a3f44605bf3ee7bd4a0c6129ca69ec53a7ebe.tar.gz | |
Fix lazy removal of unscoped messages also removing still valid msgs
Diffstat (limited to 'tests/SelfTest')
18 files changed, 174 insertions, 18 deletions
diff --git a/tests/SelfTest/Baselines/automake.sw.approved.txt b/tests/SelfTest/Baselines/automake.sw.approved.txt index 4a6886d6..6b0ac614 100644 --- a/tests/SelfTest/Baselines/automake.sw.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.approved.txt @@ -138,6 +138,7 @@ Nor would this :test-result: FAIL Custom exceptions can be translated when testing for throwing as something else :test-result: FAIL Custom std-exceptions can be custom translated :test-result: PASS Default scale is invisible to comparison +:test-result: XFAIL Delayed unscoped message clearing does not catch newly inserted messages :test-result: PASS Directly creating an EnumInfo :test-result: SKIP Empty generators can SKIP in constructor :test-result: PASS Empty stream name opens cout stream diff --git a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt index b0d30b87..54d1c58f 100644 --- a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt @@ -136,6 +136,7 @@ :test-result: FAIL Custom exceptions can be translated when testing for throwing as something else :test-result: FAIL Custom std-exceptions can be custom translated :test-result: PASS Default scale is invisible to comparison +:test-result: XFAIL Delayed unscoped message clearing does not catch newly inserted messages :test-result: PASS Directly creating an EnumInfo :test-result: SKIP Empty generators can SKIP in constructor :test-result: PASS Empty stream name opens cout stream diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt index cacb898a..37c2624f 100644 --- a/tests/SelfTest/Baselines/compact.sw.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -562,6 +562,8 @@ Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'c Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom std exception' Approx.tests.cpp:<line number>: passed: 101.000001 != Approx(100).epsilon(0.01) for: 101.00000099999999748 != Approx( 100.0 ) Approx.tests.cpp:<line number>: passed: std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 ) +Message.tests.cpp:<line number>: passed: true with 1 message: 'a' +Message.tests.cpp:<line number>: failed: false with 1 message: 'b' ToString.tests.cpp:<line number>: passed: enumInfo->lookup(0) == "Value1" for: Value1 == "Value1" ToString.tests.cpp:<line number>: passed: enumInfo->lookup(1) == "Value2" for: Value2 == "Value2" ToString.tests.cpp:<line number>: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} @@ -2888,7 +2890,7 @@ InternalBenchmark.tests.cpp:<line number>: passed: med == 18. for: 18.0 == 18.0 InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0 Misc.tests.cpp:<line number>: passed: Misc.tests.cpp:<line number>: passed: -test cases: 435 | 317 passed | 95 failed | 6 skipped | 17 failed as expected -assertions: 2303 | 2105 passed | 157 failed | 41 failed as expected +test cases: 436 | 317 passed | 95 failed | 6 skipped | 18 failed as expected +assertions: 2305 | 2106 passed | 157 failed | 42 failed as expected diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt index 10395c9a..b103d28f 100644 --- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt @@ -560,6 +560,8 @@ Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'c Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom std exception' Approx.tests.cpp:<line number>: passed: 101.000001 != Approx(100).epsilon(0.01) for: 101.00000099999999748 != Approx( 100.0 ) Approx.tests.cpp:<line number>: passed: std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 ) +Message.tests.cpp:<line number>: passed: true with 1 message: 'a' +Message.tests.cpp:<line number>: failed: false with 1 message: 'b' ToString.tests.cpp:<line number>: passed: enumInfo->lookup(0) == "Value1" for: Value1 == "Value1" ToString.tests.cpp:<line number>: passed: enumInfo->lookup(1) == "Value2" for: Value2 == "Value2" ToString.tests.cpp:<line number>: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} @@ -2877,7 +2879,7 @@ InternalBenchmark.tests.cpp:<line number>: passed: med == 18. for: 18.0 == 18.0 InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0 Misc.tests.cpp:<line number>: passed: Misc.tests.cpp:<line number>: passed: -test cases: 435 | 317 passed | 95 failed | 6 skipped | 17 failed as expected -assertions: 2303 | 2105 passed | 157 failed | 41 failed as expected +test cases: 436 | 317 passed | 95 failed | 6 skipped | 18 failed as expected +assertions: 2305 | 2106 passed | 157 failed | 42 failed as expected diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt index c1512db5..eefaa889 100644 --- a/tests/SelfTest/Baselines/console.std.approved.txt +++ b/tests/SelfTest/Baselines/console.std.approved.txt @@ -451,6 +451,17 @@ due to unexpected exception with message: custom std exception ------------------------------------------------------------------------------- +Delayed unscoped message clearing does not catch newly inserted messages +------------------------------------------------------------------------------- +Message.tests.cpp:<line number> +............................................................................... + +Message.tests.cpp:<line number>: FAILED: + REQUIRE( false ) +with message: + b + +------------------------------------------------------------------------------- Empty generators can SKIP in constructor ------------------------------------------------------------------------------- Skip.tests.cpp:<line number> @@ -1719,6 +1730,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 435 | 335 passed | 76 failed | 7 skipped | 17 failed as expected -assertions: 2282 | 2105 passed | 136 failed | 41 failed as expected +test cases: 436 | 335 passed | 76 failed | 7 skipped | 18 failed as expected +assertions: 2284 | 2106 passed | 136 failed | 42 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt index 7fd59514..5b82e70e 100644 --- a/tests/SelfTest/Baselines/console.sw.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.approved.txt @@ -4149,6 +4149,22 @@ with expansion: 0.00001 != Approx( 0.0000001 ) ------------------------------------------------------------------------------- +Delayed unscoped message clearing does not catch newly inserted messages +------------------------------------------------------------------------------- +Message.tests.cpp:<line number> +............................................................................... + +Message.tests.cpp:<line number>: PASSED: + REQUIRE( true ) +with message: + a + +Message.tests.cpp:<line number>: FAILED: + REQUIRE( false ) +with message: + b + +------------------------------------------------------------------------------- Directly creating an EnumInfo ------------------------------------------------------------------------------- ToString.tests.cpp:<line number> @@ -19295,6 +19311,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 435 | 317 passed | 95 failed | 6 skipped | 17 failed as expected -assertions: 2303 | 2105 passed | 157 failed | 41 failed as expected +test cases: 436 | 317 passed | 95 failed | 6 skipped | 18 failed as expected +assertions: 2305 | 2106 passed | 157 failed | 42 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt index 08ab1b2b..61873e2f 100644 --- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt @@ -4147,6 +4147,22 @@ with expansion: 0.00001 != Approx( 0.0000001 ) ------------------------------------------------------------------------------- +Delayed unscoped message clearing does not catch newly inserted messages +------------------------------------------------------------------------------- +Message.tests.cpp:<line number> +............................................................................... + +Message.tests.cpp:<line number>: PASSED: + REQUIRE( true ) +with message: + a + +Message.tests.cpp:<line number>: FAILED: + REQUIRE( false ) +with message: + b + +------------------------------------------------------------------------------- Directly creating an EnumInfo ------------------------------------------------------------------------------- ToString.tests.cpp:<line number> @@ -19284,6 +19300,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 435 | 317 passed | 95 failed | 6 skipped | 17 failed as expected -assertions: 2303 | 2105 passed | 157 failed | 41 failed as expected +test cases: 436 | 317 passed | 95 failed | 6 skipped | 18 failed as expected +assertions: 2305 | 2106 passed | 157 failed | 42 failed as expected diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt index c12b6178..ea99ab45 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="140" skipped="12" tests="2315" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="140" skipped="12" tests="2317" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="random-seed" value="1"/> <property name="filters" value=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"/> @@ -547,6 +547,15 @@ at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Default scale is invisible to comparison" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Delayed unscoped message clearing does not catch newly inserted messages" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <failure message="false" type="REQUIRE"> +FAILED: + REQUIRE( false ) +b +at Message.tests.cpp:<line number> + </failure> + </testcase> <testcase classname="<exe-name>.global" name="Directly creating an EnumInfo" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Empty generators can SKIP in constructor" time="{duration}" status="run"> <skipped type="SKIP"> diff --git a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt index e844ca6c..07e402c7 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="140" skipped="12" tests="2315" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="140" skipped="12" tests="2317" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="random-seed" value="1"/> <property name="filters" value=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"/> @@ -546,6 +546,15 @@ at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Default scale is invisible to comparison" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Delayed unscoped message clearing does not catch newly inserted messages" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <failure message="false" type="REQUIRE"> +FAILED: + REQUIRE( false ) +b +at Message.tests.cpp:<line number> + </failure> + </testcase> <testcase classname="<exe-name>.global" name="Directly creating an EnumInfo" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Empty generators can SKIP in constructor" time="{duration}" status="run"> <skipped type="SKIP"> diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt index d79abd37..881851c3 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -1699,6 +1699,14 @@ at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="Captures outlive section end/Dummy section" duration="{duration}"/> + <testCase name="Delayed unscoped message clearing does not catch newly inserted messages" duration="{duration}"> + <skipped message="REQUIRE(false)"> +FAILED: + REQUIRE( false ) +b +at Message.tests.cpp:<line number> + </skipped> + </testCase> <testCase name="FAIL aborts the test" duration="{duration}"> <failure message="FAIL()"> FAILED: diff --git a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt index 98a06c14..5a64789d 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt @@ -1698,6 +1698,14 @@ at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="Captures outlive section end/Dummy section" duration="{duration}"/> + <testCase name="Delayed unscoped message clearing does not catch newly inserted messages" duration="{duration}"> + <skipped message="REQUIRE(false)"> +FAILED: + REQUIRE( false ) +b +at Message.tests.cpp:<line number> + </skipped> + </testCase> <testCase name="FAIL aborts the test" duration="{duration}"> <failure message="FAIL()"> FAILED: diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index 3e5d1832..415f9964 100644 --- a/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -1024,6 +1024,10 @@ not ok {test-number} - unexpected exception with message: 'custom std exception' ok {test-number} - 101.000001 != Approx(100).epsilon(0.01) for: 101.00000099999999748 != Approx( 100.0 ) # Default scale is invisible to comparison ok {test-number} - std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 ) +# Delayed unscoped message clearing does not catch newly inserted messages +ok {test-number} - true with 1 message: 'a' +# Delayed unscoped message clearing does not catch newly inserted messages +not ok {test-number} - false with 1 message: 'b' # Directly creating an EnumInfo ok {test-number} - enumInfo->lookup(0) == "Value1" for: Value1 == "Value1" # Directly creating an EnumInfo @@ -4627,5 +4631,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2315 +1..2317 diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt index 0fdb266a..63ea617b 100644 --- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt @@ -1022,6 +1022,10 @@ not ok {test-number} - unexpected exception with message: 'custom std exception' ok {test-number} - 101.000001 != Approx(100).epsilon(0.01) for: 101.00000099999999748 != Approx( 100.0 ) # Default scale is invisible to comparison ok {test-number} - std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 ) +# Delayed unscoped message clearing does not catch newly inserted messages +ok {test-number} - true with 1 message: 'a' +# Delayed unscoped message clearing does not catch newly inserted messages +not ok {test-number} - false with 1 message: 'b' # Directly creating an EnumInfo ok {test-number} - enumInfo->lookup(0) == "Value1" for: Value1 == "Value1" # Directly creating an EnumInfo @@ -4616,5 +4620,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2315 +1..2317 diff --git a/tests/SelfTest/Baselines/teamcity.sw.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.approved.txt index 853f3d80..e911941c 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.approved.txt @@ -322,6 +322,9 @@ ##teamcity[testFinished name='Custom std-exceptions can be custom translated' duration="{duration}"] ##teamcity[testStarted name='Default scale is invisible to comparison'] ##teamcity[testFinished name='Default scale is invisible to comparison' duration="{duration}"] +##teamcity[testStarted name='Delayed unscoped message clearing does not catch newly inserted messages'] +##teamcity[testIgnored name='Delayed unscoped message clearing does not catch newly inserted messages' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with message:|n "b"|n REQUIRE( false )|nwith expansion:|n false|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Delayed unscoped message clearing does not catch newly inserted messages' duration="{duration}"] ##teamcity[testStarted name='Directly creating an EnumInfo'] ##teamcity[testFinished name='Directly creating an EnumInfo' duration="{duration}"] ##teamcity[testStarted name='Empty generators can SKIP in constructor'] diff --git a/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt index 10e318de..2c7f78e2 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt @@ -322,6 +322,9 @@ ##teamcity[testFinished name='Custom std-exceptions can be custom translated' duration="{duration}"] ##teamcity[testStarted name='Default scale is invisible to comparison'] ##teamcity[testFinished name='Default scale is invisible to comparison' duration="{duration}"] +##teamcity[testStarted name='Delayed unscoped message clearing does not catch newly inserted messages'] +##teamcity[testIgnored name='Delayed unscoped message clearing does not catch newly inserted messages' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with message:|n "b"|n REQUIRE( false )|nwith expansion:|n false|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Delayed unscoped message clearing does not catch newly inserted messages' duration="{duration}"] ##teamcity[testStarted name='Directly creating an EnumInfo'] ##teamcity[testFinished name='Directly creating an EnumInfo' duration="{duration}"] ##teamcity[testStarted name='Empty generators can SKIP in constructor'] diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt index 142d6620..3536950e 100644 --- a/tests/SelfTest/Baselines/xml.sw.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -4613,6 +4613,31 @@ C </Expression> <OverallResult success="true" skips="0"/> </TestCase> + <TestCase name="Delayed unscoped message clearing does not catch newly inserted messages" tags="[!shouldfail][messages][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + a + </Info> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + <Original> + true + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + b + </Info> + <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + <Original> + false + </Original> + <Expanded> + false + </Expanded> + </Expression> + <OverallResult success="true" skips="0"/> + </TestCase> <TestCase name="Directly creating an EnumInfo" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Original> @@ -22324,6 +22349,6 @@ Approx( -1.95996398454005449 ) </Section> <OverallResult success="true" skips="0"/> </TestCase> - <OverallResults successes="2105" failures="157" expectedFailures="41" skips="12"/> - <OverallResultsCases successes="317" failures="95" expectedFailures="17" skips="6"/> + <OverallResults successes="2106" failures="157" expectedFailures="42" skips="12"/> + <OverallResultsCases successes="317" failures="95" expectedFailures="18" skips="6"/> </Catch2TestRun> diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt index 62562332..5242f5c9 100644 --- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt @@ -4613,6 +4613,31 @@ C </Expression> <OverallResult success="true" skips="0"/> </TestCase> + <TestCase name="Delayed unscoped message clearing does not catch newly inserted messages" tags="[!shouldfail][messages][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + a + </Info> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + <Original> + true + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + b + </Info> + <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + <Original> + false + </Original> + <Expanded> + false + </Expanded> + </Expression> + <OverallResult success="true" skips="0"/> + </TestCase> <TestCase name="Directly creating an EnumInfo" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Original> @@ -22323,6 +22348,6 @@ Approx( -1.95996398454005449 ) </Section> <OverallResult success="true" skips="0"/> </TestCase> - <OverallResults successes="2105" failures="157" expectedFailures="41" skips="12"/> - <OverallResultsCases successes="317" failures="95" expectedFailures="17" skips="6"/> + <OverallResults successes="2106" failures="157" expectedFailures="42" skips="12"/> + <OverallResultsCases successes="317" failures="95" expectedFailures="18" skips="6"/> </Catch2TestRun> diff --git a/tests/SelfTest/UsageTests/Message.tests.cpp b/tests/SelfTest/UsageTests/Message.tests.cpp index 07d3ee7b..594e8892 100644 --- a/tests/SelfTest/UsageTests/Message.tests.cpp +++ b/tests/SelfTest/UsageTests/Message.tests.cpp @@ -360,3 +360,12 @@ TEST_CASE( "Scoped message applies to all assertions in scope", CHECK( false ); CHECK( false ); } + +TEST_CASE( + "Delayed unscoped message clearing does not catch newly inserted messages", + "[messages][unscoped][!shouldfail]" ) { + UNSCOPED_INFO( "a" ); + REQUIRE( true ); + UNSCOPED_INFO( "b" ); + REQUIRE( false ); +} |