Added CHECKED_IF and CHECKED_ELSE

This commit is contained in:
Phil Nash 2012-02-10 08:30:13 +00:00
parent 6abf702895
commit a162e22fa3
9 changed files with 102 additions and 14 deletions

View file

@ -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 \