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

Split out CaseSensitive enum out of catch_common.hpp

Only very few places actually use it, so there is no need to have
it be central to everywhere.
Commit
6a46b344c02b2548b11e4b66f95618bd5c90d110
Author
Martin Hořeňovský ·
Parents
e7eb74981513

Files · Download .tar.gz

Changes

 src/CMakeLists.txt                             |  1 +
 src/catch2/catch_all.hpp                       |  1 +
 src/catch2/internal/catch_case_sensitive.hpp   | 12 ++++++++++++
 src/catch2/internal/catch_common.hpp           |  5 -----
 src/catch2/internal/catch_wildcard_pattern.hpp |  3 ++-
 src/catch2/matchers/catch_matchers_string.hpp  |  1 +
 6 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 932ff876..24b3b055 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -44,6 +44,7 @@ set(INTERNAL_HEADERS
     ${SOURCES_DIR}/catch_assertion_info.hpp
     ${SOURCES_DIR}/catch_assertion_result.hpp
     ${SOURCES_DIR}/internal/catch_test_macro_impl.hpp
+    ${SOURCES_DIR}/internal/catch_case_sensitive.hpp
     ${SOURCES_DIR}/internal/catch_clara.hpp
     ${SOURCES_DIR}/internal/catch_commandline.hpp
     ${SOURCES_DIR}/internal/catch_common.hpp
diff --git a/src/catch2/catch_all.hpp b/src/catch2/catch_all.hpp
index a5bdd50b..5902b1f3 100644
--- a/src/catch2/catch_all.hpp
+++ b/src/catch2/catch_all.hpp
@@ -39,6 +39,7 @@
 #include <catch2/generators/catch_generators_all.hpp>
 #include <catch2/interfaces/catch_interfaces_all.hpp>
 #include <catch2/internal/catch_assertion_handler.hpp>
+#include <catch2/internal/catch_case_sensitive.hpp>
 #include <catch2/internal/catch_clara.hpp>
 #include <catch2/internal/catch_commandline.hpp>
 #include <catch2/internal/catch_common.hpp>
diff --git a/src/catch2/internal/catch_case_sensitive.hpp b/src/catch2/internal/catch_case_sensitive.hpp
new file mode 100644
index 00000000..ad765546
--- /dev/null
+++ b/src/catch2/internal/catch_case_sensitive.hpp
@@ -0,0 +1,12 @@
+#ifndef CATCH_CASE_SENSITIVE_HPP_INCLUDED
+#define CATCH_CASE_SENSITIVE_HPP_INCLUDED
+
+namespace Catch {
+
+    struct CaseSensitive {
+        enum Choice { Yes, No };
+    };
+
+} // namespace Catch
+
+#endif // CATCH_CASE_SENSITIVE_HPP_INCLUDED
diff --git a/src/catch2/internal/catch_common.hpp b/src/catch2/internal/catch_common.hpp
index 1229b9e2..cdbb7372 100644
--- a/src/catch2/internal/catch_common.hpp
+++ b/src/catch2/internal/catch_common.hpp
@@ -27,11 +27,6 @@ std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy);
 
 namespace Catch {
 
-    struct CaseSensitive { enum Choice {
-        Yes,
-        No
-    }; };
-
     struct SourceLineInfo {
 
         SourceLineInfo() = delete;
diff --git a/src/catch2/internal/catch_wildcard_pattern.hpp b/src/catch2/internal/catch_wildcard_pattern.hpp
index 90e05d4b..1dea8670 100644
--- a/src/catch2/internal/catch_wildcard_pattern.hpp
+++ b/src/catch2/internal/catch_wildcard_pattern.hpp
@@ -8,8 +8,9 @@
 #ifndef TWOBLUECUBES_CATCH_WILDCARD_PATTERN_HPP_INCLUDED
 #define TWOBLUECUBES_CATCH_WILDCARD_PATTERN_HPP_INCLUDED
 
-#include <catch2/internal/catch_common.hpp>
+#include <catch2/internal/catch_case_sensitive.hpp>
 
+#include <string>
 
 namespace Catch
 {
diff --git a/src/catch2/matchers/catch_matchers_string.hpp b/src/catch2/matchers/catch_matchers_string.hpp
index 83f8d076..5ad147ac 100644
--- a/src/catch2/matchers/catch_matchers_string.hpp
+++ b/src/catch2/matchers/catch_matchers_string.hpp
@@ -9,6 +9,7 @@
 #define TWOBLUECUBES_CATCH_MATCHERS_STRING_H_INCLUDED
 
 #include <catch2/matchers/catch_matchers.hpp>
+#include <catch2/internal/catch_case_sensitive.hpp>
 
 #include <string>