diff options
| author | Phil Nash | 2012-11-10 10:35:09 +0000 |
|---|---|---|
| committer | Phil Nash | 2012-11-10 10:35:09 +0000 |
| commit | b2ef99882590ccd3824ebca44cb9b4cfc42f4728 (patch) | |
| tree | 80c4b911b366f62830f7506d74b64643ab345fbd /include/internal | |
| parent | 1af13dba97474c2a0b33f1ca1919c80ea4f95ca3 (diff) | |
| download | catch3-b2ef99882590ccd3824ebca44cb9b4cfc42f4728.tar.gz | |
Changed shouldNegate boolean to use part of ResultDisposition enum
Diffstat (limited to 'include/internal')
| -rw-r--r-- | include/internal/catch_capture.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp index f10c43d2..f2a6ad55 100644 --- a/include/internal/catch_capture.hpp +++ b/include/internal/catch_capture.hpp @@ -113,11 +113,11 @@ inline bool resetFlag( int flags, int bitOrBitsToReset ) { return static_cast<Re Catch::AssertionInfo INTERNAL_CATCH_ASSERTIONINFO_NAME( macroName, CATCH_INTERNAL_LINEINFO, expr, shouldNegate ); /////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_TEST( expr, shouldNegate, resultDisposition, macroName ) \ +#define INTERNAL_CATCH_TEST( expr, resultDisposition, macroName ) \ do { \ - INTERNAL_CATCH_ACCEPT_INFO( #expr, macroName, shouldNegate ); \ + INTERNAL_CATCH_ACCEPT_INFO( #expr, macroName, testFlag( resultDisposition, Catch::ResultDisposition::NegateResult ) ); \ try { \ - INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ExpressionDecomposer()->*expr ).negate( shouldNegate ), resultDisposition, expr ); \ + INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ExpressionDecomposer()->*expr ).negate( testFlag( resultDisposition, Catch::ResultDisposition::NegateResult ) ), resultDisposition, expr ); \ } catch( Catch::TestFailureException& ) { \ throw; \ } catch( ... ) { \ @@ -128,13 +128,13 @@ inline bool resetFlag( int flags, int bitOrBitsToReset ) { return static_cast<Re } while( Catch::isTrue( false ) ) /////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_IF( expr, shouldNegate, resultDisposition, macroName ) \ - INTERNAL_CATCH_TEST( expr, shouldNegate, resultDisposition, macroName ); \ +#define INTERNAL_CATCH_IF( expr, resultDisposition, macroName ) \ + INTERNAL_CATCH_TEST( expr, resultDisposition, macroName ); \ if( Catch::getResultCapture().getLastResult()->ok() ) /////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_ELSE( expr, shouldNegate, resultDisposition, macroName ) \ - INTERNAL_CATCH_TEST( expr, shouldNegate, resultDisposition, macroName ); \ +#define INTERNAL_CATCH_ELSE( expr, resultDisposition, macroName ) \ + INTERNAL_CATCH_TEST( expr, resultDisposition, macroName ); \ if( !Catch::getResultCapture().getLastResult()->ok() ) /////////////////////////////////////////////////////////////////////////////// |