mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Split out ReporterFactory out of catch_interfaces_reporter.hpp
This commit is contained in:
parent
9677df6d8b
commit
6a08d401aa
@ -72,6 +72,7 @@ set(INTERNAL_HEADERS
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_generatortracker.hpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_registry_hub.hpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_reporter.hpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_reporter_factory.hpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_reporter_registry.hpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_runner.hpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_tag_alias_registry.hpp
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <catch2/internal/catch_enum_values_registry.hpp>
|
||||
#include <catch2/catch_test_case_info.hpp>
|
||||
#include <catch2/internal/catch_noncopyable.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_factory.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_factory.hpp>
|
||||
#include <catch2/internal/catch_unique_ptr.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <catch2/internal/catch_windows_h_proxy.hpp>
|
||||
#include <catch2/reporters/catch_reporter_listening.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_factory.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <catch2/interfaces/catch_interfaces_generatortracker.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_factory.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_runner.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_tag_alias_registry.hpp>
|
||||
|
@ -83,3 +83,10 @@ namespace Catch {
|
||||
namespace Catch {
|
||||
IReporterRegistry::~IReporterRegistry() = default;
|
||||
}
|
||||
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_factory.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IReporterFactory::~IReporterFactory() = default;
|
||||
}
|
||||
|
@ -186,6 +186,4 @@ namespace Catch {
|
||||
Catch::cout() << pluralise(tags.size(), "tag") << '\n' << std::endl;
|
||||
}
|
||||
|
||||
IReporterFactory::~IReporterFactory() = default;
|
||||
|
||||
} // end namespace Catch
|
||||
|
@ -242,13 +242,6 @@ namespace Catch {
|
||||
};
|
||||
using IStreamingReporterPtr = Detail::unique_ptr<IStreamingReporter>;
|
||||
|
||||
struct IReporterFactory {
|
||||
virtual ~IReporterFactory();
|
||||
virtual IStreamingReporterPtr create( ReporterConfig const& config ) const = 0;
|
||||
virtual std::string getDescription() const = 0;
|
||||
};
|
||||
using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>;
|
||||
|
||||
} // end namespace Catch
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_INTERFACES_REPORTER_H_INCLUDED
|
||||
|
18
src/catch2/interfaces/catch_interfaces_reporter_factory.hpp
Normal file
18
src/catch2/interfaces/catch_interfaces_reporter_factory.hpp
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef CATCH_INTERFACES_REPORTER_FACTORY_HPP_INCLUDED
|
||||
#define CATCH_INTERFACES_REPORTER_FACTORY_HPP_INCLUDED
|
||||
|
||||
namespace Catch {
|
||||
|
||||
struct ReporterConfig;
|
||||
|
||||
struct IReporterFactory {
|
||||
virtual ~IReporterFactory(); // = default
|
||||
|
||||
virtual IStreamingReporterPtr
|
||||
create( ReporterConfig const& config ) const = 0;
|
||||
virtual std::string getDescription() const = 0;
|
||||
};
|
||||
using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>;
|
||||
} // namespace Catch
|
||||
|
||||
#endif // CATCH_INTERFACES_REPORTER_FACTORY_HPP_INCLUDED
|
@ -12,6 +12,7 @@
|
||||
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_testcase.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_factory.hpp>
|
||||
|
||||
#include <catch2/internal/catch_context.hpp>
|
||||
#include <catch2/catch_config.hpp>
|
||||
|
Loading…
Reference in New Issue
Block a user