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

Updated Clara with handling for / on Windows

Commit
af661065007abe7fe3cafbdc986f581eb58add2a
Author
Phil Nash ·
Parents
2462dff088c3

Files · Download .tar.gz

Changes

 include/external/clara.hpp | 5 +++++
 scripts/embedClara.py      | 3 ++-
 third_party/clara.hpp      | 4 ++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/external/clara.hpp b/include/external/clara.hpp
index 12a64522..5a13080c 100644
--- a/include/external/clara.hpp
+++ b/include/external/clara.hpp
@@ -343,6 +343,11 @@ namespace Catch { namespace clara { namespace TextFlow
 #include <set>
 #include <algorithm>
 
+#if !defined(CLARA_PLATFORM_WINDOWS) && ( defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) )
+#define CLARA_PLATFORM_WINDOWS
+
+#endif
+
 namespace Catch { namespace clara {
 namespace detail {
 
diff --git a/scripts/embedClara.py b/scripts/embedClara.py
index a35c221e..3a861549 100644
--- a/scripts/embedClara.py
+++ b/scripts/embedClara.py
@@ -14,7 +14,8 @@ idMap = {
    "CLARA_HPP_INCLUDED": "CATCH_CLARA_HPP_INCLUDED",
     "CLARA_CONFIG_CONSOLE_WIDTH": "CATCH_CLARA_CONFIG_CONSOLE_WIDTH",
     "CLARA_TEXTFLOW_HPP_INCLUDED": "CATCH_CLARA_TEXTFLOW_HPP_INCLUDED",
-    "CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH": "CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH"
+    "CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH": "CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH",
+    "CLARA_PLATFORM_WINDOWS": ""
     }
 
 # outer namespace to add
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index 95f28268..5d7f6f4e 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -341,6 +341,10 @@ namespace clara { namespace TextFlow
 #include <set>
 #include <algorithm>
 
+#if !defined(CLARA_PLATFORM_WINDOWS) && ( defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) )
+#define CLARA_PLATFORM_WINDOWS
+#endif
+
 namespace clara {
 namespace detail {