mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-30 19:57:10 +01:00 
			
		
		
		
	renamed hub -> context
(also did some reformatting)
This commit is contained in:
		| @@ -12,7 +12,7 @@ | |||||||
|  |  | ||||||
| #ifndef TWOBLUECUBES_CATCH_HPP_INCLUDED | #ifndef TWOBLUECUBES_CATCH_HPP_INCLUDED | ||||||
| #define TWOBLUECUBES_CATCH_HPP_INCLUDED | #define TWOBLUECUBES_CATCH_HPP_INCLUDED | ||||||
| #include "internal/catch_hub.h" | #include "internal/catch_context.h" | ||||||
| #include "internal/catch_test_registry.hpp" | #include "internal/catch_test_registry.hpp" | ||||||
| #include "internal/catch_capture.hpp" | #include "internal/catch_capture.hpp" | ||||||
| #include "internal/catch_section.hpp" | #include "internal/catch_section.hpp" | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ | |||||||
| #ifndef TWOBLUECUBES_CATCH_RUNNER_HPP_INCLUDED | #ifndef TWOBLUECUBES_CATCH_RUNNER_HPP_INCLUDED | ||||||
| #define TWOBLUECUBES_CATCH_RUNNER_HPP_INCLUDED | #define TWOBLUECUBES_CATCH_RUNNER_HPP_INCLUDED | ||||||
|  |  | ||||||
| #include "internal/catch_hub_impl.hpp" | #include "internal/catch_context_impl.hpp" | ||||||
|  |  | ||||||
| #include "internal/catch_commandline.hpp" | #include "internal/catch_commandline.hpp" | ||||||
| #include "internal/catch_list.hpp" | #include "internal/catch_list.hpp" | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ | |||||||
| #include "catch_interfaces_capture.h" | #include "catch_interfaces_capture.h" | ||||||
| #include "catch_debugger.hpp" | #include "catch_debugger.hpp" | ||||||
| #include "catch_evaluate.hpp" | #include "catch_evaluate.hpp" | ||||||
| #include "catch_hub.h" | #include "catch_context.h" | ||||||
| #include "catch_common.h" | #include "catch_common.h" | ||||||
| #include <sstream> | #include <sstream> | ||||||
|  |  | ||||||
| @@ -365,11 +365,11 @@ class ScopedInfo | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     ScopedInfo() : m_oss() { |     ScopedInfo() : m_oss() { | ||||||
|         Hub::getResultCapture().pushScopedInfo( this ); |         Context::getResultCapture().pushScopedInfo( this ); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     ~ScopedInfo() { |     ~ScopedInfo() { | ||||||
|         Hub::getResultCapture().popScopedInfo( this ); |         Context::getResultCapture().popScopedInfo( this ); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     template<typename T> |     template<typename T> | ||||||
| @@ -393,7 +393,7 @@ inline bool isTrue( bool value ){ return value; } | |||||||
|  |  | ||||||
| /////////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////////// | ||||||
| #define INTERNAL_CATCH_ACCEPT_EXPR( expr, stopOnFailure, originalExpr ) \ | #define INTERNAL_CATCH_ACCEPT_EXPR( expr, stopOnFailure, originalExpr ) \ | ||||||
|     if( Catch::ResultAction::Value internal_catch_action = Catch::Hub::getResultCapture().acceptExpression( expr )  ) \ |     if( Catch::ResultAction::Value internal_catch_action = Catch::Context::getResultCapture().acceptExpression( expr )  ) \ | ||||||
|     { \ |     { \ | ||||||
|         if( internal_catch_action == Catch::ResultAction::DebugFailed ) BreakIntoDebugger(); \ |         if( internal_catch_action == Catch::ResultAction::DebugFailed ) BreakIntoDebugger(); \ | ||||||
|         if( Catch::isTrue( stopOnFailure ) ) throw Catch::TestFailureException(); \ |         if( Catch::isTrue( stopOnFailure ) ) throw Catch::TestFailureException(); \ | ||||||
| @@ -407,19 +407,19 @@ inline bool isTrue( bool value ){ return value; } | |||||||
|     }catch( Catch::TestFailureException& ){ \ |     }catch( Catch::TestFailureException& ){ \ | ||||||
|         throw; \ |         throw; \ | ||||||
|     } catch( ... ){ \ |     } catch( ... ){ \ | ||||||
|         INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( CATCH_INTERNAL_LINEINFO, macroName, #expr ) << Catch::Hub::getExceptionTranslatorRegistry().translateActiveException() ).setResultType( Catch::ResultWas::ThrewException ), false, expr ); \ |         INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( CATCH_INTERNAL_LINEINFO, macroName, #expr ) << Catch::Context::getExceptionTranslatorRegistry().translateActiveException() ).setResultType( Catch::ResultWas::ThrewException ), false, expr ); \ | ||||||
|         throw; \ |         throw; \ | ||||||
|     }}while( Catch::isTrue( false ) ) |     }}while( Catch::isTrue( false ) ) | ||||||
|  |  | ||||||
| /////////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////////// | ||||||
| #define INTERNAL_CATCH_IF( expr, isNot, stopOnFailure, macroName ) \ | #define INTERNAL_CATCH_IF( expr, isNot, stopOnFailure, macroName ) \ | ||||||
|     INTERNAL_CATCH_TEST( expr, isNot, stopOnFailure, macroName ); \ |     INTERNAL_CATCH_TEST( expr, isNot, stopOnFailure, macroName ); \ | ||||||
|     if( Catch::Hub::getResultCapture().getLastResult()->ok() ) |     if( Catch::Context::getResultCapture().getLastResult()->ok() ) | ||||||
|  |  | ||||||
| /////////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////////// | ||||||
| #define INTERNAL_CATCH_ELSE( expr, isNot, stopOnFailure, macroName ) \ | #define INTERNAL_CATCH_ELSE( expr, isNot, stopOnFailure, macroName ) \ | ||||||
|     INTERNAL_CATCH_TEST( expr, isNot, stopOnFailure, macroName ); \ |     INTERNAL_CATCH_TEST( expr, isNot, stopOnFailure, macroName ); \ | ||||||
|     if( !Catch::Hub::getResultCapture().getLastResult()->ok() ) |     if( !Catch::Context::getResultCapture().getLastResult()->ok() ) | ||||||
|  |  | ||||||
| /////////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////////// | ||||||
| #define INTERNAL_CATCH_NO_THROW( expr, stopOnFailure, macroName ) \ | #define INTERNAL_CATCH_NO_THROW( expr, stopOnFailure, macroName ) \ | ||||||
| @@ -430,7 +430,7 @@ inline bool isTrue( bool value ){ return value; } | |||||||
|     } \ |     } \ | ||||||
|     catch( ... ) \ |     catch( ... ) \ | ||||||
|     { \ |     { \ | ||||||
|         INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( CATCH_INTERNAL_LINEINFO, macroName, #expr ) << Catch::Hub::getExceptionTranslatorRegistry().translateActiveException() ).setResultType( Catch::ResultWas::ThrewException ), stopOnFailure, false ); \ |         INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( CATCH_INTERNAL_LINEINFO, macroName, #expr ) << Catch::Context::getExceptionTranslatorRegistry().translateActiveException() ).setResultType( Catch::ResultWas::ThrewException ), stopOnFailure, false ); \ | ||||||
|     } |     } | ||||||
|  |  | ||||||
| /////////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////////// | ||||||
| @@ -454,12 +454,12 @@ inline bool isTrue( bool value ){ return value; } | |||||||
|     INTERNAL_CATCH_THROWS( expr, exceptionType, stopOnFailure, macroName ) \ |     INTERNAL_CATCH_THROWS( expr, exceptionType, stopOnFailure, macroName ) \ | ||||||
|     catch( ... ) \ |     catch( ... ) \ | ||||||
|     { \ |     { \ | ||||||
|         INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( CATCH_INTERNAL_LINEINFO, macroName, #expr ) << Catch::Hub::getExceptionTranslatorRegistry().translateActiveException() ).setResultType( Catch::ResultWas::ThrewException ), stopOnFailure, false ); \ |         INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( CATCH_INTERNAL_LINEINFO, macroName, #expr ) << Catch::Context::getExceptionTranslatorRegistry().translateActiveException() ).setResultType( Catch::ResultWas::ThrewException ), stopOnFailure, false ); \ | ||||||
|     } |     } | ||||||
|  |  | ||||||
| /////////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////////// | ||||||
| #define INTERNAL_CATCH_MSG( reason, resultType, stopOnFailure, macroName ) \ | #define INTERNAL_CATCH_MSG( reason, resultType, stopOnFailure, macroName ) \ | ||||||
|     Catch::Hub::getResultCapture().acceptExpression( ( Catch::ResultBuilder( CATCH_INTERNAL_LINEINFO, macroName ) << reason ).setResultType( resultType ) ); |     Catch::Context::getResultCapture().acceptExpression( ( Catch::ResultBuilder( CATCH_INTERNAL_LINEINFO, macroName ) << reason ).setResultType( resultType ) ); | ||||||
|  |  | ||||||
| /////////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////////// | ||||||
| #define INTERNAL_CATCH_SCOPED_INFO( log ) \ | #define INTERNAL_CATCH_SCOPED_INFO( log ) \ | ||||||
| @@ -473,7 +473,7 @@ inline bool isTrue( bool value ){ return value; } | |||||||
|     }catch( Catch::TestFailureException& ){ \ |     }catch( Catch::TestFailureException& ){ \ | ||||||
|         throw; \ |         throw; \ | ||||||
|     } catch( ... ){ \ |     } catch( ... ){ \ | ||||||
|         INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( CATCH_INTERNAL_LINEINFO, macroName, #arg " " #matcher ) << Catch::Hub::getExceptionTranslatorRegistry().translateActiveException() ).setResultType( Catch::ResultWas::ThrewException ), false, false ); \ |         INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( CATCH_INTERNAL_LINEINFO, macroName, #arg " " #matcher ) << Catch::Context::getExceptionTranslatorRegistry().translateActiveException() ).setResultType( Catch::ResultWas::ThrewException ), false, false ); \ | ||||||
|         throw; \ |         throw; \ | ||||||
|     }}while( Catch::isTrue( false ) ) |     }}while( Catch::isTrue( false ) ) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ | |||||||
| #define TWOBLUECUBES_CATCH_RUNNERCONFIG_HPP_INCLUDED | #define TWOBLUECUBES_CATCH_RUNNERCONFIG_HPP_INCLUDED | ||||||
|  |  | ||||||
| #include "catch_interfaces_reporter.h" | #include "catch_interfaces_reporter.h" | ||||||
| #include "catch_hub.h" | #include "catch_context.h" | ||||||
|  |  | ||||||
| #include <memory> | #include <memory> | ||||||
| #include <vector> | #include <vector> | ||||||
| @@ -76,7 +76,7 @@ namespace Catch | |||||||
|         { |         { | ||||||
|             if( m_reporter.get() ) |             if( m_reporter.get() ) | ||||||
|                 return setError( "Only one reporter may be specified" ); |                 return setError( "Only one reporter may be specified" ); | ||||||
|             setReporter( Hub::getReporterRegistry().create( reporterName, *this ) ); |             setReporter( Context::getReporterRegistry().create( reporterName, *this ) ); | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         /////////////////////////////////////////////////////////////////////////// |         /////////////////////////////////////////////////////////////////////////// | ||||||
| @@ -143,7 +143,7 @@ namespace Catch | |||||||
|         Ptr<IReporter> getReporter() |         Ptr<IReporter> getReporter() | ||||||
|         { |         { | ||||||
|             if( !m_reporter.get() ) |             if( !m_reporter.get() ) | ||||||
|                 const_cast<Config*>( this )->setReporter( Hub::getReporterRegistry().create( "basic", *this ) ); |                 const_cast<Config*>( this )->setReporter( Context::getReporterRegistry().create( "basic", *this ) ); | ||||||
|             return m_reporter; |             return m_reporter; | ||||||
|         } |         } | ||||||
|                  |                  | ||||||
| @@ -216,7 +216,7 @@ namespace Catch | |||||||
|         /////////////////////////////////////////////////////////////////////////// |         /////////////////////////////////////////////////////////////////////////// | ||||||
|         void useStream( const std::string& streamName ) |         void useStream( const std::string& streamName ) | ||||||
|         { |         { | ||||||
|             std::streambuf* newBuf = Hub::createStreamBuf( streamName ); |             std::streambuf* newBuf = Context::createStreamBuf( streamName ); | ||||||
|             setStreamBuf( newBuf ); |             setStreamBuf( newBuf ); | ||||||
|             delete m_streambuf; |             delete m_streambuf; | ||||||
|             m_streambuf = newBuf; |             m_streambuf = newBuf; | ||||||
|   | |||||||
							
								
								
									
										63
									
								
								include/internal/catch_context.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								include/internal/catch_context.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | |||||||
|  | /* | ||||||
|  |  *  Created by Phil on 31/12/2010. | ||||||
|  |  *  Copyright 2010 Two Blue Cubes Ltd. All rights reserved. | ||||||
|  |  * | ||||||
|  |  *  Distributed under the Boost Software License, Version 1.0. (See accompanying | ||||||
|  |  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||||||
|  |  */ | ||||||
|  | #ifndef TWOBLUECUBES_CATCH_CONTEXT_H_INCLUDED | ||||||
|  | #define TWOBLUECUBES_CATCH_CONTEXT_H_INCLUDED | ||||||
|  |  | ||||||
|  | #include "catch_interfaces_reporter.h" | ||||||
|  |  | ||||||
|  | #include <memory> | ||||||
|  | #include <vector> | ||||||
|  | #include <stdlib.h> | ||||||
|  |  | ||||||
|  | namespace Catch | ||||||
|  | { | ||||||
|  |     class TestCaseInfo; | ||||||
|  |     struct IResultCapture; | ||||||
|  |     struct ITestCaseRegistry; | ||||||
|  |     struct IRunner; | ||||||
|  |     struct IExceptionTranslatorRegistry; | ||||||
|  |     class GeneratorsForTest; | ||||||
|  |  | ||||||
|  |     class StreamBufBase : public std::streambuf{}; | ||||||
|  |      | ||||||
|  |     class Context | ||||||
|  |     { | ||||||
|  |         Context();                 | ||||||
|  |         Context( const Context& ); | ||||||
|  |         void operator=( const Context& ); | ||||||
|  |         static Context& me(); | ||||||
|  |  | ||||||
|  |     public:         | ||||||
|  |         static void setRunner( IRunner* runner );         | ||||||
|  |         static void setResultCapture( IResultCapture* resultCapture );         | ||||||
|  |         static IResultCapture& getResultCapture();         | ||||||
|  |         static IReporterRegistry& getReporterRegistry();         | ||||||
|  |         static ITestCaseRegistry& getTestCaseRegistry();         | ||||||
|  |         static IExceptionTranslatorRegistry& getExceptionTranslatorRegistry();         | ||||||
|  |         static std::streambuf* createStreamBuf( const std::string& streamName );         | ||||||
|  |         static IRunner& getRunner();         | ||||||
|  |         static size_t getGeneratorIndex( const std::string& fileInfo, size_t totalSize );         | ||||||
|  |         static bool advanceGeneratorsForCurrentTest();         | ||||||
|  |         static void cleanUp(); | ||||||
|  |          | ||||||
|  |     private: | ||||||
|  |         static Context*& singleInstance();         | ||||||
|  |         GeneratorsForTest* findGeneratorsForCurrentTest();         | ||||||
|  |         GeneratorsForTest& getGeneratorsForCurrentTest(); | ||||||
|  |  | ||||||
|  |     private:         | ||||||
|  |         std::auto_ptr<IReporterRegistry> m_reporterRegistry; | ||||||
|  |         std::auto_ptr<ITestCaseRegistry> m_testCaseRegistry; | ||||||
|  |         std::auto_ptr<IExceptionTranslatorRegistry> m_exceptionTranslatorRegistry; | ||||||
|  |         IRunner* m_runner; | ||||||
|  |         IResultCapture* m_resultCapture; | ||||||
|  |         std::map<std::string, GeneratorsForTest*> m_generatorsByTestName; | ||||||
|  |     }; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | #endif // TWOBLUECUBES_CATCH_CONTEXT_H_INCLUDED | ||||||
| @@ -1,15 +1,11 @@ | |||||||
| /*
 | /*
 | ||||||
|  *  catch_hub_impl.hpp |  | ||||||
|  *  Catch |  | ||||||
|  * |  | ||||||
|  *  Created by Phil on 31/12/2010. |  *  Created by Phil on 31/12/2010. | ||||||
|  *  Copyright 2010 Two Blue Cubes Ltd. All rights reserved. |  *  Copyright 2010 Two Blue Cubes Ltd. All rights reserved. | ||||||
|  * |  * | ||||||
|  *  Distributed under the Boost Software License, Version 1.0. (See accompanying |  *  Distributed under the Boost Software License, Version 1.0. (See accompanying | ||||||
|  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 |  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 | ||||||
|  * |  | ||||||
|  */ |  */ | ||||||
| #include "catch_hub.h" | #include "catch_context.h" | ||||||
| #include "catch_reporter_registry.hpp" | #include "catch_reporter_registry.hpp" | ||||||
| #include "catch_test_case_registry_impl.hpp" | #include "catch_test_case_registry_impl.hpp" | ||||||
| #include "catch_exception_translator_registry.hpp" | #include "catch_exception_translator_registry.hpp" | ||||||
| @@ -20,94 +16,59 @@ | |||||||
| 
 | 
 | ||||||
| namespace Catch | namespace Catch | ||||||
| {     | {     | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     Context::Context() | ||||||
|     Hub::Hub |  | ||||||
|     () |  | ||||||
|     :   m_reporterRegistry( new ReporterRegistry ), |     :   m_reporterRegistry( new ReporterRegistry ), | ||||||
|         m_testCaseRegistry( new TestRegistry ), |         m_testCaseRegistry( new TestRegistry ), | ||||||
|         m_exceptionTranslatorRegistry( new ExceptionTranslatorRegistry ) |         m_exceptionTranslatorRegistry( new ExceptionTranslatorRegistry ) | ||||||
|     { |     {} | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     Context& Context::me() { | ||||||
|     Hub& Hub::me |         Context*& hub = singleInstance(); | ||||||
|     () |  | ||||||
|     { |  | ||||||
|         Hub*& hub = singleInstance(); |  | ||||||
|         if( !hub ) |         if( !hub ) | ||||||
|             hub = new Hub(); |             hub = new Context(); | ||||||
|         return *hub; |         return *hub; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     void Context::cleanUp() { | ||||||
|     void Hub::cleanUp |         Context*& hub = singleInstance(); | ||||||
|     () |  | ||||||
|     { |  | ||||||
|         Hub*& hub = singleInstance(); |  | ||||||
|         delete hub; |         delete hub; | ||||||
|         hub = NULL; |         hub = NULL; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     Context*& Context::singleInstance() { | ||||||
|     Hub*& Hub::singleInstance() |         static Context* hub = NULL;         | ||||||
|     { |  | ||||||
|         static Hub* hub = NULL;         |  | ||||||
|         return hub; |         return hub; | ||||||
|          |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     void Context::setRunner( IRunner* runner ) { | ||||||
|     void Hub::setRunner( IRunner* runner ) |  | ||||||
|     { |  | ||||||
|         me().m_runner = runner; |         me().m_runner = runner; | ||||||
|     } |     } | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 | 
 | ||||||
|     void Hub::setResultCapture( IResultCapture* resultCapture ) |     void Context::setResultCapture( IResultCapture* resultCapture ) { | ||||||
|     { |  | ||||||
|         me().m_resultCapture = resultCapture; |         me().m_resultCapture = resultCapture; | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     IResultCapture& Context::getResultCapture() { | ||||||
|     IResultCapture& Hub::getResultCapture |  | ||||||
|     () |  | ||||||
|     { |  | ||||||
|         return *me().m_resultCapture; |         return *me().m_resultCapture; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     IRunner& Context::getRunner() { | ||||||
|     IRunner& Hub::getRunner |  | ||||||
|     () |  | ||||||
|     { |  | ||||||
|         return *me().m_runner; |         return *me().m_runner; | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     IReporterRegistry& Context::getReporterRegistry() { | ||||||
|     IReporterRegistry& Hub::getReporterRegistry |  | ||||||
|     () |  | ||||||
|     { |  | ||||||
|         return *me().m_reporterRegistry.get(); |         return *me().m_reporterRegistry.get(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     ITestCaseRegistry& Context::getTestCaseRegistry() { | ||||||
|     ITestCaseRegistry& Hub::getTestCaseRegistry |  | ||||||
|     () |  | ||||||
|     { |  | ||||||
|         return *me().m_testCaseRegistry.get(); |         return *me().m_testCaseRegistry.get(); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     IExceptionTranslatorRegistry& Context::getExceptionTranslatorRegistry() { | ||||||
|     IExceptionTranslatorRegistry& Hub::getExceptionTranslatorRegistry |  | ||||||
|     () |  | ||||||
|     { |  | ||||||
|         return *me().m_exceptionTranslatorRegistry.get(); |         return *me().m_exceptionTranslatorRegistry.get(); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     std::streambuf* Context::createStreamBuf( const std::string& streamName ) { | ||||||
|     std::streambuf* Hub::createStreamBuf |  | ||||||
|     ( |  | ||||||
|         const std::string& streamName |  | ||||||
|     ) |  | ||||||
|     { |  | ||||||
|         if( streamName == "stdout" ) return std::cout.rdbuf(); |         if( streamName == "stdout" ) return std::cout.rdbuf(); | ||||||
|         if( streamName == "stderr" ) return std::cerr.rdbuf(); |         if( streamName == "stderr" ) return std::cerr.rdbuf(); | ||||||
|         if( streamName == "debug" ) return new StreamBufImpl<OutputDebugWriter>; |         if( streamName == "debug" ) return new StreamBufImpl<OutputDebugWriter>; | ||||||
| @@ -115,10 +76,7 @@ namespace Catch | |||||||
|         throw std::domain_error( "Unknown stream: " + streamName ); |         throw std::domain_error( "Unknown stream: " + streamName ); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     GeneratorsForTest* Context::findGeneratorsForCurrentTest() { | ||||||
|     GeneratorsForTest* Hub::findGeneratorsForCurrentTest |  | ||||||
|     () |  | ||||||
|     { |  | ||||||
|         std::string testName = getResultCapture().getCurrentTestName(); |         std::string testName = getResultCapture().getCurrentTestName(); | ||||||
|          |          | ||||||
|         std::map<std::string, GeneratorsForTest*>::const_iterator it =  |         std::map<std::string, GeneratorsForTest*>::const_iterator it =  | ||||||
| @@ -127,10 +85,8 @@ namespace Catch | |||||||
|             ? it->second |             ? it->second | ||||||
|             : NULL; |             : NULL; | ||||||
|     } |     } | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |      | ||||||
|     GeneratorsForTest& Hub::getGeneratorsForCurrentTest |     GeneratorsForTest& Context::getGeneratorsForCurrentTest() { | ||||||
|     () |  | ||||||
|     { |  | ||||||
|         GeneratorsForTest* generators = findGeneratorsForCurrentTest(); |         GeneratorsForTest* generators = findGeneratorsForCurrentTest(); | ||||||
|         if( !generators ) |         if( !generators ) | ||||||
|         { |         { | ||||||
| @@ -141,22 +97,14 @@ namespace Catch | |||||||
|         return *generators; |         return *generators; | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     size_t Context::getGeneratorIndex( const std::string& fileInfo, size_t totalSize ) | ||||||
|     size_t Hub::getGeneratorIndex |  | ||||||
|     ( |  | ||||||
|         const std::string& fileInfo,  |  | ||||||
|         size_t totalSize  |  | ||||||
|     ) |  | ||||||
|     { |     { | ||||||
|         return me().getGeneratorsForCurrentTest() |         return me().getGeneratorsForCurrentTest() | ||||||
|             .getGeneratorInfo( fileInfo, totalSize ) |             .getGeneratorInfo( fileInfo, totalSize ) | ||||||
|             .getCurrentIndex(); |             .getCurrentIndex(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     ///////////////////////////////////////////////////////////////////////////
 |     bool Context::advanceGeneratorsForCurrentTest() { | ||||||
|     bool Hub::advanceGeneratorsForCurrentTest |  | ||||||
|     () |  | ||||||
|     { |  | ||||||
|         GeneratorsForTest* generators = me().findGeneratorsForCurrentTest(); |         GeneratorsForTest* generators = me().findGeneratorsForCurrentTest(); | ||||||
|         return generators && generators->moveNext(); |         return generators && generators->moveNext(); | ||||||
|     } |     } | ||||||
| @@ -34,7 +34,7 @@ int main (int argc, char * const argv[]) | |||||||
|     int result =Catch::Main( argc, argv ); |     int result =Catch::Main( argc, argv ); | ||||||
|      |      | ||||||
| #endif | #endif | ||||||
|     Catch::Hub::cleanUp(); |     Catch::Context::cleanUp(); | ||||||
|     return result; |     return result; | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ | |||||||
| #ifndef TWOBLUECUBES_CATCH_GENERATORS_HPP_INCLUDED | #ifndef TWOBLUECUBES_CATCH_GENERATORS_HPP_INCLUDED | ||||||
| #define TWOBLUECUBES_CATCH_GENERATORS_HPP_INCLUDED | #define TWOBLUECUBES_CATCH_GENERATORS_HPP_INCLUDED | ||||||
|  |  | ||||||
| #include "catch_hub.h" | #include "catch_context.h" | ||||||
|  |  | ||||||
| #include <iterator> | #include <iterator> | ||||||
| #include <vector> | #include <vector> | ||||||
| @@ -160,7 +160,7 @@ public: | |||||||
|     () |     () | ||||||
|     const |     const | ||||||
|     { |     { | ||||||
|         size_t overallIndex = Hub::getGeneratorIndex( m_fileInfo, m_totalSize ); |         size_t overallIndex = Context::getGeneratorIndex( m_fileInfo, m_totalSize ); | ||||||
|          |          | ||||||
|         typename std::vector<const IGenerator<T>*>::const_iterator it = m_composed.begin(); |         typename std::vector<const IGenerator<T>*>::const_iterator it = m_composed.begin(); | ||||||
|         typename std::vector<const IGenerator<T>*>::const_iterator itEnd = m_composed.end(); |         typename std::vector<const IGenerator<T>*>::const_iterator itEnd = m_composed.end(); | ||||||
|   | |||||||
| @@ -1,102 +0,0 @@ | |||||||
| /* |  | ||||||
|  *  catch_hub.h |  | ||||||
|  *  Catch |  | ||||||
|  * |  | ||||||
|  *  Created by Phil on 31/12/2010. |  | ||||||
|  *  Copyright 2010 Two Blue Cubes Ltd. All rights reserved. |  | ||||||
|  * |  | ||||||
|  *  Distributed under the Boost Software License, Version 1.0. (See accompanying |  | ||||||
|  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |  | ||||||
|  * |  | ||||||
|  */ |  | ||||||
| #ifndef TWOBLUECUBES_CATCH_HUB_H_INCLUDED |  | ||||||
| #define TWOBLUECUBES_CATCH_HUB_H_INCLUDED |  | ||||||
|  |  | ||||||
| #include "catch_interfaces_reporter.h" |  | ||||||
|  |  | ||||||
| #include <memory> |  | ||||||
| #include <vector> |  | ||||||
| #include <stdlib.h> |  | ||||||
|  |  | ||||||
| namespace Catch |  | ||||||
| { |  | ||||||
|     class TestCaseInfo; |  | ||||||
|     struct IResultCapture; |  | ||||||
|     struct ITestCaseRegistry; |  | ||||||
|     struct IRunner; |  | ||||||
|     struct IExceptionTranslatorRegistry; |  | ||||||
|     class GeneratorsForTest; |  | ||||||
|  |  | ||||||
|     class StreamBufBase : public std::streambuf |  | ||||||
|     { |  | ||||||
|     }; |  | ||||||
|      |  | ||||||
|     class Hub |  | ||||||
|     { |  | ||||||
|         Hub(); |  | ||||||
|          |  | ||||||
|         static Hub& me(); |  | ||||||
|          |  | ||||||
|         Hub( const Hub& ); |  | ||||||
|         void operator=( const Hub& ); |  | ||||||
|          |  | ||||||
|     public: |  | ||||||
|          |  | ||||||
|         static void setRunner |  | ||||||
|             ( IRunner* runner  |  | ||||||
|             ); |  | ||||||
|          |  | ||||||
|         static void setResultCapture |  | ||||||
|             ( IResultCapture* resultCapture  |  | ||||||
|             ); |  | ||||||
|          |  | ||||||
|         static IResultCapture& getResultCapture |  | ||||||
|             (); |  | ||||||
|          |  | ||||||
|         static IReporterRegistry& getReporterRegistry |  | ||||||
|             (); |  | ||||||
|          |  | ||||||
|         static ITestCaseRegistry& getTestCaseRegistry |  | ||||||
|             (); |  | ||||||
|          |  | ||||||
|         static IExceptionTranslatorRegistry& getExceptionTranslatorRegistry |  | ||||||
|             (); |  | ||||||
|          |  | ||||||
|         static std::streambuf* createStreamBuf |  | ||||||
|             ( const std::string& streamName |  | ||||||
|             ); |  | ||||||
|          |  | ||||||
|         static IRunner& getRunner |  | ||||||
|             (); |  | ||||||
|          |  | ||||||
|         static size_t getGeneratorIndex |  | ||||||
|             (   const std::string& fileInfo,  |  | ||||||
|                 size_t totalSize  |  | ||||||
|             ); |  | ||||||
|          |  | ||||||
|         static bool advanceGeneratorsForCurrentTest |  | ||||||
|             (); |  | ||||||
|          |  | ||||||
|         static void cleanUp |  | ||||||
|             (); |  | ||||||
|          |  | ||||||
|     private: |  | ||||||
|  |  | ||||||
|         static Hub*& singleInstance(); |  | ||||||
|          |  | ||||||
|         GeneratorsForTest* findGeneratorsForCurrentTest |  | ||||||
|             (); |  | ||||||
|          |  | ||||||
|         GeneratorsForTest& getGeneratorsForCurrentTest |  | ||||||
|             (); |  | ||||||
|          |  | ||||||
|         std::auto_ptr<IReporterRegistry> m_reporterRegistry; |  | ||||||
|         std::auto_ptr<ITestCaseRegistry> m_testCaseRegistry; |  | ||||||
|         std::auto_ptr<IExceptionTranslatorRegistry> m_exceptionTranslatorRegistry; |  | ||||||
|         IRunner* m_runner; |  | ||||||
|         IResultCapture* m_resultCapture; |  | ||||||
|         std::map<std::string, GeneratorsForTest*> m_generatorsByTestName; |  | ||||||
|     }; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| #endif // TWOBLUECUBES_CATCH_HUB_H_INCLUDED |  | ||||||
| @@ -77,7 +77,7 @@ namespace Catch | |||||||
|             std::string(*translateFunction)( T& )  |             std::string(*translateFunction)( T& )  | ||||||
|         ) |         ) | ||||||
|         { |         { | ||||||
|             Catch::Hub::getExceptionTranslatorRegistry().registerTranslator |             Catch::Context::getExceptionTranslatorRegistry().registerTranslator | ||||||
|                 ( new ExceptionTranslator<T>( translateFunction ) ); |                 ( new ExceptionTranslator<T>( translateFunction ) ); | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
|   | |||||||
| @@ -27,8 +27,8 @@ namespace Catch | |||||||
|         if( config.listWhat() & Config::List::Reports ) |         if( config.listWhat() & Config::List::Reports ) | ||||||
|         { |         { | ||||||
|             std::cout << "Available reports:\n"; |             std::cout << "Available reports:\n"; | ||||||
|             IReporterRegistry::FactoryMap::const_iterator it = Hub::getReporterRegistry().getFactories().begin(); |             IReporterRegistry::FactoryMap::const_iterator it = Context::getReporterRegistry().getFactories().begin(); | ||||||
|             IReporterRegistry::FactoryMap::const_iterator itEnd = Hub::getReporterRegistry().getFactories().end(); |             IReporterRegistry::FactoryMap::const_iterator itEnd = Context::getReporterRegistry().getFactories().end(); | ||||||
|             for(; it != itEnd; ++it ) |             for(; it != itEnd; ++it ) | ||||||
|             { |             { | ||||||
|                 // !TBD: consider listAs() |                 // !TBD: consider listAs() | ||||||
| @@ -39,8 +39,8 @@ namespace Catch | |||||||
|         if( config.listWhat() & Config::List::Tests ) |         if( config.listWhat() & Config::List::Tests ) | ||||||
|         { |         { | ||||||
|             std::cout << "Available tests:\n"; |             std::cout << "Available tests:\n"; | ||||||
|             std::vector<TestCaseInfo>::const_iterator it = Hub::getTestCaseRegistry().getAllTests().begin(); |             std::vector<TestCaseInfo>::const_iterator it = Context::getTestCaseRegistry().getAllTests().begin(); | ||||||
|             std::vector<TestCaseInfo>::const_iterator itEnd = Hub::getTestCaseRegistry().getAllTests().end(); |             std::vector<TestCaseInfo>::const_iterator itEnd = Context::getTestCaseRegistry().getAllTests().end(); | ||||||
|             for(; it != itEnd; ++it ) |             for(; it != itEnd; ++it ) | ||||||
|             { |             { | ||||||
|                 // !TBD: consider listAs() |                 // !TBD: consider listAs() | ||||||
|   | |||||||
| @@ -192,7 +192,7 @@ namespace Catch | |||||||
|                         std::string name = Detail::getAnnotation( cls, "Name", testCaseName ); |                         std::string name = Detail::getAnnotation( cls, "Name", testCaseName ); | ||||||
|                         std::string desc = Detail::getAnnotation( cls, "Description", testCaseName ); |                         std::string desc = Detail::getAnnotation( cls, "Description", testCaseName ); | ||||||
|                          |                          | ||||||
|                         Hub::getTestCaseRegistry().registerTest( TestCaseInfo( new OcMethod( cls, selector ), name.c_str(), desc.c_str(), "", 0 ) ); |                         Context::getTestCaseRegistry().registerTest( TestCaseInfo( new OcMethod( cls, selector ), name.c_str(), desc.c_str(), "", 0 ) ); | ||||||
|                         noTestMethods++; |                         noTestMethods++; | ||||||
|                          |                          | ||||||
|                     } |                     } | ||||||
|   | |||||||
| @@ -12,7 +12,7 @@ | |||||||
| #ifndef TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED | #ifndef TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED | ||||||
| #define TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED | #define TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED | ||||||
|  |  | ||||||
| #include "catch_hub.h" | #include "catch_context.h" | ||||||
|  |  | ||||||
| namespace Catch | namespace Catch | ||||||
| {     | {     | ||||||
| @@ -47,7 +47,7 @@ namespace Catch | |||||||
|             const std::string& name |             const std::string& name | ||||||
|         ) |         ) | ||||||
|         { |         { | ||||||
|             Hub::getReporterRegistry().registerReporter( name, new ReporterFactory() ); |             Context::getReporterRegistry().registerReporter( name, new ReporterFactory() ); | ||||||
|         } |         } | ||||||
|     };  |     };  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -75,11 +75,11 @@ namespace Catch | |||||||
|         :   m_runningTest( NULL ), |         :   m_runningTest( NULL ), | ||||||
|             m_config( config ), |             m_config( config ), | ||||||
|             m_reporter( config.getReporter() ), |             m_reporter( config.getReporter() ), | ||||||
|             m_prevRunner( &Hub::getRunner() ), |             m_prevRunner( &Context::getRunner() ), | ||||||
|             m_prevResultCapture( &Hub::getResultCapture() ) |             m_prevResultCapture( &Context::getResultCapture() ) | ||||||
|         { |         { | ||||||
|             Hub::setRunner( this ); |             Context::setRunner( this ); | ||||||
|             Hub::setResultCapture( this ); |             Context::setResultCapture( this ); | ||||||
|             m_reporter->StartTesting(); |             m_reporter->StartTesting(); | ||||||
|         } |         } | ||||||
|          |          | ||||||
| @@ -88,8 +88,8 @@ namespace Catch | |||||||
|         () |         () | ||||||
|         { |         { | ||||||
|             m_reporter->EndTesting( m_totals ); |             m_reporter->EndTesting( m_totals ); | ||||||
|             Hub::setRunner( m_prevRunner ); |             Context::setRunner( m_prevRunner ); | ||||||
|             Hub::setResultCapture( m_prevResultCapture ); |             Context::setResultCapture( m_prevResultCapture ); | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         /////////////////////////////////////////////////////////////////////////// |         /////////////////////////////////////////////////////////////////////////// | ||||||
| @@ -98,7 +98,7 @@ namespace Catch | |||||||
|             bool runHiddenTests = false |             bool runHiddenTests = false | ||||||
|         ) |         ) | ||||||
|         { |         { | ||||||
|             std::vector<TestCaseInfo> allTests = Hub::getTestCaseRegistry().getAllTests(); |             std::vector<TestCaseInfo> allTests = Context::getTestCaseRegistry().getAllTests(); | ||||||
|             for( std::size_t i=0; i < allTests.size(); ++i ) |             for( std::size_t i=0; i < allTests.size(); ++i ) | ||||||
|             { |             { | ||||||
|                 if( runHiddenTests || !allTests[i].isHidden() ) |                 if( runHiddenTests || !allTests[i].isHidden() ) | ||||||
| @@ -114,7 +114,7 @@ namespace Catch | |||||||
|         { |         { | ||||||
|             TestSpec testSpec( rawTestSpec ); |             TestSpec testSpec( rawTestSpec ); | ||||||
|              |              | ||||||
|             std::vector<TestCaseInfo> allTests = Hub::getTestCaseRegistry().getAllTests(); |             std::vector<TestCaseInfo> allTests = Context::getTestCaseRegistry().getAllTests(); | ||||||
|             std::size_t testsRun = 0; |             std::size_t testsRun = 0; | ||||||
|             for( std::size_t i=0; i < allTests.size(); ++i ) |             for( std::size_t i=0; i < allTests.size(); ++i ) | ||||||
|             { |             { | ||||||
| @@ -153,7 +153,7 @@ namespace Catch | |||||||
|                 } |                 } | ||||||
|                 while( m_runningTest->hasUntestedSections() ); |                 while( m_runningTest->hasUntestedSections() ); | ||||||
|             } |             } | ||||||
|             while( Hub::advanceGeneratorsForCurrentTest() ); |             while( Context::advanceGeneratorsForCurrentTest() ); | ||||||
|  |  | ||||||
|             delete m_runningTest; |             delete m_runningTest; | ||||||
|             m_runningTest = NULL; |             m_runningTest = NULL; | ||||||
| @@ -365,7 +365,7 @@ namespace Catch | |||||||
|             } |             } | ||||||
|             catch(...) |             catch(...) | ||||||
|             { |             { | ||||||
|                 acceptMessage( Catch::Hub::getExceptionTranslatorRegistry().translateActiveException() ); |                 acceptMessage( Catch::Context::getExceptionTranslatorRegistry().translateActiveException() ); | ||||||
|                 acceptResult( ResultWas::ThrewException ); |                 acceptResult( ResultWas::ThrewException ); | ||||||
|             } |             } | ||||||
|             m_info.clear(); |             m_info.clear(); | ||||||
|   | |||||||
| @@ -31,7 +31,7 @@ namespace Catch | |||||||
|             const SourceLineInfo& lineInfo |             const SourceLineInfo& lineInfo | ||||||
|         ) |         ) | ||||||
|         :   m_name( name ), |         :   m_name( name ), | ||||||
|             m_sectionIncluded( Hub::getResultCapture().sectionStarted( name, description, lineInfo, m_assertions ) ) |             m_sectionIncluded( Context::getResultCapture().sectionStarted( name, description, lineInfo, m_assertions ) ) | ||||||
|         { |         { | ||||||
|         } |         } | ||||||
|  |  | ||||||
| @@ -40,7 +40,7 @@ namespace Catch | |||||||
|         () |         () | ||||||
|         { |         { | ||||||
|             if( m_sectionIncluded ) |             if( m_sectionIncluded ) | ||||||
|                 Hub::getResultCapture().sectionEnded( m_name, m_assertions ); |                 Context::getResultCapture().sectionEnded( m_name, m_assertions ); | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         ///////////////////////////////////////////////////////////////////////         |         ///////////////////////////////////////////////////////////////////////         | ||||||
|   | |||||||
| @@ -12,7 +12,7 @@ | |||||||
|  |  | ||||||
| #include "catch_test_registry.hpp" | #include "catch_test_registry.hpp" | ||||||
| #include "catch_test_case_info.hpp" | #include "catch_test_case_info.hpp" | ||||||
| #include "catch_hub.h" | #include "catch_context.h" | ||||||
|  |  | ||||||
| #include <vector> | #include <vector> | ||||||
| #include <set> | #include <set> | ||||||
| @@ -179,7 +179,7 @@ namespace Catch | |||||||
|         const SourceLineInfo& lineInfo |         const SourceLineInfo& lineInfo | ||||||
|     ) |     ) | ||||||
|     { |     { | ||||||
|         Hub::getTestCaseRegistry().registerTest( TestCaseInfo( testCase, name, description, lineInfo ) ); |         Context::getTestCaseRegistry().registerTest( TestCaseInfo( testCase, name, description, lineInfo ) ); | ||||||
|     } |     } | ||||||
|      |      | ||||||
| } // end namespace Catch | } // end namespace Catch | ||||||
|   | |||||||
| @@ -116,6 +116,12 @@ inline std::string toString( bool value ) { | |||||||
|     return value ? "true" : "false"; |     return value ? "true" : "false"; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | #ifdef CATCH_CONFIG_CPP11_NULLPTR | ||||||
|  | inline std::string toString( std::nullptr_t null ) { | ||||||
|  |     return "nullptr"; | ||||||
|  | } | ||||||
|  | #endif | ||||||
|  |  | ||||||
| } // end namespace Catch | } // end namespace Catch | ||||||
|  |  | ||||||
| #endif // TWOBLUECUBES_CATCH_TOSTRING_HPP_INCLUDED | #endif // TWOBLUECUBES_CATCH_TOSTRING_HPP_INCLUDED | ||||||
|   | |||||||
| @@ -180,7 +180,7 @@ namespace Catch | |||||||
|             Expected::Result expectedResult |             Expected::Result expectedResult | ||||||
|         ) |         ) | ||||||
|         { |         { | ||||||
|             forEach(    Hub::getTestCaseRegistry().getMatchingTestCases( testSpec ),  |             forEach(    Context::getTestCaseRegistry().getMatchingTestCases( testSpec ),  | ||||||
|                         MetaTestRunner( expectedResult ) ); |                         MetaTestRunner( expectedResult ) ); | ||||||
|         } |         } | ||||||
|          |          | ||||||
|   | |||||||
| @@ -61,8 +61,8 @@ | |||||||
| 		4A6D0C4E149B3E3D00DB3EAA /* catch_exception_translator_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_exception_translator_registry.hpp; sourceTree = "<group>"; }; | 		4A6D0C4E149B3E3D00DB3EAA /* catch_exception_translator_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_exception_translator_registry.hpp; sourceTree = "<group>"; }; | ||||||
| 		4A6D0C4F149B3E3D00DB3EAA /* catch_generators.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_generators.hpp; sourceTree = "<group>"; }; | 		4A6D0C4F149B3E3D00DB3EAA /* catch_generators.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_generators.hpp; sourceTree = "<group>"; }; | ||||||
| 		4A6D0C50149B3E3D00DB3EAA /* catch_generators_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_generators_impl.hpp; sourceTree = "<group>"; }; | 		4A6D0C50149B3E3D00DB3EAA /* catch_generators_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_generators_impl.hpp; sourceTree = "<group>"; }; | ||||||
| 		4A6D0C51149B3E3D00DB3EAA /* catch_hub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_hub.h; sourceTree = "<group>"; }; | 		4A6D0C51149B3E3D00DB3EAA /* catch_context.h */ = {isa = PBXFileReference; fileEncoding = 4; path = catch_context.h; sourceTree = "<group>"; }; | ||||||
| 		4A6D0C52149B3E3D00DB3EAA /* catch_hub_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_hub_impl.hpp; sourceTree = "<group>"; }; | 		4A6D0C52149B3E3D00DB3EAA /* catch_context_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; path = catch_context_impl.hpp; sourceTree = "<group>"; }; | ||||||
| 		4A6D0C53149B3E3D00DB3EAA /* catch_interfaces_capture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_capture.h; sourceTree = "<group>"; }; | 		4A6D0C53149B3E3D00DB3EAA /* catch_interfaces_capture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_capture.h; sourceTree = "<group>"; }; | ||||||
| 		4A6D0C54149B3E3D00DB3EAA /* catch_interfaces_exception.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_exception.h; sourceTree = "<group>"; }; | 		4A6D0C54149B3E3D00DB3EAA /* catch_interfaces_exception.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_exception.h; sourceTree = "<group>"; }; | ||||||
| 		4A6D0C55149B3E3D00DB3EAA /* catch_interfaces_reporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_reporter.h; sourceTree = "<group>"; }; | 		4A6D0C55149B3E3D00DB3EAA /* catch_interfaces_reporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_reporter.h; sourceTree = "<group>"; }; | ||||||
| @@ -176,8 +176,8 @@ | |||||||
| 				4A6D0C4E149B3E3D00DB3EAA /* catch_exception_translator_registry.hpp */, | 				4A6D0C4E149B3E3D00DB3EAA /* catch_exception_translator_registry.hpp */, | ||||||
| 				4A6D0C4F149B3E3D00DB3EAA /* catch_generators.hpp */, | 				4A6D0C4F149B3E3D00DB3EAA /* catch_generators.hpp */, | ||||||
| 				4A6D0C50149B3E3D00DB3EAA /* catch_generators_impl.hpp */, | 				4A6D0C50149B3E3D00DB3EAA /* catch_generators_impl.hpp */, | ||||||
| 				4A6D0C51149B3E3D00DB3EAA /* catch_hub.h */, | 				4A6D0C51149B3E3D00DB3EAA /* catch_context.h */, | ||||||
| 				4A6D0C52149B3E3D00DB3EAA /* catch_hub_impl.hpp */, | 				4A6D0C52149B3E3D00DB3EAA /* catch_context_impl.hpp */, | ||||||
| 				4A6D0C53149B3E3D00DB3EAA /* catch_interfaces_capture.h */, | 				4A6D0C53149B3E3D00DB3EAA /* catch_interfaces_capture.h */, | ||||||
| 				4A6D0C54149B3E3D00DB3EAA /* catch_interfaces_exception.h */, | 				4A6D0C54149B3E3D00DB3EAA /* catch_interfaces_exception.h */, | ||||||
| 				4A6D0C55149B3E3D00DB3EAA /* catch_interfaces_reporter.h */, | 				4A6D0C55149B3E3D00DB3EAA /* catch_interfaces_reporter.h */, | ||||||
| @@ -292,6 +292,9 @@ | |||||||
| 			buildSettings = { | 			buildSettings = { | ||||||
| 				ALWAYS_SEARCH_USER_PATHS = NO; | 				ALWAYS_SEARCH_USER_PATHS = NO; | ||||||
| 				ARCHS = "$(ARCHS_STANDARD_64_BIT)"; | 				ARCHS = "$(ARCHS_STANDARD_64_BIT)"; | ||||||
|  | 				CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; | ||||||
|  | 				CLANG_CXX_LIBRARY = "libc++"; | ||||||
|  | 				CLANG_WARN_CXX0X_EXTENSIONS = NO; | ||||||
| 				CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; | 				CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; | ||||||
| 				COPY_PHASE_STRIP = NO; | 				COPY_PHASE_STRIP = NO; | ||||||
| 				GCC_C_LANGUAGE_STANDARD = gnu99; | 				GCC_C_LANGUAGE_STANDARD = gnu99; | ||||||
| @@ -319,6 +322,9 @@ | |||||||
| 			buildSettings = { | 			buildSettings = { | ||||||
| 				ALWAYS_SEARCH_USER_PATHS = NO; | 				ALWAYS_SEARCH_USER_PATHS = NO; | ||||||
| 				ARCHS = "$(ARCHS_STANDARD_64_BIT)"; | 				ARCHS = "$(ARCHS_STANDARD_64_BIT)"; | ||||||
|  | 				CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; | ||||||
|  | 				CLANG_CXX_LIBRARY = "libc++"; | ||||||
|  | 				CLANG_WARN_CXX0X_EXTENSIONS = NO; | ||||||
| 				CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; | 				CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; | ||||||
| 				COPY_PHASE_STRIP = YES; | 				COPY_PHASE_STRIP = YES; | ||||||
| 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash