Some IWYU include cleanups

This commit is contained in:
Martin Hořeňovský 2022-04-14 17:16:01 +02:00
parent a243cbae52
commit c742ea9ad9
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
25 changed files with 25 additions and 24 deletions

View File

@ -12,6 +12,7 @@
#include <catch2/internal/catch_compiler_capabilities.hpp> #include <catch2/internal/catch_compiler_capabilities.hpp>
#include <cassert> #include <cassert>
#include <cstddef>
#include <iterator> #include <iterator>
#include <random> #include <random>

View File

@ -7,6 +7,7 @@
// SPDX-License-Identifier: BSL-1.0 // SPDX-License-Identifier: BSL-1.0
#include <catch2/catch_approx.hpp> #include <catch2/catch_approx.hpp>
#include <catch2/internal/catch_enforce.hpp> #include <catch2/internal/catch_enforce.hpp>
#include <catch2/internal/catch_stream.hpp>
#include <cmath> #include <cmath>
#include <limits> #include <limits>

View File

@ -14,8 +14,6 @@
#include <catch2/internal/catch_test_spec_parser.hpp> #include <catch2/internal/catch_test_spec_parser.hpp>
#include <catch2/interfaces/catch_interfaces_tag_alias_registry.hpp> #include <catch2/interfaces/catch_interfaces_tag_alias_registry.hpp>
#include <ostream>
namespace Catch { namespace Catch {
bool operator==( ProcessedReporterSpec const& lhs, bool operator==( ProcessedReporterSpec const& lhs,

View File

@ -9,16 +9,17 @@
#define CATCH_CONFIG_HPP_INCLUDED #define CATCH_CONFIG_HPP_INCLUDED
#include <catch2/catch_test_spec.hpp> #include <catch2/catch_test_spec.hpp>
#include <catch2/catch_user_config.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp> #include <catch2/interfaces/catch_interfaces_config.hpp>
#include <catch2/internal/catch_unique_ptr.hpp> #include <catch2/internal/catch_unique_ptr.hpp>
#include <catch2/internal/catch_optional.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_random_seed_generation.hpp>
#include <catch2/internal/catch_reporter_spec_parser.hpp> #include <catch2/internal/catch_reporter_spec_parser.hpp>
#include <iosfwd> #include <chrono>
#include <vector> #include <map>
#include <string> #include <string>
#include <vector>
namespace Catch { namespace Catch {

View File

@ -7,8 +7,6 @@
// SPDX-License-Identifier: BSL-1.0 // SPDX-License-Identifier: BSL-1.0
#include <catch2/catch_test_case_info.hpp> #include <catch2/catch_test_case_info.hpp>
#include <catch2/internal/catch_enforce.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_string_manip.hpp>
#include <catch2/internal/catch_case_insensitive_comparisons.hpp> #include <catch2/internal/catch_case_insensitive_comparisons.hpp>

View File

@ -8,7 +8,6 @@
#ifndef CATCH_TOTALS_HPP_INCLUDED #ifndef CATCH_TOTALS_HPP_INCLUDED
#define CATCH_TOTALS_HPP_INCLUDED #define CATCH_TOTALS_HPP_INCLUDED
#include <cstddef>
#include <cstdint> #include <cstdint>
namespace Catch { namespace Catch {

View File

@ -13,11 +13,11 @@
#include <catch2/interfaces/catch_interfaces_capture.hpp> #include <catch2/interfaces/catch_interfaces_capture.hpp>
#include <catch2/internal/catch_lazy_expr.hpp> #include <catch2/internal/catch_lazy_expr.hpp>
#include <string>
namespace Catch { namespace Catch {
struct AssertionResultData;
class IResultCapture; class IResultCapture;
class RunContext;
struct AssertionReaction { struct AssertionReaction {
bool shouldDebugBreak = false; bool shouldDebugBreak = false;

View File

@ -10,8 +10,6 @@
#include <catch2/internal/catch_stringref.hpp> #include <catch2/internal/catch_stringref.hpp>
#include <string>
namespace Catch { namespace Catch {
namespace Detail { namespace Detail {
//! Provides case-insensitive `op<` semantics when called //! Provides case-insensitive `op<` semantics when called

View File

@ -5,13 +5,16 @@
// https://www.boost.org/LICENSE_1_0.txt) // https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0 // SPDX-License-Identifier: BSL-1.0
#include <algorithm>
#include <catch2/internal/catch_clara.hpp> #include <catch2/internal/catch_clara.hpp>
#include <catch2/internal/catch_console_width.hpp> #include <catch2/internal/catch_console_width.hpp>
#include <catch2/internal/catch_platform.hpp> #include <catch2/internal/catch_platform.hpp>
#include <catch2/internal/catch_string_manip.hpp> #include <catch2/internal/catch_string_manip.hpp>
#include <catch2/internal/catch_textflow.hpp> #include <catch2/internal/catch_textflow.hpp>
#include <algorithm>
#include <ostream>
namespace { namespace {
bool isOptPrefix( char c ) { bool isOptPrefix( char c ) {
return c == '-' return c == '-'

View File

@ -34,7 +34,6 @@
#include <catch2/internal/catch_void_type.hpp> #include <catch2/internal/catch_void_type.hpp>
#include <cassert> #include <cassert>
#include <cctype>
#include <memory> #include <memory>
#include <ostream> #include <ostream>
#include <sstream> #include <sstream>

View File

@ -12,11 +12,9 @@
#include <catch2/internal/catch_string_manip.hpp> #include <catch2/internal/catch_string_manip.hpp>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp> #include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
#include <catch2/interfaces/catch_interfaces_reporter_registry.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_console_colour.hpp>
#include <catch2/internal/catch_reporter_spec_parser.hpp> #include <catch2/internal/catch_reporter_spec_parser.hpp>
#include <algorithm>
#include <fstream> #include <fstream>
#include <string> #include <string>

View File

@ -16,13 +16,16 @@
#include <catch2/internal/catch_errno_guard.hpp> #include <catch2/internal/catch_errno_guard.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp> #include <catch2/interfaces/catch_interfaces_config.hpp>
#include <catch2/internal/catch_stream.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_context.hpp>
#include <catch2/internal/catch_platform.hpp> #include <catch2/internal/catch_platform.hpp>
#include <catch2/internal/catch_debugger.hpp> #include <catch2/internal/catch_debugger.hpp>
#include <catch2/internal/catch_windows_h_proxy.hpp> #include <catch2/internal/catch_windows_h_proxy.hpp>
#include <catch2/internal/catch_compiler_capabilities.hpp> #include <catch2/internal/catch_compiler_capabilities.hpp>
#include <cassert>
#include <ostream> #include <ostream>
#include <utility>
namespace Catch { namespace Catch {

View File

@ -16,7 +16,6 @@
namespace Catch { namespace Catch {
enum class ColourMode : std::uint8_t; enum class ColourMode : std::uint8_t;
class IConfig;
class IStream; class IStream;
struct Colour { struct Colour {

View File

@ -11,6 +11,8 @@
#include <catch2/internal/catch_platform.hpp> #include <catch2/internal/catch_platform.hpp>
#include <catch2/internal/catch_windows_h_proxy.hpp> #include <catch2/internal/catch_windows_h_proxy.hpp>
#include <iosfwd>
#if defined(CATCH_CONFIG_ANDROID_LOGWRITE) #if defined(CATCH_CONFIG_ANDROID_LOGWRITE)
#include <android/log.h> #include <android/log.h>

View File

@ -12,7 +12,6 @@
#include <catch2/internal/catch_move_and_forward.hpp> #include <catch2/internal/catch_move_and_forward.hpp>
#include <algorithm> #include <algorithm>
#include <ostream>
namespace Catch { namespace Catch {

View File

@ -15,6 +15,7 @@
#include <string> #include <string>
namespace Catch { namespace Catch {
struct SourceLineInfo;
class TagAliasRegistry : public ITagAliasRegistry { class TagAliasRegistry : public ITagAliasRegistry {
public: public:

View File

@ -11,6 +11,7 @@
#include <catch2/internal/catch_stream.hpp> #include <catch2/internal/catch_stream.hpp>
#include <catch2/internal/catch_stringref.hpp> #include <catch2/internal/catch_stringref.hpp>
#include <iosfwd>
#include <vector> #include <vector>
namespace Catch { namespace Catch {

View File

@ -10,6 +10,8 @@
#include <catch2/reporters/catch_reporter_streaming_base.hpp> #include <catch2/reporters/catch_reporter_streaming_base.hpp>
#include <string>
namespace Catch { namespace Catch {
class AutomakeReporter final : public StreamingReporterBase { class AutomakeReporter final : public StreamingReporterBase {

View File

@ -7,6 +7,8 @@
// SPDX-License-Identifier: BSL-1.0 // SPDX-License-Identifier: BSL-1.0
#include <catch2/reporters/catch_reporter_cumulative_base.hpp> #include <catch2/reporters/catch_reporter_cumulative_base.hpp>
#include <catch2/internal/catch_move_and_forward.hpp>
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>

View File

@ -12,7 +12,6 @@
#include <catch2/internal/catch_unique_ptr.hpp> #include <catch2/internal/catch_unique_ptr.hpp>
#include <catch2/internal/catch_optional.hpp> #include <catch2/internal/catch_optional.hpp>
#include <iosfwd>
#include <string> #include <string>
#include <vector> #include <vector>

View File

@ -11,8 +11,6 @@
#include <catch2/internal/catch_move_and_forward.hpp> #include <catch2/internal/catch_move_and_forward.hpp>
#include <catch2/internal/catch_stream.hpp> #include <catch2/internal/catch_stream.hpp>
#include <cassert>
namespace Catch { namespace Catch {
void MultiReporter::updatePreferences(IEventListener const& reporterish) { void MultiReporter::updatePreferences(IEventListener const& reporterish) {
m_preferences.shouldRedirectStdOut |= m_preferences.shouldRedirectStdOut |=

View File

@ -10,8 +10,6 @@
#include <catch2/reporters/catch_reporter_common_base.hpp> #include <catch2/reporters/catch_reporter_common_base.hpp>
#include <iosfwd>
#include <string>
#include <vector> #include <vector>
namespace Catch { namespace Catch {

View File

@ -11,6 +11,7 @@
#include <catch2/catch_test_case_info.hpp> #include <catch2/catch_test_case_info.hpp>
#include <algorithm> #include <algorithm>
#include <iterator>
#include <ostream> #include <ostream>
namespace Catch { namespace Catch {

View File

@ -14,6 +14,7 @@
#include <catch2/catch_test_case_info.hpp> #include <catch2/catch_test_case_info.hpp>
#include <cassert> #include <cassert>
#include <ostream>
namespace Catch { namespace Catch {

View File

@ -12,7 +12,6 @@
*/ */
#include <catch2/catch_test_macros.hpp> #include <catch2/catch_test_macros.hpp>
#include <iostream>
TEST_CASE("Deferred static checks") { TEST_CASE("Deferred static checks") {
STATIC_CHECK(1 == 2); STATIC_CHECK(1 == 2);