mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 21:05:39 +02:00
Remove CATCH_CONFIG_DISABLE_MATCHERS
Now that the recommended distribution and usage method is proper library, users can just avoid including the matcher headers to get basically the same effect.
This commit is contained in:
@@ -286,9 +286,7 @@ TEST_CASE( "Parse test names and tags" ) {
|
||||
|
||||
TEST_CASE( "Process can be configured on command line", "[config][command-line]" ) {
|
||||
|
||||
#ifndef CATCH_CONFIG_DISABLE_MATCHERS
|
||||
using namespace Catch::Matchers;
|
||||
#endif
|
||||
|
||||
Catch::ConfigData config;
|
||||
auto cli = Catch::makeCommandLineParser(config);
|
||||
@@ -367,9 +365,7 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]"
|
||||
auto result = cli.parse({"test", "--reporter", "unsupported"});
|
||||
CHECK(!result);
|
||||
|
||||
#ifndef CATCH_CONFIG_DISABLE_MATCHERS
|
||||
REQUIRE_THAT(result.errorMessage(), Contains("Unrecognized reporter"));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,10 +397,7 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]"
|
||||
SECTION("-x must be numeric") {
|
||||
auto result = cli.parse({"test", "-x", "oops"});
|
||||
CHECK(!result);
|
||||
|
||||
#ifndef CATCH_CONFIG_DISABLE_MATCHERS
|
||||
REQUIRE_THAT(result.errorMessage(), Contains("convert") && Contains("oops"));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -476,9 +469,7 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]"
|
||||
SECTION( "error" ) {
|
||||
auto result = cli.parse({"test", "--use-colour", "wrong"});
|
||||
CHECK( !result );
|
||||
#ifndef CATCH_CONFIG_DISABLE_MATCHERS
|
||||
CHECK_THAT( result.errorMessage(), Contains( "colour mode must be one of" ) );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -22,14 +22,12 @@ TEST_CASE( "Tag alias can be registered against tag patterns" ) {
|
||||
FAIL( "expected exception" );
|
||||
}
|
||||
catch( std::exception& ex ) {
|
||||
#ifndef CATCH_CONFIG_DISABLE_MATCHERS
|
||||
std::string what = ex.what();
|
||||
using namespace Catch::Matchers;
|
||||
CHECK_THAT( what, Contains( "[@zzz]" ) );
|
||||
CHECK_THAT( what, Contains( "file" ) );
|
||||
CHECK_THAT( what, Contains( "2" ) );
|
||||
CHECK_THAT( what, Contains( "10" ) );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user