catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Cut out catch_interfaces_capture.hpp include from the main include
- Commit
5b665be643ba28d9870c4cff662e634726c9037c- Author
- Martin Hořeňovský ·
- Parents
2598116aa640
Changes
src/catch2/catch_message.cpp | 6 +++++- src/catch2/catch_message.hpp | 4 ++-- src/catch2/interfaces/catch_interfaces_reporter.hpp | 2 +- src/catch2/internal/catch_message_info.hpp | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/catch2/catch_message.cpp b/src/catch2/catch_message.cpp index d4723e94..384f180e 100644 --- a/src/catch2/catch_message.cpp +++ b/src/catch2/catch_message.cpp @@ -37,7 +37,11 @@ namespace Catch { } - Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) { + Capturer::Capturer( StringRef macroName, + SourceLineInfo const& lineInfo, + ResultWas::OfType resultType, + StringRef names ): + m_resultCapture( getResultCapture() ) { auto trimmed = [&] (size_t start, size_t end) { while (names[start] == ',' || isspace(static_cast<unsigned char>(names[start]))) { ++start; diff --git a/src/catch2/catch_message.hpp b/src/catch2/catch_message.hpp index e6bc1b5d..b348ac87 100644 --- a/src/catch2/catch_message.hpp +++ b/src/catch2/catch_message.hpp @@ -12,7 +12,6 @@ #include <catch2/internal/catch_reusable_string_stream.hpp> #include <catch2/internal/catch_stream_end_stop.hpp> #include <catch2/internal/catch_message_info.hpp> -#include <catch2/interfaces/catch_interfaces_capture.hpp> #include <catch2/catch_tostring.hpp> #include <string> @@ -21,6 +20,7 @@ namespace Catch { struct SourceLineInfo; + class IResultCapture; struct MessageStream { @@ -61,7 +61,7 @@ namespace Catch { class Capturer { std::vector<MessageInfo> m_messages; - IResultCapture& m_resultCapture = getResultCapture(); + IResultCapture& m_resultCapture; size_t m_captured = 0; public: Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ); diff --git a/src/catch2/interfaces/catch_interfaces_reporter.hpp b/src/catch2/interfaces/catch_interfaces_reporter.hpp index cf414f10..8ebc7a73 100644 --- a/src/catch2/interfaces/catch_interfaces_reporter.hpp +++ b/src/catch2/interfaces/catch_interfaces_reporter.hpp @@ -17,7 +17,7 @@ #include <catch2/internal/catch_move_and_forward.hpp> #include <catch2/benchmark/catch_estimate.hpp> #include <catch2/benchmark/catch_outlier_classification.hpp> - +#include <catch2/interfaces/catch_interfaces_capture.hpp> #include <map> #include <string> diff --git a/src/catch2/internal/catch_message_info.hpp b/src/catch2/internal/catch_message_info.hpp index d2658429..1ef43fda 100644 --- a/src/catch2/internal/catch_message_info.hpp +++ b/src/catch2/internal/catch_message_info.hpp @@ -10,7 +10,7 @@ #include <catch2/internal/catch_result_type.hpp> #include <catch2/internal/catch_source_line_info.hpp> -#include <catch2/interfaces/catch_interfaces_capture.hpp> +#include <catch2/internal/catch_stringref.hpp> #include <string>