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

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-08-24 11:27:13 +0200
committerMartin Hořeňovský2020-08-24 11:27:21 +0200
commitf9fdc96cbfbd79397af202d9afdd3f8eb906b73b (patch)
treec396699ad3ecb2aff9a5099a9d2960564f6e5866 /src
parent360b82620ef10c1b70d809fa8593e3647220e021 (diff)
downloadcatch3-f9fdc96cbfbd79397af202d9afdd3f8eb906b73b.tar.gz
Push LazyStat down into catch_reporter_streaming_base.hpp
Diffstat (limited to 'src')
-rw-r--r--src/catch2/interfaces/catch_interfaces_reporter.hpp15
-rw-r--r--src/catch2/internal/catch_run_context.hpp1
-rw-r--r--src/catch2/reporters/catch_reporter_streaming_base.hpp19
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 ):