Progmasoft Git

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

Push LazyStat down into catch_reporter_streaming_base.hpp

Commit
f9fdc96cbfbd79397af202d9afdd3f8eb906b73b
Author
Martin Hořeňovský ·
Parents
360b82620ef1

Files · Download .tar.gz

Changes

 src/catch2/interfaces/catch_interfaces_reporter.hpp   | 15 ---------------
 src/catch2/internal/catch_run_context.hpp             |  1 +
 .../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 ):