mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
Fmt and tag fixup for #876
Github wouldn't let me push to the PR, probably because it was made from fork of a fork...
This commit is contained in:
parent
9a07dde16d
commit
cdd83c2e15
@ -38,8 +38,7 @@ namespace Catch {
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
ScopedMessage::~ScopedMessage() {
|
ScopedMessage::~ScopedMessage() {
|
||||||
if (!std::uncaught_exception())
|
if ( !std::uncaught_exception() ){
|
||||||
{
|
|
||||||
getResultCapture().popScopedMessage(m_info);
|
getResultCapture().popScopedMessage(m_info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -210,17 +210,17 @@ TEST_CASE( "Mismatching exception messages failing the test", "[.][failing][!thr
|
|||||||
REQUIRE_THROWS_WITH( thisThrows(), "expected exception" );
|
REQUIRE_THROWS_WITH( thisThrows(), "expected exception" );
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE( "#748 - captures with unexpected exceptions", "[!shouldfail]" ) {
|
TEST_CASE( "#748 - captures with unexpected exceptions", "[!shouldfail][!throws]" ) {
|
||||||
int answer = 42;
|
int answer = 42;
|
||||||
CAPTURE(answer);
|
CAPTURE( answer );
|
||||||
// the message should be printed on the first two sections but not on the third
|
// the message should be printed on the first two sections but not on the third
|
||||||
SECTION( "outside assertions" ) {
|
SECTION( "outside assertions" ) {
|
||||||
thisThrows();
|
thisThrows();
|
||||||
}
|
}
|
||||||
SECTION( "inside REQUIRE_NOTHROW" ) {
|
SECTION( "inside REQUIRE_NOTHROW" ) {
|
||||||
REQUIRE_NOTHROW(thisThrows());
|
REQUIRE_NOTHROW( thisThrows() );
|
||||||
}
|
}
|
||||||
SECTION( "inside REQUIRE_THROWS" ) {
|
SECTION( "inside REQUIRE_THROWS" ) {
|
||||||
REQUIRE_THROWS(thisThrows());
|
REQUIRE_THROWS( thisThrows() );
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user