mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-28 07:29:25 +00:00
Added CHECKED_IF and CHECKED_ELSE
This commit is contained in:
parent
6abf702895
commit
a162e22fa3
9 changed files with 102 additions and 14 deletions
|
@ -687,6 +687,16 @@ inline bool isTrue
|
|||
INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( __FILE__, __LINE__, macroName, #expr, isNot )->*expr ), stopOnFailure ); \
|
||||
if( Catch::isTrue( false ) ){ bool internal_catch_dummyResult = ( expr ); Catch::isTrue( internal_catch_dummyResult ); }
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define INTERNAL_CATCH_IF( expr, isNot, stopOnFailure, macroName ) \
|
||||
INTERNAL_CATCH_TEST( expr, isNot, stopOnFailure, macroName ); \
|
||||
if( Catch::Hub::getResultCapture().getLastResult()->ok() )
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define INTERNAL_CATCH_ELSE( expr, isNot, stopOnFailure, macroName ) \
|
||||
INTERNAL_CATCH_TEST( expr, isNot, stopOnFailure, macroName ); \
|
||||
if( !Catch::Hub::getResultCapture().getLastResult()->ok() )
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define INTERNAL_CATCH_NO_THROW( expr, stopOnFailure, macroName ) \
|
||||
try \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue