Fix lazy removal of unscoped messages also removing still valid msgs

This commit is contained in:
Martin Hořeňovský
2025-11-30 12:56:06 +01:00
parent a1faad9315
commit 985a3f4460
21 changed files with 222 additions and 18 deletions

View File

@@ -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 );
}