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

Rename some matcher-related files

The two changes are
`catch_matchers_templates` -> `catch_matchers_templated` and
`catch_matchers_generic` -> `catch_matchers_predicate`. The former
is mostly cosmetic, but the second was previously significantly
misleading, and as the library is now to be consumed by including
specific headers, this needed to be fixed.
Commit
ab0ca2f5663ebeff107fca9910ba83b46bd5505e
Author
Martin Hořeňovský ·
Parents
3a3efebd163f

Files · Download .tar.gz

Changes

 docs/matchers.md                                                  | 6 +++---
 src/CMakeLists.txt                                                | 8 ++++----
 src/catch2/matchers/catch_matchers_container_properties.hpp       | 2 +-
 src/catch2/matchers/catch_matchers_contains.hpp                   | 2 +-
 .../{catch_matchers_generic.cpp => catch_matchers_predicate.cpp}  | 2 +-
 .../{catch_matchers_generic.hpp => catch_matchers_predicate.hpp}  | 0
 ...{catch_matchers_templates.cpp => catch_matchers_templated.cpp} | 2 +-
 ...{catch_matchers_templates.hpp => catch_matchers_templated.hpp} | 7 +++++--
 tests/ExtraTests/X01-PrefixedMacros.cpp                           | 2 +-
 tests/SelfTest/UsageTests/Matchers.tests.cpp                      | 4 ++--
 10 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/docs/matchers.md b/docs/matchers.md
index dbeb1cfc..39003b49 100644
--- a/docs/matchers.md
+++ b/docs/matchers.md
@@ -211,7 +211,7 @@ REQUIRE_THAT("Hello olleH",
 );
 ```
 
-> the predicate matcher lives in `catch2/matchers/catch_matchers_generic.hpp`
+> the predicate matcher lives in `catch2/matchers/catch_matchers_predicate.hpp`
 
 
 The other miscellaneous matcher utility is exception matching.
@@ -333,7 +333,7 @@ can compare one range-like (something that responds to `begin` and
 
 ```cpp
 #include <catch2/catch_test_macros.hpp>
-#include <catch2/matchers/catch_matchers_templates.hpp>
+#include <catch2/matchers/catch_matchers_templated.hpp>
 // ...
 
 template<typename Range>
@@ -378,7 +378,7 @@ a new style matcher, combining new style matchers is more expensive
 in terms of compilation time. Also note that you can combine old style
 and new style matchers arbitrarily.
 
-> `MatcherGenericBase` lives in `catch2/matchers/catch_matchers_templates.hpp`
+> `MatcherGenericBase` lives in `catch2/matchers/catch_matchers_templated.hpp`
 
 
 ---
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3a7c4821..27a6b58a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -78,9 +78,9 @@ set(INTERNAL_HEADERS
     ${SOURCES_DIR}/matchers/catch_matchers_contains.hpp
     ${SOURCES_DIR}/matchers/catch_matchers_exception.hpp
     ${SOURCES_DIR}/matchers/catch_matchers_floating.hpp
-    ${SOURCES_DIR}/matchers/catch_matchers_generic.hpp
+    ${SOURCES_DIR}/matchers/catch_matchers_predicate.hpp
     ${SOURCES_DIR}/matchers/catch_matchers_string.hpp
-    ${SOURCES_DIR}/matchers/catch_matchers_templates.hpp
+    ${SOURCES_DIR}/matchers/catch_matchers_templated.hpp
     ${SOURCES_DIR}/matchers/catch_matchers_vector.hpp
     ${SOURCES_DIR}/catch_message.h
     ${SOURCES_DIR}/catch_meta.hpp
@@ -162,9 +162,9 @@ set(IMPL_SOURCES
     ${SOURCES_DIR}/matchers/catch_matchers_container_properties.cpp
     ${SOURCES_DIR}/matchers/catch_matchers_exception.cpp
     ${SOURCES_DIR}/matchers/catch_matchers_floating.cpp
-    ${SOURCES_DIR}/matchers/catch_matchers_generic.cpp
+    ${SOURCES_DIR}/matchers/catch_matchers_predicate.cpp
     ${SOURCES_DIR}/matchers/catch_matchers_string.cpp
-    ${SOURCES_DIR}/matchers/catch_matchers_templates.cpp
+    ${SOURCES_DIR}/matchers/catch_matchers_templated.cpp
     ${SOURCES_DIR}/catch_message.cpp
     ${SOURCES_DIR}/catch_output_redirect.cpp
     ${SOURCES_DIR}/catch_registry_hub.cpp
diff --git a/src/catch2/matchers/catch_matchers_container_properties.hpp b/src/catch2/matchers/catch_matchers_container_properties.hpp
index e2d49ffd..c1047717 100644
--- a/src/catch2/matchers/catch_matchers_container_properties.hpp
+++ b/src/catch2/matchers/catch_matchers_container_properties.hpp
@@ -4,7 +4,7 @@
 #ifndef TWOBLUECUBES_CATCH_MATCHERS_CONTAINER_PROPERTIES_HPP_INCLUDED
 #define TWOBLUECUBES_CATCH_MATCHERS_CONTAINER_PROPERTIES_HPP_INCLUDED
 
-#include <catch2/matchers/catch_matchers_templates.hpp>
+#include <catch2/matchers/catch_matchers_templated.hpp>
 #include <catch2/internal/catch_container_nonmembers.hpp>
 
 namespace Catch {
diff --git a/src/catch2/matchers/catch_matchers_contains.hpp b/src/catch2/matchers/catch_matchers_contains.hpp
index 0fcd80a6..6b10a392 100644
--- a/src/catch2/matchers/catch_matchers_contains.hpp
+++ b/src/catch2/matchers/catch_matchers_contains.hpp
@@ -5,7 +5,7 @@
 #ifndef TWOBLUECUBES_CATCH_MATCHERS_CONTAINS_HPP_INCLUDED
 #define TWOBLUECUBES_CATCH_MATCHERS_CONTAINS_HPP_INCLUDED
 
-#include <catch2/matchers/catch_matchers_templates.hpp>
+#include <catch2/matchers/catch_matchers_templated.hpp>
 
 #include <algorithm>
 #include <functional>
diff --git a/src/catch2/matchers/catch_matchers_generic.cpp b/src/catch2/matchers/catch_matchers_predicate.cpp
similarity index 81%
rename from src/catch2/matchers/catch_matchers_generic.cpp
rename to src/catch2/matchers/catch_matchers_predicate.cpp
index 15b7fc9d..be6f808f 100644
--- a/src/catch2/matchers/catch_matchers_generic.cpp
+++ b/src/catch2/matchers/catch_matchers_predicate.cpp
@@ -1,4 +1,4 @@
-#include <catch2/matchers/catch_matchers_generic.hpp>
+#include <catch2/matchers/catch_matchers_predicate.hpp>
 
 std::string Catch::Matchers::Generic::Detail::finalizeDescription(const std::string& desc) {
     if (desc.empty()) {
diff --git a/src/catch2/matchers/catch_matchers_generic.hpp b/src/catch2/matchers/catch_matchers_predicate.hpp
similarity index 100%
rename from src/catch2/matchers/catch_matchers_generic.hpp
rename to src/catch2/matchers/catch_matchers_predicate.hpp
diff --git a/src/catch2/matchers/catch_matchers_templates.cpp b/src/catch2/matchers/catch_matchers_templated.cpp
similarity index 95%
rename from src/catch2/matchers/catch_matchers_templates.cpp
rename to src/catch2/matchers/catch_matchers_templated.cpp
index f2d744f4..65066b74 100644
--- a/src/catch2/matchers/catch_matchers_templates.cpp
+++ b/src/catch2/matchers/catch_matchers_templated.cpp
@@ -1,4 +1,4 @@
-#include <catch2/matchers/catch_matchers_templates.hpp>
+#include <catch2/matchers/catch_matchers_templated.hpp>
 
 namespace Catch {
 namespace Matchers {
diff --git a/src/catch2/matchers/catch_matchers_templates.hpp b/src/catch2/matchers/catch_matchers_templated.hpp
similarity index 97%
rename from src/catch2/matchers/catch_matchers_templates.hpp
rename to src/catch2/matchers/catch_matchers_templated.hpp
index 8959791f..7e2ac37c 100644
--- a/src/catch2/matchers/catch_matchers_templates.hpp
+++ b/src/catch2/matchers/catch_matchers_templated.hpp
@@ -1,5 +1,8 @@
-#ifndef TWOBLUECUBES_CATCH_MATCHERS_TEMPLATES_HPP_INCLUDED
-#define TWOBLUECUBES_CATCH_MATCHERS_TEMPLATES_HPP_INCLUDED
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef TWOBLUECUBES_CATCH_MATCHERS_TEMPLATED_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_MATCHERS_TEMPLATED_HPP_INCLUDED
 
 #include <catch2/catch_common.h>
 #include <catch2/matchers/catch_matchers.hpp>
diff --git a/tests/ExtraTests/X01-PrefixedMacros.cpp b/tests/ExtraTests/X01-PrefixedMacros.cpp
index 82ca2ed3..05eff1ce 100644
--- a/tests/ExtraTests/X01-PrefixedMacros.cpp
+++ b/tests/ExtraTests/X01-PrefixedMacros.cpp
@@ -5,7 +5,7 @@
 // This won't provide full coverage, but it might be worth checking
 // the other branch as well
 #include <catch2/catch_test_macros.hpp>
-#include <catch2/matchers/catch_matchers_generic.hpp>
+#include <catch2/matchers/catch_matchers_predicate.hpp>
 #include <catch2/matchers/catch_matchers_string.hpp>
 
 #include <type_traits>
diff --git a/tests/SelfTest/UsageTests/Matchers.tests.cpp b/tests/SelfTest/UsageTests/Matchers.tests.cpp
index 67b55d06..15c6e4cf 100644
--- a/tests/SelfTest/UsageTests/Matchers.tests.cpp
+++ b/tests/SelfTest/UsageTests/Matchers.tests.cpp
@@ -6,10 +6,10 @@
 #include <catch2/catch_test_macros.hpp>
 #include <catch2/matchers/catch_matchers_exception.hpp>
 #include <catch2/matchers/catch_matchers_floating.hpp>
-#include <catch2/matchers/catch_matchers_generic.hpp>
+#include <catch2/matchers/catch_matchers_predicate.hpp>
 #include <catch2/matchers/catch_matchers_string.hpp>
 #include <catch2/matchers/catch_matchers_vector.hpp>
-#include <catch2/matchers/catch_matchers_templates.hpp>
+#include <catch2/matchers/catch_matchers_templated.hpp>
 
 #include <algorithm>
 #include <cmath>