Standardize matcher headers to use .hpp suffix

This commit is contained in:
Martin Hořeňovský 2020-03-01 19:59:18 +01:00
parent 64d7f9b98a
commit c2daf468bb
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
22 changed files with 33 additions and 33 deletions

View File

@ -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)

View File

@ -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

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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>

View File

@ -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 {

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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";

View File

@ -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>

View File

@ -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 };

View File

@ -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>

View File

@ -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>

View File

@ -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>