Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-04-14 17:16:01 +0200
committerMartin Hořeňovský2022-04-14 17:16:01 +0200
commitc742ea9ad97a34c8f652dd7f67012d5b3f818c2d (patch)
tree8fd7192ed99c936b5bd210d8d8121663df778a2d /src/catch2
parenta243cbae52d5599ccce07b36cfe8b2e3308d4108 (diff)
downloadcatch3-c742ea9ad97a34c8f652dd7f67012d5b3f818c2d.tar.gz
Some IWYU include cleanups
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/benchmark/detail/catch_stats.cpp1
-rw-r--r--src/catch2/catch_approx.cpp1
-rw-r--r--src/catch2/catch_config.cpp2
-rw-r--r--src/catch2/catch_config.hpp7
-rw-r--r--src/catch2/catch_test_case_info.cpp2
-rw-r--r--src/catch2/catch_totals.hpp1
-rw-r--r--src/catch2/internal/catch_assertion_handler.hpp4
-rw-r--r--src/catch2/internal/catch_case_insensitive_comparisons.hpp2
-rw-r--r--src/catch2/internal/catch_clara.cpp5
-rw-r--r--src/catch2/internal/catch_clara.hpp1
-rw-r--r--src/catch2/internal/catch_commandline.cpp2
-rw-r--r--src/catch2/internal/catch_console_colour.cpp3
-rw-r--r--src/catch2/internal/catch_console_colour.hpp1
-rw-r--r--src/catch2/internal/catch_debug_console.cpp2
-rw-r--r--src/catch2/internal/catch_reporter_spec_parser.cpp1
-rw-r--r--src/catch2/internal/catch_tag_alias_registry.hpp1
-rw-r--r--src/catch2/internal/catch_xmlwriter.hpp1
-rw-r--r--src/catch2/reporters/catch_reporter_automake.hpp2
-rw-r--r--src/catch2/reporters/catch_reporter_cumulative_base.cpp2
-rw-r--r--src/catch2/reporters/catch_reporter_cumulative_base.hpp1
-rw-r--r--src/catch2/reporters/catch_reporter_multi.cpp2
-rw-r--r--src/catch2/reporters/catch_reporter_streaming_base.hpp2
-rw-r--r--src/catch2/reporters/catch_reporter_tap.cpp1
-rw-r--r--src/catch2/reporters/catch_reporter_teamcity.cpp1
24 files changed, 25 insertions, 23 deletions
diff --git a/src/catch2/benchmark/detail/catch_stats.cpp b/src/catch2/benchmark/detail/catch_stats.cpp
index 0f94d5b7..10511d4c 100644
--- a/src/catch2/benchmark/detail/catch_stats.cpp
+++ b/src/catch2/benchmark/detail/catch_stats.cpp
@@ -12,6 +12,7 @@
#include <catch2/internal/catch_compiler_capabilities.hpp>
#include <cassert>
+#include <cstddef>
#include <iterator>
#include <random>
diff --git a/src/catch2/catch_approx.cpp b/src/catch2/catch_approx.cpp
index 50cb75c3..21652111 100644
--- a/src/catch2/catch_approx.cpp
+++ b/src/catch2/catch_approx.cpp
@@ -7,6 +7,7 @@
// SPDX-License-Identifier: BSL-1.0
#include <catch2/catch_approx.hpp>
#include <catch2/internal/catch_enforce.hpp>
+#include <catch2/internal/catch_stream.hpp>
#include <cmath>
#include <limits>
diff --git a/src/catch2/catch_config.cpp b/src/catch2/catch_config.cpp
index 79ec33f8..7363ee70 100644
--- a/src/catch2/catch_config.cpp
+++ b/src/catch2/catch_config.cpp
@@ -14,8 +14,6 @@
#include <catch2/internal/catch_test_spec_parser.hpp>
#include <catch2/interfaces/catch_interfaces_tag_alias_registry.hpp>
-#include <ostream>
-
namespace Catch {
bool operator==( ProcessedReporterSpec const& lhs,
diff --git a/src/catch2/catch_config.hpp b/src/catch2/catch_config.hpp
index 2b57bbb5..8823accd 100644
--- a/src/catch2/catch_config.hpp
+++ b/src/catch2/catch_config.hpp
@@ -9,16 +9,17 @@
#define CATCH_CONFIG_HPP_INCLUDED
#include <catch2/catch_test_spec.hpp>
-#include <catch2/catch_user_config.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp>
#include <catch2/internal/catch_unique_ptr.hpp>
#include <catch2/internal/catch_optional.hpp>
+#include <catch2/internal/catch_stringref.hpp>
#include <catch2/internal/catch_random_seed_generation.hpp>
#include <catch2/internal/catch_reporter_spec_parser.hpp>
-#include <iosfwd>
-#include <vector>
+#include <chrono>
+#include <map>
#include <string>
+#include <vector>
namespace Catch {
diff --git a/src/catch2/catch_test_case_info.cpp b/src/catch2/catch_test_case_info.cpp
index 83cfcc8e..6d89dc72 100644
--- a/src/catch2/catch_test_case_info.cpp
+++ b/src/catch2/catch_test_case_info.cpp
@@ -7,8 +7,6 @@
// SPDX-License-Identifier: BSL-1.0
#include <catch2/catch_test_case_info.hpp>
#include <catch2/internal/catch_enforce.hpp>
-#include <catch2/catch_test_spec.hpp>
-#include <catch2/interfaces/catch_interfaces_testcase.hpp>
#include <catch2/internal/catch_string_manip.hpp>
#include <catch2/internal/catch_case_insensitive_comparisons.hpp>
diff --git a/src/catch2/catch_totals.hpp b/src/catch2/catch_totals.hpp
index 7ab6a1b6..6bc444fc 100644
--- a/src/catch2/catch_totals.hpp
+++ b/src/catch2/catch_totals.hpp
@@ -8,7 +8,6 @@
#ifndef CATCH_TOTALS_HPP_INCLUDED
#define CATCH_TOTALS_HPP_INCLUDED
-#include <cstddef>
#include <cstdint>
namespace Catch {
diff --git a/src/catch2/internal/catch_assertion_handler.hpp b/src/catch2/internal/catch_assertion_handler.hpp
index 4d397766..5faa5e4b 100644
--- a/src/catch2/internal/catch_assertion_handler.hpp
+++ b/src/catch2/internal/catch_assertion_handler.hpp
@@ -13,11 +13,11 @@
#include <catch2/interfaces/catch_interfaces_capture.hpp>
#include <catch2/internal/catch_lazy_expr.hpp>
+#include <string>
+
namespace Catch {
- struct AssertionResultData;
class IResultCapture;
- class RunContext;
struct AssertionReaction {
bool shouldDebugBreak = false;
diff --git a/src/catch2/internal/catch_case_insensitive_comparisons.hpp b/src/catch2/internal/catch_case_insensitive_comparisons.hpp
index 5742e6b7..c182e13e 100644
--- a/src/catch2/internal/catch_case_insensitive_comparisons.hpp
+++ b/src/catch2/internal/catch_case_insensitive_comparisons.hpp
@@ -10,8 +10,6 @@
#include <catch2/internal/catch_stringref.hpp>
-#include <string>
-
namespace Catch {
namespace Detail {
//! Provides case-insensitive `op<` semantics when called
diff --git a/src/catch2/internal/catch_clara.cpp b/src/catch2/internal/catch_clara.cpp
index df844838..a4701a81 100644
--- a/src/catch2/internal/catch_clara.cpp
+++ b/src/catch2/internal/catch_clara.cpp
@@ -5,13 +5,16 @@
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
-#include <algorithm>
+
#include <catch2/internal/catch_clara.hpp>
#include <catch2/internal/catch_console_width.hpp>
#include <catch2/internal/catch_platform.hpp>
#include <catch2/internal/catch_string_manip.hpp>
#include <catch2/internal/catch_textflow.hpp>
+#include <algorithm>
+#include <ostream>
+
namespace {
bool isOptPrefix( char c ) {
return c == '-'
diff --git a/src/catch2/internal/catch_clara.hpp b/src/catch2/internal/catch_clara.hpp
index 00761c0a..0d3fb233 100644
--- a/src/catch2/internal/catch_clara.hpp
+++ b/src/catch2/internal/catch_clara.hpp
@@ -34,7 +34,6 @@
#include <catch2/internal/catch_void_type.hpp>
#include <cassert>
-#include <cctype>
#include <memory>
#include <ostream>
#include <sstream>
diff --git a/src/catch2/internal/catch_commandline.cpp b/src/catch2/internal/catch_commandline.cpp
index d16e7e37..59b06de9 100644
--- a/src/catch2/internal/catch_commandline.cpp
+++ b/src/catch2/internal/catch_commandline.cpp
@@ -12,11 +12,9 @@
#include <catch2/internal/catch_string_manip.hpp>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp>
-#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/internal/catch_console_colour.hpp>
#include <catch2/internal/catch_reporter_spec_parser.hpp>
-#include <algorithm>
#include <fstream>
#include <string>
diff --git a/src/catch2/internal/catch_console_colour.cpp b/src/catch2/internal/catch_console_colour.cpp
index e9fa55f7..7f202490 100644
--- a/src/catch2/internal/catch_console_colour.cpp
+++ b/src/catch2/internal/catch_console_colour.cpp
@@ -16,13 +16,16 @@
#include <catch2/internal/catch_errno_guard.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp>
#include <catch2/internal/catch_stream.hpp>
+#include <catch2/internal/catch_move_and_forward.hpp>
#include <catch2/internal/catch_context.hpp>
#include <catch2/internal/catch_platform.hpp>
#include <catch2/internal/catch_debugger.hpp>
#include <catch2/internal/catch_windows_h_proxy.hpp>
#include <catch2/internal/catch_compiler_capabilities.hpp>
+#include <cassert>
#include <ostream>
+#include <utility>
namespace Catch {
diff --git a/src/catch2/internal/catch_console_colour.hpp b/src/catch2/internal/catch_console_colour.hpp
index 661078af..aa3d83a2 100644
--- a/src/catch2/internal/catch_console_colour.hpp
+++ b/src/catch2/internal/catch_console_colour.hpp
@@ -16,7 +16,6 @@
namespace Catch {
enum class ColourMode : std::uint8_t;
- class IConfig;
class IStream;
struct Colour {
diff --git a/src/catch2/internal/catch_debug_console.cpp b/src/catch2/internal/catch_debug_console.cpp
index 5942524e..d13cc0bb 100644
--- a/src/catch2/internal/catch_debug_console.cpp
+++ b/src/catch2/internal/catch_debug_console.cpp
@@ -11,6 +11,8 @@
#include <catch2/internal/catch_platform.hpp>
#include <catch2/internal/catch_windows_h_proxy.hpp>
+#include <iosfwd>
+
#if defined(CATCH_CONFIG_ANDROID_LOGWRITE)
#include <android/log.h>
diff --git a/src/catch2/internal/catch_reporter_spec_parser.cpp b/src/catch2/internal/catch_reporter_spec_parser.cpp
index 378a6f5a..28b2088a 100644
--- a/src/catch2/internal/catch_reporter_spec_parser.cpp
+++ b/src/catch2/internal/catch_reporter_spec_parser.cpp
@@ -12,7 +12,6 @@
#include <catch2/internal/catch_move_and_forward.hpp>
#include <algorithm>
-#include <ostream>
namespace Catch {
diff --git a/src/catch2/internal/catch_tag_alias_registry.hpp b/src/catch2/internal/catch_tag_alias_registry.hpp
index 9dd86c13..3dbe0528 100644
--- a/src/catch2/internal/catch_tag_alias_registry.hpp
+++ b/src/catch2/internal/catch_tag_alias_registry.hpp
@@ -15,6 +15,7 @@
#include <string>
namespace Catch {
+ struct SourceLineInfo;
class TagAliasRegistry : public ITagAliasRegistry {
public:
diff --git a/src/catch2/internal/catch_xmlwriter.hpp b/src/catch2/internal/catch_xmlwriter.hpp
index 5be8277d..edeb64a2 100644
--- a/src/catch2/internal/catch_xmlwriter.hpp
+++ b/src/catch2/internal/catch_xmlwriter.hpp
@@ -11,6 +11,7 @@
#include <catch2/internal/catch_stream.hpp>
#include <catch2/internal/catch_stringref.hpp>
+#include <iosfwd>
#include <vector>
namespace Catch {
diff --git a/src/catch2/reporters/catch_reporter_automake.hpp b/src/catch2/reporters/catch_reporter_automake.hpp
index c544f337..cd85e6bf 100644
--- a/src/catch2/reporters/catch_reporter_automake.hpp
+++ b/src/catch2/reporters/catch_reporter_automake.hpp
@@ -10,6 +10,8 @@
#include <catch2/reporters/catch_reporter_streaming_base.hpp>
+#include <string>
+
namespace Catch {
class AutomakeReporter final : public StreamingReporterBase {
diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.cpp b/src/catch2/reporters/catch_reporter_cumulative_base.cpp
index b52ba7ef..957880d0 100644
--- a/src/catch2/reporters/catch_reporter_cumulative_base.cpp
+++ b/src/catch2/reporters/catch_reporter_cumulative_base.cpp
@@ -7,6 +7,8 @@
// SPDX-License-Identifier: BSL-1.0
#include <catch2/reporters/catch_reporter_cumulative_base.hpp>
+#include <catch2/internal/catch_move_and_forward.hpp>
+
#include <algorithm>
#include <cassert>
diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.hpp b/src/catch2/reporters/catch_reporter_cumulative_base.hpp
index d43ca479..742eaac9 100644
--- a/src/catch2/reporters/catch_reporter_cumulative_base.hpp
+++ b/src/catch2/reporters/catch_reporter_cumulative_base.hpp
@@ -12,7 +12,6 @@
#include <catch2/internal/catch_unique_ptr.hpp>
#include <catch2/internal/catch_optional.hpp>
-#include <iosfwd>
#include <string>
#include <vector>
diff --git a/src/catch2/reporters/catch_reporter_multi.cpp b/src/catch2/reporters/catch_reporter_multi.cpp
index 86d39d6a..e8cf7bdf 100644
--- a/src/catch2/reporters/catch_reporter_multi.cpp
+++ b/src/catch2/reporters/catch_reporter_multi.cpp
@@ -11,8 +11,6 @@
#include <catch2/internal/catch_move_and_forward.hpp>
#include <catch2/internal/catch_stream.hpp>
-#include <cassert>
-
namespace Catch {
void MultiReporter::updatePreferences(IEventListener const& reporterish) {
m_preferences.shouldRedirectStdOut |=
diff --git a/src/catch2/reporters/catch_reporter_streaming_base.hpp b/src/catch2/reporters/catch_reporter_streaming_base.hpp
index afa67d76..5088bd0b 100644
--- a/src/catch2/reporters/catch_reporter_streaming_base.hpp
+++ b/src/catch2/reporters/catch_reporter_streaming_base.hpp
@@ -10,8 +10,6 @@
#include <catch2/reporters/catch_reporter_common_base.hpp>
-#include <iosfwd>
-#include <string>
#include <vector>
namespace Catch {
diff --git a/src/catch2/reporters/catch_reporter_tap.cpp b/src/catch2/reporters/catch_reporter_tap.cpp
index 4cc91b7b..71249f87 100644
--- a/src/catch2/reporters/catch_reporter_tap.cpp
+++ b/src/catch2/reporters/catch_reporter_tap.cpp
@@ -11,6 +11,7 @@
#include <catch2/catch_test_case_info.hpp>
#include <algorithm>
+#include <iterator>
#include <ostream>
namespace Catch {
diff --git a/src/catch2/reporters/catch_reporter_teamcity.cpp b/src/catch2/reporters/catch_reporter_teamcity.cpp
index 8f16757a..142dffbb 100644
--- a/src/catch2/reporters/catch_reporter_teamcity.cpp
+++ b/src/catch2/reporters/catch_reporter_teamcity.cpp
@@ -14,6 +14,7 @@
#include <catch2/catch_test_case_info.hpp>
#include <cassert>
+#include <ostream>
namespace Catch {