mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-16 18:52:25 +01:00
Fix gcc warning empty-body
CATCH_BREAK_INTO_DEBUGGER() seems to eval to nothing on some systems, causing a warning like this: warning: suggest braces around empty body in an ‘if’ statement (along a stack of explanations where the expansion is done)
This commit is contained in:
parent
de49ec4d7c
commit
ee95f41630
@ -67,7 +67,7 @@ struct TestFailureException{};
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define INTERNAL_CATCH_ACCEPT_EXPR( evaluatedExpr, resultDisposition, originalExpr ) \
|
||||
if( Catch::ResultAction::Value internal_catch_action = Catch::getResultCapture().acceptExpression( evaluatedExpr, INTERNAL_CATCH_ASSERTIONINFO_NAME ) ) { \
|
||||
if( internal_catch_action & Catch::ResultAction::Debug ) CATCH_BREAK_INTO_DEBUGGER(); \
|
||||
if( internal_catch_action & Catch::ResultAction::Debug ) { CATCH_BREAK_INTO_DEBUGGER(); } \
|
||||
if( internal_catch_action & Catch::ResultAction::Abort ) throw Catch::TestFailureException(); \
|
||||
if( !Catch::shouldContinueOnFailure( resultDisposition ) ) throw Catch::TestFailureException(); \
|
||||
Catch::isTrue( false && originalExpr ); \
|
||||
|
Loading…
Reference in New Issue
Block a user