From f3960c02cef9f978e138fd97c5f2436fce38ddd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Wed, 15 Mar 2023 18:57:38 +0100 Subject: [PATCH] Devirtualize RegistryHub --- src/CMakeLists.txt | 5 +- src/catch2/benchmark/catch_benchmark.hpp | 2 + .../detail/catch_complete_invoke.hpp | 1 - src/catch2/catch_all.hpp | 1 + src/catch2/catch_registry_hub.cpp | 105 ---------------- src/catch2/catch_tag_alias_autoregistrar.cpp | 2 +- src/catch2/catch_tostring.hpp | 2 +- src/catch2/catch_translate_exception.cpp | 2 +- .../interfaces/catch_interfaces_all.hpp | 1 - .../catch_interfaces_registry_hub.cpp | 14 --- .../catch_interfaces_registry_hub.hpp | 66 ---------- .../internal/catch_assertion_handler.cpp | 2 +- src/catch2/internal/catch_commandline.cpp | 2 +- src/catch2/internal/catch_leak_detector.cpp | 2 +- src/catch2/internal/catch_list.cpp | 2 +- src/catch2/internal/catch_registry_hub.cpp | 114 ++++++++++++++++++ src/catch2/internal/catch_registry_hub.hpp | 67 ++++++++++ .../internal/catch_tag_alias_registry.cpp | 2 +- .../catch_test_case_registry_impl.cpp | 2 +- src/catch2/internal/catch_test_registry.cpp | 2 +- .../matchers/internal/catch_matchers_impl.cpp | 2 +- src/catch2/meson.build | 4 +- .../reporters/catch_reporter_registrars.cpp | 1 + .../reporters/catch_reporter_registrars.hpp | 1 - 24 files changed, 199 insertions(+), 205 deletions(-) delete mode 100644 src/catch2/catch_registry_hub.cpp delete mode 100644 src/catch2/interfaces/catch_interfaces_registry_hub.cpp delete mode 100644 src/catch2/interfaces/catch_interfaces_registry_hub.hpp create mode 100644 src/catch2/internal/catch_registry_hub.cpp create mode 100644 src/catch2/internal/catch_registry_hub.hpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9bef6cbb..d115b3dd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -106,6 +106,7 @@ set(IMPL_HEADERS ${SOURCES_DIR}/internal/catch_preprocessor_remove_parens.hpp ${SOURCES_DIR}/internal/catch_random_number_generator.hpp ${SOURCES_DIR}/internal/catch_random_seed_generation.hpp + ${SOURCES_DIR}/internal/catch_registry_hub.hpp ${SOURCES_DIR}/internal/catch_reporter_registry.hpp ${SOURCES_DIR}/internal/catch_reporter_spec_parser.hpp ${SOURCES_DIR}/internal/catch_result_type.hpp @@ -145,7 +146,6 @@ set(IMPL_SOURCES ${SOURCES_DIR}/catch_config.cpp ${SOURCES_DIR}/catch_get_random_seed.cpp ${SOURCES_DIR}/catch_message.cpp - ${SOURCES_DIR}/catch_registry_hub.cpp ${SOURCES_DIR}/catch_session.cpp ${SOURCES_DIR}/catch_tag_alias_autoregistrar.cpp ${SOURCES_DIR}/catch_test_case_info.cpp @@ -181,6 +181,7 @@ set(IMPL_SOURCES ${SOURCES_DIR}/internal/catch_polyfills.cpp ${SOURCES_DIR}/internal/catch_random_number_generator.cpp ${SOURCES_DIR}/internal/catch_random_seed_generation.cpp + ${SOURCES_DIR}/internal/catch_registry_hub.cpp ${SOURCES_DIR}/internal/catch_reporter_registry.cpp ${SOURCES_DIR}/internal/catch_reporter_spec_parser.cpp ${SOURCES_DIR}/internal/catch_result_type.cpp @@ -213,7 +214,6 @@ set(INTERFACE_HEADERS ${SOURCES_DIR}/interfaces/catch_interfaces_config.hpp ${SOURCES_DIR}/interfaces/catch_interfaces_exception.hpp ${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_testcase.hpp @@ -223,7 +223,6 @@ set(INTERFACE_SOURCES ${SOURCES_DIR}/interfaces/catch_interfaces_config.cpp ${SOURCES_DIR}/interfaces/catch_interfaces_exception.cpp ${SOURCES_DIR}/interfaces/catch_interfaces_generatortracker.cpp - ${SOURCES_DIR}/interfaces/catch_interfaces_registry_hub.cpp ${SOURCES_DIR}/interfaces/catch_interfaces_reporter.cpp ${SOURCES_DIR}/interfaces/catch_interfaces_reporter_factory.cpp ${SOURCES_DIR}/interfaces/catch_interfaces_testcase.cpp diff --git a/src/catch2/benchmark/catch_benchmark.hpp b/src/catch2/benchmark/catch_benchmark.hpp index 1cf10be6..6683dc05 100644 --- a/src/catch2/benchmark/catch_benchmark.hpp +++ b/src/catch2/benchmark/catch_benchmark.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -26,6 +27,7 @@ #include #include + #include #include #include diff --git a/src/catch2/benchmark/detail/catch_complete_invoke.hpp b/src/catch2/benchmark/detail/catch_complete_invoke.hpp index 49db413e..d24da37d 100644 --- a/src/catch2/benchmark/detail/catch_complete_invoke.hpp +++ b/src/catch2/benchmark/detail/catch_complete_invoke.hpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/src/catch2/catch_all.hpp b/src/catch2/catch_all.hpp index be146421..d0fd8c6d 100644 --- a/src/catch2/catch_all.hpp +++ b/src/catch2/catch_all.hpp @@ -89,6 +89,7 @@ #include #include #include +#include #include #include #include diff --git a/src/catch2/catch_registry_hub.cpp b/src/catch2/catch_registry_hub.cpp deleted file mode 100644 index f47d1742..00000000 --- a/src/catch2/catch_registry_hub.cpp +++ /dev/null @@ -1,105 +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 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Catch { - - namespace { - - class RegistryHub : public IRegistryHub, - public IMutableRegistryHub, - private Detail::NonCopyable { - - public: // IRegistryHub - RegistryHub() = default; - ReporterRegistry const& getReporterRegistry() const override { - return m_reporterRegistry; - } - TestCaseRegistry const& getTestCaseRegistry() const override { - return m_testCaseRegistry; - } - ExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const override { - return m_exceptionTranslatorRegistry; - } - TagAliasRegistry const& getTagAliasRegistry() const override { - return m_tagAliasRegistry; - } - StartupExceptionRegistry const& getStartupExceptionRegistry() const override { - return m_exceptionRegistry; - } - - public: // IMutableRegistryHub - void registerReporter( std::string const& name, IReporterFactoryPtr factory ) override { - m_reporterRegistry.registerReporter( name, CATCH_MOVE(factory) ); - } - void registerListener( Detail::unique_ptr factory ) override { - m_reporterRegistry.registerListener( CATCH_MOVE(factory) ); - } - void registerTest( Detail::unique_ptr&& testInfo, Detail::unique_ptr&& invoker ) override { - m_testCaseRegistry.registerTest( CATCH_MOVE(testInfo), CATCH_MOVE(invoker) ); - } - void registerTranslator( Detail::unique_ptr&& translator ) override { - m_exceptionTranslatorRegistry.registerTranslator( CATCH_MOVE(translator) ); - } - void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) override { - m_tagAliasRegistry.add( alias, tag, lineInfo ); - } - void registerStartupException() noexcept override { -#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) - m_exceptionRegistry.add(std::current_exception()); -#else - CATCH_INTERNAL_ERROR("Attempted to register active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!"); -#endif - } - EnumValuesRegistry& getMutableEnumValuesRegistry() override { - return m_enumValuesRegistry; - } - - private: - TestCaseRegistry m_testCaseRegistry; - ReporterRegistry m_reporterRegistry; - ExceptionTranslatorRegistry m_exceptionTranslatorRegistry; - TagAliasRegistry m_tagAliasRegistry; - StartupExceptionRegistry m_exceptionRegistry; - EnumValuesRegistry m_enumValuesRegistry; - }; - } - - using RegistryHubSingleton = Singleton; - - IRegistryHub const& getRegistryHub() { - return RegistryHubSingleton::get(); - } - IMutableRegistryHub& getMutableRegistryHub() { - return RegistryHubSingleton::getMutable(); - } - void cleanUp() { - cleanupSingletons(); - cleanUpContext(); - } - std::string translateActiveException() { - return getRegistryHub().getExceptionTranslatorRegistry().translateActiveException(); - } - - -} // end namespace Catch diff --git a/src/catch2/catch_tag_alias_autoregistrar.cpp b/src/catch2/catch_tag_alias_autoregistrar.cpp index 9b6633a2..f1c488ec 100644 --- a/src/catch2/catch_tag_alias_autoregistrar.cpp +++ b/src/catch2/catch_tag_alias_autoregistrar.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include namespace Catch { diff --git a/src/catch2/catch_tostring.hpp b/src/catch2/catch_tostring.hpp index c95be44c..9425fb47 100644 --- a/src/catch2/catch_tostring.hpp +++ b/src/catch2/catch_tostring.hpp @@ -648,7 +648,7 @@ struct ratio_string { }; } -#include +#include #define INTERNAL_CATCH_REGISTER_ENUM( enumName, ... ) \ namespace Catch { \ diff --git a/src/catch2/catch_translate_exception.cpp b/src/catch2/catch_translate_exception.cpp index c4b28944..dc60174c 100644 --- a/src/catch2/catch_translate_exception.cpp +++ b/src/catch2/catch_translate_exception.cpp @@ -7,7 +7,7 @@ // SPDX-License-Identifier: BSL-1.0 #include -#include +#include namespace Catch { namespace Detail { diff --git a/src/catch2/interfaces/catch_interfaces_all.hpp b/src/catch2/interfaces/catch_interfaces_all.hpp index b1b8e48a..8ee9dcea 100644 --- a/src/catch2/interfaces/catch_interfaces_all.hpp +++ b/src/catch2/interfaces/catch_interfaces_all.hpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/catch2/interfaces/catch_interfaces_registry_hub.cpp b/src/catch2/interfaces/catch_interfaces_registry_hub.cpp deleted file mode 100644 index cd688a44..00000000 --- a/src/catch2/interfaces/catch_interfaces_registry_hub.cpp +++ /dev/null @@ -1,14 +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 - -namespace Catch { - IRegistryHub::~IRegistryHub() = default; - IMutableRegistryHub::~IMutableRegistryHub() = default; -} diff --git a/src/catch2/interfaces/catch_interfaces_registry_hub.hpp b/src/catch2/interfaces/catch_interfaces_registry_hub.hpp deleted file mode 100644 index 14a935fa..00000000 --- a/src/catch2/interfaces/catch_interfaces_registry_hub.hpp +++ /dev/null @@ -1,66 +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_REGISTRY_HUB_HPP_INCLUDED -#define CATCH_INTERFACES_REGISTRY_HUB_HPP_INCLUDED - -#include - -#include - -namespace Catch { - - class TestCaseHandle; - struct TestCaseInfo; - class TestCaseRegistry; - class ExceptionTranslatorRegistry; - class IExceptionTranslator; - class ReporterRegistry; - class IReporterFactory; - class TagAliasRegistry; - class ITestInvoker; - class EnumValuesRegistry; - struct SourceLineInfo; - - class StartupExceptionRegistry; - class EventListenerFactory; - - using IReporterFactoryPtr = Detail::unique_ptr; - - class IRegistryHub { - public: - virtual ~IRegistryHub(); // = default - - virtual ReporterRegistry const& getReporterRegistry() const = 0; - virtual TestCaseRegistry const& getTestCaseRegistry() const = 0; - virtual TagAliasRegistry const& getTagAliasRegistry() const = 0; - virtual ExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0; - - - virtual StartupExceptionRegistry const& getStartupExceptionRegistry() const = 0; - }; - - class IMutableRegistryHub { - public: - virtual ~IMutableRegistryHub(); // = default - virtual void registerReporter( std::string const& name, IReporterFactoryPtr factory ) = 0; - virtual void registerListener( Detail::unique_ptr factory ) = 0; - virtual void registerTest(Detail::unique_ptr&& testInfo, Detail::unique_ptr&& invoker) = 0; - virtual void registerTranslator( Detail::unique_ptr&& translator ) = 0; - virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0; - virtual void registerStartupException() noexcept = 0; - virtual EnumValuesRegistry& getMutableEnumValuesRegistry() = 0; - }; - - IRegistryHub const& getRegistryHub(); - IMutableRegistryHub& getMutableRegistryHub(); - void cleanUp(); - std::string translateActiveException(); - -} - -#endif // CATCH_INTERFACES_REGISTRY_HUB_HPP_INCLUDED diff --git a/src/catch2/internal/catch_assertion_handler.cpp b/src/catch2/internal/catch_assertion_handler.cpp index c28b6190..99ddb11e 100644 --- a/src/catch2/internal/catch_assertion_handler.cpp +++ b/src/catch2/internal/catch_assertion_handler.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/catch2/internal/catch_commandline.cpp b/src/catch2/internal/catch_commandline.cpp index 4ac1847b..2f2be55a 100644 --- a/src/catch2/internal/catch_commandline.cpp +++ b/src/catch2/internal/catch_commandline.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/catch2/internal/catch_leak_detector.cpp b/src/catch2/internal/catch_leak_detector.cpp index 7389eaf7..447025a0 100644 --- a/src/catch2/internal/catch_leak_detector.cpp +++ b/src/catch2/internal/catch_leak_detector.cpp @@ -7,7 +7,7 @@ // SPDX-License-Identifier: BSL-1.0 #include -#include +#include #include #ifdef CATCH_CONFIG_WINDOWS_CRTDBG diff --git a/src/catch2/internal/catch_list.cpp b/src/catch2/internal/catch_list.cpp index 87ace395..2c8ea89c 100644 --- a/src/catch2/internal/catch_list.cpp +++ b/src/catch2/internal/catch_list.cpp @@ -7,7 +7,7 @@ // SPDX-License-Identifier: BSL-1.0 #include -#include +#include #include #include #include diff --git a/src/catch2/internal/catch_registry_hub.cpp b/src/catch2/internal/catch_registry_hub.cpp new file mode 100644 index 00000000..cf0cac42 --- /dev/null +++ b/src/catch2/internal/catch_registry_hub.cpp @@ -0,0 +1,114 @@ + +// 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 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Catch { + + struct RegistryHub::RegistryHubImpl { + TestCaseRegistry testCaseRegistry; + ReporterRegistry reporterRegistry; + ExceptionTranslatorRegistry exceptionTranslatorRegistry; + TagAliasRegistry tagAliasRegistry; + StartupExceptionRegistry exceptionRegistry; + EnumValuesRegistry enumValuesRegistry; + }; + + RegistryHub::RegistryHub(): + m_impl( Detail::make_unique() ) {} + RegistryHub::~RegistryHub() = default; + + ReporterRegistry const& + RegistryHub::getReporterRegistry() const { + return m_impl->reporterRegistry; + } + TestCaseRegistry const& + RegistryHub::getTestCaseRegistry() const { + return m_impl->testCaseRegistry; + } + ExceptionTranslatorRegistry const& + RegistryHub::getExceptionTranslatorRegistry() const { + return m_impl->exceptionTranslatorRegistry; + } + TagAliasRegistry const& + RegistryHub::getTagAliasRegistry() const { + return m_impl->tagAliasRegistry; + } + StartupExceptionRegistry const& + RegistryHub::getStartupExceptionRegistry() const { + return m_impl->exceptionRegistry; + } + void + RegistryHub::registerReporter( std::string const& name, + IReporterFactoryPtr factory ) { + m_impl->reporterRegistry.registerReporter( name, CATCH_MOVE( factory ) ); + } + void RegistryHub::registerListener( + Detail::unique_ptr factory ) { + m_impl->reporterRegistry.registerListener( CATCH_MOVE( factory ) ); + } + void RegistryHub::registerTest( + Detail::unique_ptr&& testInfo, + Detail::unique_ptr&& invoker ) { + m_impl->testCaseRegistry.registerTest( CATCH_MOVE( testInfo ), + CATCH_MOVE( invoker ) ); + } + void RegistryHub::registerTranslator( + Detail::unique_ptr&& translator ) { + m_impl->exceptionTranslatorRegistry.registerTranslator( + CATCH_MOVE( translator ) ); + } + void RegistryHub::registerTagAlias( std::string const& alias, + std::string const& tag, + SourceLineInfo const& lineInfo ) { + m_impl->tagAliasRegistry.add( alias, tag, lineInfo ); + } + void RegistryHub::registerStartupException() noexcept { +#if !defined( CATCH_CONFIG_DISABLE_EXCEPTIONS ) + m_impl->exceptionRegistry.add( std::current_exception() ); +#else + CATCH_INTERNAL_ERROR( "Attempted to register active exception under " + "CATCH_CONFIG_DISABLE_EXCEPTIONS!" ); +#endif + } + EnumValuesRegistry& RegistryHub::getMutableEnumValuesRegistry() { + return m_impl->enumValuesRegistry; + } + + using RegistryHubSingleton = Singleton; + + RegistryHub const& getRegistryHub() { + return RegistryHubSingleton::get(); + } + RegistryHub& getMutableRegistryHub() { + return RegistryHubSingleton::getMutable(); + } + void cleanUp() { + cleanupSingletons(); + cleanUpContext(); + } + std::string translateActiveException() { + return getRegistryHub().getExceptionTranslatorRegistry().translateActiveException(); + } + + +} // end namespace Catch diff --git a/src/catch2/internal/catch_registry_hub.hpp b/src/catch2/internal/catch_registry_hub.hpp new file mode 100644 index 00000000..b13f4aad --- /dev/null +++ b/src/catch2/internal/catch_registry_hub.hpp @@ -0,0 +1,67 @@ + +// 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_REGISTRY_HUB_HPP_INCLUDED +#define CATCH_REGISTRY_HUB_HPP_INCLUDED + +#include + +#include + +namespace Catch { + + class TestCaseHandle; + struct TestCaseInfo; + class TestCaseRegistry; + class ExceptionTranslatorRegistry; + class IExceptionTranslator; + class ReporterRegistry; + class IReporterFactory; + class TagAliasRegistry; + class ITestInvoker; + class EnumValuesRegistry; + struct SourceLineInfo; + + class StartupExceptionRegistry; + class EventListenerFactory; + + using IReporterFactoryPtr = Detail::unique_ptr; + + class RegistryHub { + struct RegistryHubImpl; + Detail::unique_ptr m_impl; + public: + RegistryHub(); + ~RegistryHub(); + + ReporterRegistry const& getReporterRegistry() const; + TestCaseRegistry const& getTestCaseRegistry() const; + TagAliasRegistry const& getTagAliasRegistry() const; + ExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const; + StartupExceptionRegistry const& getStartupExceptionRegistry() const; + + void registerReporter( std::string const& name, + IReporterFactoryPtr factory ); + void registerListener( Detail::unique_ptr factory ); + void registerTest( Detail::unique_ptr&& testInfo, + Detail::unique_ptr&& invoker ); + void registerTranslator( Detail::unique_ptr&& translator ); + void registerTagAlias( std::string const& alias, + std::string const& tag, + SourceLineInfo const& lineInfo ); + void registerStartupException() noexcept; + EnumValuesRegistry& getMutableEnumValuesRegistry(); + }; + + RegistryHub const& getRegistryHub(); + RegistryHub& getMutableRegistryHub(); + void cleanUp(); + std::string translateActiveException(); + +} + +#endif // CATCH_REGISTRY_HUB_HPP_INCLUDED diff --git a/src/catch2/internal/catch_tag_alias_registry.cpp b/src/catch2/internal/catch_tag_alias_registry.cpp index f73f4799..fa3fce07 100644 --- a/src/catch2/internal/catch_tag_alias_registry.cpp +++ b/src/catch2/internal/catch_tag_alias_registry.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/catch2/internal/catch_test_case_registry_impl.cpp b/src/catch2/internal/catch_test_case_registry_impl.cpp index e806ea6e..4a9cb060 100644 --- a/src/catch2/internal/catch_test_case_registry_impl.cpp +++ b/src/catch2/internal/catch_test_case_registry_impl.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/catch2/internal/catch_test_registry.cpp b/src/catch2/internal/catch_test_registry.cpp index b798fb60..0be82bed 100644 --- a/src/catch2/internal/catch_test_registry.cpp +++ b/src/catch2/internal/catch_test_registry.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/catch2/matchers/internal/catch_matchers_impl.cpp b/src/catch2/matchers/internal/catch_matchers_impl.cpp index 41b462e5..1e06ff11 100644 --- a/src/catch2/matchers/internal/catch_matchers_impl.cpp +++ b/src/catch2/matchers/internal/catch_matchers_impl.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include namespace Catch { diff --git a/src/catch2/meson.build b/src/catch2/meson.build index c3505d10..9b84f79a 100644 --- a/src/catch2/meson.build +++ b/src/catch2/meson.build @@ -60,7 +60,6 @@ internal_headers = [ 'interfaces/catch_interfaces_config.hpp', 'interfaces/catch_interfaces_exception.hpp', 'interfaces/catch_interfaces_generatortracker.hpp', - 'interfaces/catch_interfaces_registry_hub.hpp', 'interfaces/catch_interfaces_reporter.hpp', 'interfaces/catch_interfaces_reporter_factory.hpp', 'interfaces/catch_interfaces_testcase.hpp', @@ -183,7 +182,6 @@ internal_sources = files( 'interfaces/catch_interfaces_config.cpp', 'interfaces/catch_interfaces_exception.cpp', 'interfaces/catch_interfaces_generatortracker.cpp', - 'interfaces/catch_interfaces_registry_hub.cpp', 'interfaces/catch_interfaces_reporter.cpp', 'interfaces/catch_interfaces_reporter_factory.cpp', 'interfaces/catch_interfaces_testcase.cpp', @@ -213,6 +211,7 @@ internal_sources = files( 'internal/catch_polyfills.cpp', 'internal/catch_random_number_generator.cpp', 'internal/catch_random_seed_generation.cpp', + 'internal/catch_registry_hub.cpp', 'internal/catch_reporter_registry.cpp', 'internal/catch_reporter_spec_parser.cpp', 'internal/catch_result_type.cpp', @@ -250,7 +249,6 @@ internal_sources = files( 'catch_config.cpp', 'catch_get_random_seed.cpp', 'catch_message.cpp', - 'catch_registry_hub.cpp', 'catch_session.cpp', 'catch_tag_alias_autoregistrar.cpp', 'catch_test_case_info.cpp', diff --git a/src/catch2/reporters/catch_reporter_registrars.cpp b/src/catch2/reporters/catch_reporter_registrars.cpp index 17f59517..9bf89805 100644 --- a/src/catch2/reporters/catch_reporter_registrars.cpp +++ b/src/catch2/reporters/catch_reporter_registrars.cpp @@ -9,6 +9,7 @@ #include #include +#include namespace Catch { namespace Detail { diff --git a/src/catch2/reporters/catch_reporter_registrars.hpp b/src/catch2/reporters/catch_reporter_registrars.hpp index cab395f4..daaeef03 100644 --- a/src/catch2/reporters/catch_reporter_registrars.hpp +++ b/src/catch2/reporters/catch_reporter_registrars.hpp @@ -8,7 +8,6 @@ #ifndef CATCH_REPORTER_REGISTRARS_HPP_INCLUDED #define CATCH_REPORTER_REGISTRARS_HPP_INCLUDED -#include #include #include #include