Add UNSCOPED_CAPTURE

Closes #2954
Closes #3010
This commit is contained in:
Martin Hořeňovský
2026-01-11 14:53:08 +01:00
parent b59f4f3522
commit 2580eadc42
26 changed files with 265 additions and 54 deletions
@@ -369,3 +369,13 @@ TEST_CASE(
UNSCOPED_INFO( "b" );
REQUIRE( false );
}
TEST_CASE( "Unscoped capture outlives scope",
"[messages][unscoped][capture][!shouldfail]" ) {
int i = 1;
SECTION( "A" ) {
int j = 2;
UNSCOPED_CAPTURE( i, j, i + j );
}
REQUIRE( false );
}