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

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/TestMain.cpp
diff options
context:
space:
mode:
authorPhil Nash2017-08-10 16:18:05 +0100
committerPhil Nash2017-08-10 16:18:05 +0100
commit97c06ca6fbd46b53431de487a92e5e9db302c7c5 (patch)
tree6fd2598a24d6cf3da13345981a886c60862e058b /projects/SelfTest/TestMain.cpp
parent3382312bd8300f6b11fc627632ed4e5b466650d2 (diff)
parentee9b19efd3737afc93e14023cc0b4a9fd2a21b7c (diff)
downloadcatch3-97c06ca6fbd46b53431de487a92e5e9db302c7c5.tar.gz
Merge branch 'reevaluate' into dev-modernize
Diffstat (limited to 'projects/SelfTest/TestMain.cpp')
-rw-r--r--projects/SelfTest/TestMain.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/projects/SelfTest/TestMain.cpp b/projects/SelfTest/TestMain.cpp
index aad1f036..c3b1f29b 100644
--- a/projects/SelfTest/TestMain.cpp
+++ b/projects/SelfTest/TestMain.cpp
@@ -47,7 +47,9 @@ inline Catch::TestCase fakeTestCase( const char* name, const char* desc = "" ){
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);
@@ -153,7 +155,9 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]"
auto result = cli.parse({"test", "-x", "oops"});
CHECK(!result);
+#ifndef CATCH_CONFIG_DISABLE_MATCHERS
REQUIRE_THAT(result.errorMessage(), Contains("convert") && Contains("oops"));
+#endif
}
}
@@ -225,7 +229,9 @@ 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
}
}
}