mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	catch_capture.hpp doesn't need to depend on catch_interfaces_capture.h
This commit is contained in:
		| @@ -10,12 +10,14 @@ | ||||
|  | ||||
| #include "catch_result_builder.h" | ||||
| #include "catch_message.h" | ||||
| #include "catch_interfaces_capture.h" | ||||
| #include "catch_debugger.h" | ||||
| #include "catch_common.h" | ||||
| #include "catch_tostring.h" | ||||
| #include "catch_compiler_capabilities.h" | ||||
|  | ||||
| namespace Catch { | ||||
|     AssertionResult const* getLastResult(); | ||||
| } | ||||
|  | ||||
| /////////////////////////////////////////////////////////////////////////////// | ||||
| // In the event of a failure works out if the debugger needs to be invoked | ||||
| @@ -43,12 +45,12 @@ | ||||
| /////////////////////////////////////////////////////////////////////////////// | ||||
| #define INTERNAL_CATCH_IF( expr, resultDisposition, macroName ) \ | ||||
|     INTERNAL_CATCH_TEST( expr, resultDisposition, macroName ); \ | ||||
|     if( Catch::getCurrentRunContext().getLastResult()->succeeded() ) | ||||
|     if( Catch::getLastResult()->succeeded() ) | ||||
|  | ||||
| /////////////////////////////////////////////////////////////////////////////// | ||||
| #define INTERNAL_CATCH_ELSE( expr, resultDisposition, macroName ) \ | ||||
|     INTERNAL_CATCH_TEST( expr, resultDisposition, macroName ); \ | ||||
|     if( !Catch::getCurrentRunContext().getLastResult()->succeeded() ) | ||||
|     if( !Catch::getLastResult()->succeeded() ) | ||||
|  | ||||
| /////////////////////////////////////////////////////////////////////////////// | ||||
| #define INTERNAL_CATCH_NO_THROW( expr, resultDisposition, macroName ) \ | ||||
|   | ||||
| @@ -40,7 +40,7 @@ namespace Catch { | ||||
|         virtual void handleFatalErrorCondition( std::string const& message ) = 0; | ||||
|          | ||||
|         virtual std::string getCurrentTestName() const = 0; | ||||
|         virtual const AssertionResult* getLastResult() const = 0; | ||||
|         virtual AssertionResult const* getLastResult() const = 0; | ||||
|         virtual bool isAborting() const = 0; | ||||
|         virtual IConfig const& config() const = 0; | ||||
|     }; | ||||
|   | ||||
| @@ -8,6 +8,7 @@ | ||||
| #ifndef TWOBLUECUBES_CATCH_RUNNER_IMPL_HPP_INCLUDED | ||||
| #define TWOBLUECUBES_CATCH_RUNNER_IMPL_HPP_INCLUDED | ||||
|  | ||||
| #include "catch_interfaces_capture.h" | ||||
| #include "catch_interfaces_reporter.h" | ||||
| #include "catch_interfaces_exception.h" | ||||
| #include "catch_config.hpp" | ||||
| @@ -75,6 +76,9 @@ namespace Catch { | ||||
|         else | ||||
|             return CATCH_NULL; | ||||
|     } | ||||
|     AssertionResult const* getLastResult() { | ||||
|         return getCurrentRunContext().getLastResult(); | ||||
|     } | ||||
|  | ||||
|     class RunContext : public IRunContext { | ||||
|  | ||||
| @@ -223,7 +227,7 @@ namespace Catch { | ||||
|                 : ""; | ||||
|         } | ||||
|  | ||||
|         virtual const AssertionResult* getLastResult() const CATCH_OVERRIDE { | ||||
|         virtual AssertionResult const* getLastResult() const CATCH_OVERRIDE { | ||||
|             return &m_lastResult; | ||||
|         } | ||||
|         virtual IConfig const& config() const CATCH_OVERRIDE { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash