diff options
| author | Martin Hořeňovský | 2020-08-24 11:27:13 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-08-24 11:27:21 +0200 |
| commit | f9fdc96cbfbd79397af202d9afdd3f8eb906b73b (patch) | |
| tree | c396699ad3ecb2aff9a5099a9d2960564f6e5866 /src/catch2 | |
| parent | 360b82620ef10c1b70d809fa8593e3647220e021 (diff) | |
| download | catch3-f9fdc96cbfbd79397af202d9afdd3f8eb906b73b.tar.gz | |
Push LazyStat down into catch_reporter_streaming_base.hpp
Diffstat (limited to 'src/catch2')
| -rw-r--r-- | src/catch2/interfaces/catch_interfaces_reporter.hpp | 15 | ||||
| -rw-r--r-- | src/catch2/internal/catch_run_context.hpp | 1 | ||||
| -rw-r--r-- | src/catch2/reporters/catch_reporter_streaming_base.hpp | 19 |
3 files changed, 19 insertions, 16 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_reporter.hpp b/src/catch2/interfaces/catch_interfaces_reporter.hpp index d7a5b087..714166d0 100644 --- a/src/catch2/interfaces/catch_interfaces_reporter.hpp +++ b/src/catch2/interfaces/catch_interfaces_reporter.hpp @@ -13,7 +13,6 @@ #include <catch2/catch_totals.hpp> #include <catch2/catch_assertion_result.hpp> #include <catch2/internal/catch_message_info.hpp> -#include <catch2/internal/catch_option.hpp> #include <catch2/internal/catch_stringref.hpp> #include <catch2/internal/catch_unique_ptr.hpp> @@ -46,20 +45,6 @@ namespace Catch { IConfig const* m_fullConfig; }; - template<typename T> - struct LazyStat : Option<T> { - LazyStat& operator=( T const& _value ) { - Option<T>::operator=( _value ); - used = false; - return *this; - } - void reset() { - Option<T>::reset(); - used = false; - } - bool used = false; - }; - struct TestRunInfo { TestRunInfo( std::string const& _name ); std::string name; diff --git a/src/catch2/internal/catch_run_context.hpp b/src/catch2/internal/catch_run_context.hpp index f7d3660b..99a945c1 100644 --- a/src/catch2/internal/catch_run_context.hpp +++ b/src/catch2/internal/catch_run_context.hpp @@ -17,6 +17,7 @@ #include <catch2/internal/catch_test_case_tracker.hpp> #include <catch2/catch_assertion_info.hpp> #include <catch2/catch_assertion_result.hpp> +#include <catch2/internal/catch_option.hpp> #include <string> diff --git a/src/catch2/reporters/catch_reporter_streaming_base.hpp b/src/catch2/reporters/catch_reporter_streaming_base.hpp index 30902ba1..c31290cc 100644 --- a/src/catch2/reporters/catch_reporter_streaming_base.hpp +++ b/src/catch2/reporters/catch_reporter_streaming_base.hpp @@ -3,12 +3,29 @@ #include <catch2/interfaces/catch_interfaces_reporter.hpp> +#include <catch2/internal/catch_option.hpp> + #include <iosfwd> #include <string> #include <vector> namespace Catch { - + + template<typename T> + struct LazyStat : Option<T> { + LazyStat& operator=(T const& _value) { + Option<T>::operator=(_value); + used = false; + return *this; + } + void reset() { + Option<T>::reset(); + used = false; + } + bool used = false; + }; + + struct StreamingReporterBase : IStreamingReporter { StreamingReporterBase( ReporterConfig const& _config ): |