diff options
| author | Martin Hořeňovský | 2023-03-13 00:03:48 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2023-03-22 23:58:44 +0100 |
| commit | d0f70fdfd661b50c1b8721ae70d49656dc68929b (patch) | |
| tree | 04945f8cd0b93afe4fb345e9e942ad1f6028b2f9 /src/catch2/interfaces | |
| parent | 4f4ad8ada9d17292bb7435043b5453457a24a016 (diff) | |
| download | catch3-d0f70fdfd661b50c1b8721ae70d49656dc68929b.tar.gz | |
Unify IReporterRegistry and ReporterRegistry
To keep the compilation firewall effect, the implementations
are hidden behind a PIMPL. In this case it is probably not
worth it, but we can inline it later if needed.
Diffstat (limited to 'src/catch2/interfaces')
4 files changed, 2 insertions, 58 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_all.hpp b/src/catch2/interfaces/catch_interfaces_all.hpp index 87b746d8..7a0d0c29 100644 --- a/src/catch2/interfaces/catch_interfaces_all.hpp +++ b/src/catch2/interfaces/catch_interfaces_all.hpp @@ -30,7 +30,6 @@ #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_tag_alias_registry.hpp> #include <catch2/interfaces/catch_interfaces_testcase.hpp> diff --git a/src/catch2/interfaces/catch_interfaces_registry_hub.hpp b/src/catch2/interfaces/catch_interfaces_registry_hub.hpp index 8813b538..113f223e 100644 --- a/src/catch2/interfaces/catch_interfaces_registry_hub.hpp +++ b/src/catch2/interfaces/catch_interfaces_registry_hub.hpp @@ -19,7 +19,7 @@ namespace Catch { class ITestCaseRegistry; class IExceptionTranslatorRegistry; class IExceptionTranslator; - class IReporterRegistry; + class ReporterRegistry; class IReporterFactory; class ITagAliasRegistry; class ITestInvoker; @@ -35,7 +35,7 @@ namespace Catch { public: virtual ~IRegistryHub(); // = default - virtual IReporterRegistry const& getReporterRegistry() const = 0; + virtual ReporterRegistry const& getReporterRegistry() const = 0; virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0; virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0; virtual IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0; diff --git a/src/catch2/interfaces/catch_interfaces_reporter_registry.cpp b/src/catch2/interfaces/catch_interfaces_reporter_registry.cpp deleted file mode 100644 index f620cbc8..00000000 --- a/src/catch2/interfaces/catch_interfaces_reporter_registry.cpp +++ /dev/null @@ -1,13 +0,0 @@ - -// Copyright Catch2 Authors -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE.txt or copy at -// https://www.boost.org/LICENSE_1_0.txt) - -// SPDX-License-Identifier: BSL-1.0 - -#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp> - -namespace Catch { - IReporterRegistry::~IReporterRegistry() = default; -} diff --git a/src/catch2/interfaces/catch_interfaces_reporter_registry.hpp b/src/catch2/interfaces/catch_interfaces_reporter_registry.hpp deleted file mode 100644 index 277d1761..00000000 --- a/src/catch2/interfaces/catch_interfaces_reporter_registry.hpp +++ /dev/null @@ -1,42 +0,0 @@ - -// Copyright Catch2 Authors -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE.txt or copy at -// https://www.boost.org/LICENSE_1_0.txt) - -// SPDX-License-Identifier: BSL-1.0 -#ifndef CATCH_INTERFACES_REPORTER_REGISTRY_HPP_INCLUDED -#define CATCH_INTERFACES_REPORTER_REGISTRY_HPP_INCLUDED - -#include <catch2/internal/catch_case_insensitive_comparisons.hpp> -#include <catch2/internal/catch_unique_ptr.hpp> - -#include <string> -#include <vector> -#include <map> - -namespace Catch { - - class IConfig; - - class IEventListener; - using IEventListenerPtr = Detail::unique_ptr<IEventListener>; - class IReporterFactory; - using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>; - struct ReporterConfig; - class EventListenerFactory; - - class IReporterRegistry { - public: - using FactoryMap = std::map<std::string, IReporterFactoryPtr, Detail::CaseInsensitiveLess>; - using Listeners = std::vector<Detail::unique_ptr<EventListenerFactory>>; - - virtual ~IReporterRegistry(); // = default - virtual IEventListenerPtr create( std::string const& name, ReporterConfig&& config ) const = 0; - virtual FactoryMap const& getFactories() const = 0; - virtual Listeners const& getListeners() const = 0; - }; - -} // end namespace Catch - -#endif // CATCH_INTERFACES_REPORTER_REGISTRY_HPP_INCLUDED |