mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-21 03:55:39 +02:00
@@ -11,22 +11,22 @@
|
||||
#include "catch_interfaces_registry_hub.h"
|
||||
#include "catch_legacy_reporter_adapter.h"
|
||||
|
||||
namespace Catch {
|
||||
namespace Catch {
|
||||
|
||||
template<typename T>
|
||||
class LegacyReporterRegistrar {
|
||||
|
||||
|
||||
class ReporterFactory : public IReporterFactory {
|
||||
|
||||
virtual IStreamingReporter* create( ReporterConfig const& config ) const {
|
||||
return new LegacyReporterAdapter( new T( config ) );
|
||||
}
|
||||
|
||||
|
||||
virtual std::string getDescription() const {
|
||||
return T::getDescription();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
|
||||
LegacyReporterRegistrar( std::string const& name ) {
|
||||
@@ -64,7 +64,7 @@ namespace Catch {
|
||||
ReporterRegistrar( std::string const& name ) {
|
||||
getMutableRegistryHub().registerReporter( name, new ReporterFactory() );
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
#define INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( name, reporterType ) \
|
||||
|
Reference in New Issue
Block a user