mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Changed shouldNegate boolean to use part of ResultDisposition enum
This commit is contained in:
		| @@ -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() ) | ||||
|  | ||||
| /////////////////////////////////////////////////////////////////////////////// | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash