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

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-08-18 13:11:30 +0200
committerMartin Hořeňovský2020-08-18 21:02:25 +0200
commit6a46b344c02b2548b11e4b66f95618bd5c90d110 (patch)
tree94353f258025c6891e4f9f0fbc9953b78b39a3fc
parente7eb74981513364e6543aeec30446fda4c9a3de9 (diff)
downloadcatch3-6a46b344c02b2548b11e4b66f95618bd5c90d110.tar.gz
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.
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/catch2/catch_all.hpp1
-rw-r--r--src/catch2/internal/catch_case_sensitive.hpp12
-rw-r--r--src/catch2/internal/catch_common.hpp5
-rw-r--r--src/catch2/internal/catch_wildcard_pattern.hpp3
-rw-r--r--src/catch2/matchers/catch_matchers_string.hpp1
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>