Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal
diff options
context:
space:
mode:
authorPhil Nash2012-11-10 10:35:09 +0000
committerPhil Nash2012-11-10 10:35:09 +0000
commitb2ef99882590ccd3824ebca44cb9b4cfc42f4728 (patch)
tree80c4b911b366f62830f7506d74b64643ab345fbd /include/internal
parent1af13dba97474c2a0b33f1ca1919c80ea4f95ca3 (diff)
downloadcatch3-b2ef99882590ccd3824ebca44cb9b4cfc42f4728.tar.gz
Changed shouldNegate boolean to use part of ResultDisposition enum
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/catch_capture.hpp14
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() )
///////////////////////////////////////////////////////////////////////////////