From 8dc9f1a1247a15836044501c9a791ea67a709f05 Mon Sep 17 00:00:00 2001 From: Omar Boukli-Hacene Date: Sun, 13 Apr 2025 16:44:53 +0200 Subject: [PATCH] Move header from internal Move `catch_test_run_info.hpp` from directory `src/catch2/internal/` to be directly under `src/catch2/`. Header `catch_test_run_info.hpp` defines `Catch::TestRunInfo` which is part of the public API, since it is required when overriding `Catch::EventListenerBase`. Fixes issue caught by Clang Tidy misc-include-cleaner check. --- src/CMakeLists.txt | 2 +- src/catch2/catch_all.hpp | 2 +- src/catch2/{internal => }/catch_test_run_info.hpp | 0 src/catch2/interfaces/catch_interfaces_reporter.hpp | 2 +- src/catch2/internal/catch_run_context.hpp | 2 +- src/catch2/meson.build | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename src/catch2/{internal => }/catch_test_run_info.hpp (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f7f9ea84..0ad4ef5d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -58,6 +58,7 @@ set(IMPL_HEADERS ${SOURCES_DIR}/catch_template_test_macros.hpp ${SOURCES_DIR}/catch_test_case_info.hpp ${SOURCES_DIR}/catch_test_macros.hpp + ${SOURCES_DIR}/catch_test_run_info.hpp ${SOURCES_DIR}/catch_test_spec.hpp ${SOURCES_DIR}/catch_timer.hpp ${SOURCES_DIR}/catch_tostring.hpp @@ -135,7 +136,6 @@ set(IMPL_HEADERS ${SOURCES_DIR}/internal/catch_test_failure_exception.hpp ${SOURCES_DIR}/internal/catch_test_macro_impl.hpp ${SOURCES_DIR}/internal/catch_test_registry.hpp - ${SOURCES_DIR}/internal/catch_test_run_info.hpp ${SOURCES_DIR}/internal/catch_test_spec_parser.hpp ${SOURCES_DIR}/internal/catch_textflow.hpp ${SOURCES_DIR}/internal/catch_to_string.hpp diff --git a/src/catch2/catch_all.hpp b/src/catch2/catch_all.hpp index 57159955..88dd57ea 100644 --- a/src/catch2/catch_all.hpp +++ b/src/catch2/catch_all.hpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -117,7 +118,6 @@ #include #include #include -#include #include #include #include diff --git a/src/catch2/internal/catch_test_run_info.hpp b/src/catch2/catch_test_run_info.hpp similarity index 100% rename from src/catch2/internal/catch_test_run_info.hpp rename to src/catch2/catch_test_run_info.hpp diff --git a/src/catch2/interfaces/catch_interfaces_reporter.hpp b/src/catch2/interfaces/catch_interfaces_reporter.hpp index e8f5d519..86264118 100644 --- a/src/catch2/interfaces/catch_interfaces_reporter.hpp +++ b/src/catch2/interfaces/catch_interfaces_reporter.hpp @@ -9,11 +9,11 @@ #define CATCH_INTERFACES_REPORTER_HPP_INCLUDED #include +#include #include #include #include #include -#include #include #include diff --git a/src/catch2/internal/catch_run_context.hpp b/src/catch2/internal/catch_run_context.hpp index c66fec0c..66735f41 100644 --- a/src/catch2/internal/catch_run_context.hpp +++ b/src/catch2/internal/catch_run_context.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/catch2/meson.build b/src/catch2/meson.build index 2eb53991..191aea3f 100644 --- a/src/catch2/meson.build +++ b/src/catch2/meson.build @@ -144,7 +144,6 @@ internal_headers = [ 'internal/catch_test_failure_exception.hpp', 'internal/catch_test_macro_impl.hpp', 'internal/catch_test_registry.hpp', - 'internal/catch_test_run_info.hpp', 'internal/catch_test_spec_parser.hpp', 'internal/catch_textflow.hpp', 'internal/catch_to_string.hpp', @@ -185,6 +184,7 @@ internal_headers = [ 'catch_template_test_macros.hpp', 'catch_test_case_info.hpp', 'catch_test_macros.hpp', + 'catch_test_run_info.hpp', 'catch_test_spec.hpp', 'catch_timer.hpp', 'catch_tostring.hpp',