mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Add define that pulls in reporter and listeners interfaces
This allows users to define reporters and listeners in files different from the main file. Related to #991, #986
This commit is contained in:
		
							
								
								
									
										13
									
								
								include/internal/catch_external_interfaces.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								include/internal/catch_external_interfaces.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| /* | ||||
|  *  Created by Martin on 17/08/2017. | ||||
|  * | ||||
|  *  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_EXTERNAL_INTERFACES_H | ||||
| #define TWOBLUECUBES_CATCH_EXTERNAL_INTERFACES_H | ||||
|  | ||||
| #include "../reporters/catch_reporter_bases.hpp" | ||||
| #include "catch_reporter_registrars.hpp" | ||||
|  | ||||
| #endif // TWOBLUECUBES_CATCH_EXTERNAL_INTERFACES_H | ||||
| @@ -1,3 +1,4 @@ | ||||
|  | ||||
| /* | ||||
|  *  Created by Phil on 31/12/2010. | ||||
|  *  Copyright 2010 Two Blue Cubes Ltd. All rights reserved. | ||||
| @@ -39,7 +40,7 @@ namespace Catch { | ||||
|         class ListenerFactory : public IReporterFactory { | ||||
|  | ||||
|             virtual IStreamingReporterPtr create( ReporterConfig const& config ) const override { | ||||
|                 return std::make_shared<T>( config ); | ||||
|                 return std::unique_ptr<T>( new T( config ) ); | ||||
|             } | ||||
|             virtual std::string getDescription() const override { | ||||
|                 return std::string(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský