diff options
| author | Phil Nash | 2017-08-10 16:18:05 +0100 |
|---|---|---|
| committer | Phil Nash | 2017-08-10 16:18:05 +0100 |
| commit | 97c06ca6fbd46b53431de487a92e5e9db302c7c5 (patch) | |
| tree | 6fd2598a24d6cf3da13345981a886c60862e058b /projects/SelfTest/TestMain.cpp | |
| parent | 3382312bd8300f6b11fc627632ed4e5b466650d2 (diff) | |
| parent | ee9b19efd3737afc93e14023cc0b4a9fd2a21b7c (diff) | |
| download | catch3-97c06ca6fbd46b53431de487a92e5e9db302c7c5.tar.gz | |
Merge branch 'reevaluate' into dev-modernize
Diffstat (limited to 'projects/SelfTest/TestMain.cpp')
| -rw-r--r-- | projects/SelfTest/TestMain.cpp | 6 |
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 } } } |