diff options
| author | Martin Hořeňovský | 2020-03-01 19:59:18 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-03-27 10:22:25 +0100 |
| commit | c2daf468bb17d4e269183e895f14c6f9ff50b09d (patch) | |
| tree | 6a2c2b3c08a6e7c754f63a398ed051bdbd337b07 | |
| parent | 64d7f9b98a04da12a9bba8c10b4e32148bba7fe2 (diff) | |
| download | catch3-c2daf468bb17d4e269183e895f14c6f9ff50b09d.tar.gz | |
Standardize matcher headers to use .hpp suffix
22 files changed, 33 insertions, 33 deletions
diff --git a/docs/matchers.md b/docs/matchers.md index 26da2679..dbeb1cfc 100644 --- a/docs/matchers.md +++ b/docs/matchers.md @@ -47,8 +47,8 @@ _both_ ends with the suffix "as a service" _and_ contains the string Both of the string matchers used in the examples above live in the -`catch_matchers_string.h` header, so to compile the code above also -requires `#include <catch2/matchers/catch_matchers_string.h>`. +`catch_matchers_string.hpp` header, so to compile the code above also +requires `#include <catch2/matchers/catch_matchers_string.hpp>`. **IMPORTANT**: The combining operators do not take ownership of the matcher objects being combined. This means that if you store combined @@ -108,7 +108,7 @@ the regex `"abc"` will not match input string `"abcd"`. To match The second argument sets whether the matching should be case-sensitive or not. By default, it is case-sensitive. -> `std::string` matchers live in `catch2/matchers/catch_matchers_string.h` +> `std::string` matchers live in `catch2/matchers/catch_matchers_string.hpp` ### Vector matchers @@ -136,7 +136,7 @@ An example usage: This assertions will pass, because the elements given to the matchers are a permutation of the ones in `some_vec`. -> vector matchers live in `catch2/matchers/catch_matchers_vector.h` +> vector matchers live in `catch2/matchers/catch_matchers_vector.hpp` ### Floating point matchers @@ -187,7 +187,7 @@ to zero, we would write this assertion: ``` -> floating point matchers live in `catch2/matchers/catch_matchers_floating.h` +> floating point matchers live in `catch2/matchers/catch_matchers_floating.hpp` ### Miscellaneous matchers @@ -223,7 +223,7 @@ Catch2 provides an utility macro for asserting that an expression throws exception of specific type, and that the exception has desired properties. The macro is `REQUIRE_THROWS_MATCHES(expr, ExceptionType, Matcher)`. -> `REQUIRE_THROWS_MATCHES` macro lives in `catch2/matchers/catch_matchers.h` +> `REQUIRE_THROWS_MATCHES` macro lives in `catch2/matchers/catch_matchers.hpp` Catch2 currently provides only one matcher for exceptions, @@ -311,7 +311,7 @@ written using the new style, combining old style matchers should generally compile faster. Also note that you can combine old and new style matchers arbitrarily. -> `MatcherBase` lives in `catch2/matchers/catch_matchers.h` +> `MatcherBase` lives in `catch2/matchers/catch_matchers.hpp` ## Writing custom matchers (new style) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 43f9c63d..d2c41fa4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -72,13 +72,13 @@ set(INTERNAL_HEADERS ${SOURCES_DIR}/catch_interfaces_testcase.h ${SOURCES_DIR}/catch_leak_detector.h ${SOURCES_DIR}/catch_list.h - ${SOURCES_DIR}/matchers/catch_matchers.h + ${SOURCES_DIR}/matchers/catch_matchers.hpp ${SOURCES_DIR}/matchers/catch_matchers_exception.hpp - ${SOURCES_DIR}/matchers/catch_matchers_floating.h + ${SOURCES_DIR}/matchers/catch_matchers_floating.hpp ${SOURCES_DIR}/matchers/catch_matchers_generic.hpp - ${SOURCES_DIR}/matchers/catch_matchers_string.h + ${SOURCES_DIR}/matchers/catch_matchers_string.hpp ${SOURCES_DIR}/matchers/catch_matchers_templates.hpp - ${SOURCES_DIR}/matchers/catch_matchers_vector.h + ${SOURCES_DIR}/matchers/catch_matchers_vector.hpp ${SOURCES_DIR}/catch_message.h ${SOURCES_DIR}/catch_meta.hpp ${SOURCES_DIR}/catch_objc.hpp diff --git a/src/catch2/catch_assertionhandler.cpp b/src/catch2/catch_assertionhandler.cpp index cf102ae7..9d321a52 100644 --- a/src/catch2/catch_assertionhandler.cpp +++ b/src/catch2/catch_assertionhandler.cpp @@ -16,7 +16,7 @@ #include <catch2/catch_interfaces_registry_hub.h> #include <catch2/internal/catch_capture_matchers.h> #include <catch2/catch_run_context.h> -#include <catch2/matchers/catch_matchers_string.h> +#include <catch2/matchers/catch_matchers_string.hpp> namespace Catch { diff --git a/src/catch2/internal/catch_capture_matchers.cpp b/src/catch2/internal/catch_capture_matchers.cpp index c13d0543..750a0e91 100644 --- a/src/catch2/internal/catch_capture_matchers.cpp +++ b/src/catch2/internal/catch_capture_matchers.cpp @@ -3,7 +3,7 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ #include <catch2/internal/catch_capture_matchers.h> -#include <catch2/matchers/catch_matchers.h> +#include <catch2/matchers/catch_matchers.hpp> #include <catch2/catch_interfaces_registry_hub.h> namespace Catch { diff --git a/src/catch2/matchers/catch_matchers.cpp b/src/catch2/matchers/catch_matchers.cpp index a8737497..20d1ef92 100644 --- a/src/catch2/matchers/catch_matchers.cpp +++ b/src/catch2/matchers/catch_matchers.cpp @@ -3,7 +3,7 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ -#include <catch2/matchers/catch_matchers.h> +#include <catch2/matchers/catch_matchers.hpp> namespace Catch { diff --git a/src/catch2/matchers/catch_matchers.h b/src/catch2/matchers/catch_matchers.hpp index 3e0f2083..3e0f2083 100644 --- a/src/catch2/matchers/catch_matchers.h +++ b/src/catch2/matchers/catch_matchers.hpp diff --git a/src/catch2/matchers/catch_matchers_exception.hpp b/src/catch2/matchers/catch_matchers_exception.hpp index fabc26ea..03389005 100644 --- a/src/catch2/matchers/catch_matchers_exception.hpp +++ b/src/catch2/matchers/catch_matchers_exception.hpp @@ -7,7 +7,7 @@ #ifndef TWOBLUECUBES_CATCH_MATCHERS_EXCEPTION_HPP_INCLUDED #define TWOBLUECUBES_CATCH_MATCHERS_EXCEPTION_HPP_INCLUDED -#include <catch2/matchers/catch_matchers.h> +#include <catch2/matchers/catch_matchers.hpp> namespace Catch { namespace Matchers { diff --git a/src/catch2/matchers/catch_matchers_floating.cpp b/src/catch2/matchers/catch_matchers_floating.cpp index 77684458..071c10a3 100644 --- a/src/catch2/matchers/catch_matchers_floating.cpp +++ b/src/catch2/matchers/catch_matchers_floating.cpp @@ -5,7 +5,7 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ -#include <catch2/matchers/catch_matchers_floating.h> +#include <catch2/matchers/catch_matchers_floating.hpp> #include <catch2/catch_enforce.h> #include <catch2/catch_polyfills.hpp> #include <catch2/catch_to_string.hpp> diff --git a/src/catch2/matchers/catch_matchers_floating.h b/src/catch2/matchers/catch_matchers_floating.hpp index a935b570..cb49cf26 100644 --- a/src/catch2/matchers/catch_matchers_floating.h +++ b/src/catch2/matchers/catch_matchers_floating.hpp @@ -7,7 +7,7 @@ #ifndef TWOBLUECUBES_CATCH_MATCHERS_FLOATING_H_INCLUDED #define TWOBLUECUBES_CATCH_MATCHERS_FLOATING_H_INCLUDED -#include <catch2/matchers/catch_matchers.h> +#include <catch2/matchers/catch_matchers.hpp> namespace Catch { namespace Matchers { diff --git a/src/catch2/matchers/catch_matchers_generic.hpp b/src/catch2/matchers/catch_matchers_generic.hpp index 90f26d0c..81e21c42 100644 --- a/src/catch2/matchers/catch_matchers_generic.hpp +++ b/src/catch2/matchers/catch_matchers_generic.hpp @@ -8,7 +8,7 @@ #define TWOBLUECUBES_CATCH_MATCHERS_GENERIC_HPP_INCLUDED #include <catch2/catch_common.h> -#include <catch2/matchers/catch_matchers.h> +#include <catch2/matchers/catch_matchers.hpp> #include <catch2/catch_meta.hpp> #include <string> diff --git a/src/catch2/matchers/catch_matchers_string.cpp b/src/catch2/matchers/catch_matchers_string.cpp index 91282ddf..d4521809 100644 --- a/src/catch2/matchers/catch_matchers_string.cpp +++ b/src/catch2/matchers/catch_matchers_string.cpp @@ -3,7 +3,7 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ -#include <catch2/matchers/catch_matchers_string.h> +#include <catch2/matchers/catch_matchers_string.hpp> #include <catch2/catch_string_manip.h> #include <catch2/catch_tostring.h> diff --git a/src/catch2/matchers/catch_matchers_string.h b/src/catch2/matchers/catch_matchers_string.hpp index c1096b14..6e351cd0 100644 --- a/src/catch2/matchers/catch_matchers_string.h +++ b/src/catch2/matchers/catch_matchers_string.hpp @@ -8,7 +8,7 @@ #ifndef TWOBLUECUBES_CATCH_MATCHERS_STRING_H_INCLUDED #define TWOBLUECUBES_CATCH_MATCHERS_STRING_H_INCLUDED -#include <catch2/matchers/catch_matchers.h> +#include <catch2/matchers/catch_matchers.hpp> #include <string> diff --git a/src/catch2/matchers/catch_matchers_templates.hpp b/src/catch2/matchers/catch_matchers_templates.hpp index 43ae5dfc..34e067ff 100644 --- a/src/catch2/matchers/catch_matchers_templates.hpp +++ b/src/catch2/matchers/catch_matchers_templates.hpp @@ -2,7 +2,7 @@ #define TWOBLUECUBES_CATCH_MATCHERS_TEMPLATES_HPP_INCLUDED #include <catch2/catch_common.h> -#include <catch2/matchers/catch_matchers.h> +#include <catch2/matchers/catch_matchers.hpp> #include <catch2/catch_stringref.h> #include <array> diff --git a/src/catch2/matchers/catch_matchers_vector.h b/src/catch2/matchers/catch_matchers_vector.hpp index 620b7211..24300641 100644 --- a/src/catch2/matchers/catch_matchers_vector.h +++ b/src/catch2/matchers/catch_matchers_vector.hpp @@ -8,7 +8,7 @@ #ifndef TWOBLUECUBES_CATCH_MATCHERS_VECTOR_H_INCLUDED #define TWOBLUECUBES_CATCH_MATCHERS_VECTOR_H_INCLUDED -#include <catch2/matchers/catch_matchers.h> +#include <catch2/matchers/catch_matchers.hpp> #include <catch2/catch_approx.h> #include <algorithm> diff --git a/tests/ExtraTests/X01-PrefixedMacros.cpp b/tests/ExtraTests/X01-PrefixedMacros.cpp index 89f128b7..82ca2ed3 100644 --- a/tests/ExtraTests/X01-PrefixedMacros.cpp +++ b/tests/ExtraTests/X01-PrefixedMacros.cpp @@ -6,7 +6,7 @@ // the other branch as well #include <catch2/catch_test_macros.hpp> #include <catch2/matchers/catch_matchers_generic.hpp> -#include <catch2/matchers/catch_matchers_string.h> +#include <catch2/matchers/catch_matchers_string.hpp> #include <type_traits> #include <stdexcept> diff --git a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp index cea898da..f8d6bd3b 100644 --- a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp @@ -5,7 +5,7 @@ #include <catch2/catch_approx.h> #include <catch2/catch_test_macros.hpp> -#include <catch2/matchers/catch_matchers_string.h> +#include <catch2/matchers/catch_matchers_string.hpp> #include <catch2/catch_test_spec_parser.h> #include <catch2/catch_test_case_info.h> #include <catch2/catch_config.hpp> diff --git a/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp b/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp index 19a1e0f2..327c8811 100644 --- a/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp @@ -1,5 +1,5 @@ #include <catch2/catch_test_macros.hpp> -#include <catch2/matchers/catch_matchers_vector.h> +#include <catch2/matchers/catch_matchers_vector.hpp> #include <catch2/catch_string_manip.h> static const char * const no_whitespace = "There is no extra whitespace here"; diff --git a/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp b/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp index 3621fcd7..7765c2fa 100644 --- a/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp @@ -3,8 +3,8 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ -#include <catch2/matchers/catch_matchers_string.h> -#include <catch2/matchers/catch_matchers_vector.h> +#include <catch2/matchers/catch_matchers_string.hpp> +#include <catch2/matchers/catch_matchers_vector.hpp> #include <catch2/catch_tag_alias_registry.h> #include <catch2/catch_test_macros.hpp> #include <catch2/catch_test_case_info.h> diff --git a/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp b/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp index 98cc9024..d82b5402 100644 --- a/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp @@ -1,5 +1,5 @@ #include <catch2/catch_enum_values_registry.h> -#include <catch2/matchers/catch_matchers_vector.h> +#include <catch2/matchers/catch_matchers_vector.hpp> #include <catch2/catch_test_macros.hpp> enum class EnumClass3 { Value1, Value2, Value3, Value4 }; diff --git a/tests/SelfTest/UsageTests/Compilation.tests.cpp b/tests/SelfTest/UsageTests/Compilation.tests.cpp index 5750ad72..1c43c1c3 100644 --- a/tests/SelfTest/UsageTests/Compilation.tests.cpp +++ b/tests/SelfTest/UsageTests/Compilation.tests.cpp @@ -29,7 +29,7 @@ std::ostream& operator<<(std::ostream& out, foo::helper_1403 const&) { /////////////////////////////// #include <catch2/catch_test_macros.hpp> -#include <catch2/matchers/catch_matchers_string.h> +#include <catch2/matchers/catch_matchers_string.hpp> #include <cstring> diff --git a/tests/SelfTest/UsageTests/Exception.tests.cpp b/tests/SelfTest/UsageTests/Exception.tests.cpp index d58b1933..8fb3e2f0 100644 --- a/tests/SelfTest/UsageTests/Exception.tests.cpp +++ b/tests/SelfTest/UsageTests/Exception.tests.cpp @@ -4,7 +4,7 @@ */ #include <catch2/catch_test_macros.hpp> -#include <catch2/matchers/catch_matchers_string.h> +#include <catch2/matchers/catch_matchers_string.hpp> #include <string> #include <stdexcept> diff --git a/tests/SelfTest/UsageTests/Matchers.tests.cpp b/tests/SelfTest/UsageTests/Matchers.tests.cpp index 06db9a1a..67b55d06 100644 --- a/tests/SelfTest/UsageTests/Matchers.tests.cpp +++ b/tests/SelfTest/UsageTests/Matchers.tests.cpp @@ -5,10 +5,10 @@ #include <catch2/catch_test_macros.hpp> #include <catch2/matchers/catch_matchers_exception.hpp> -#include <catch2/matchers/catch_matchers_floating.h> +#include <catch2/matchers/catch_matchers_floating.hpp> #include <catch2/matchers/catch_matchers_generic.hpp> -#include <catch2/matchers/catch_matchers_string.h> -#include <catch2/matchers/catch_matchers_vector.h> +#include <catch2/matchers/catch_matchers_string.hpp> +#include <catch2/matchers/catch_matchers_vector.hpp> #include <catch2/matchers/catch_matchers_templates.hpp> #include <algorithm> |