forked from catchorg/Catch2
Moved matcher-based capture macros into their own file
- this file excluded from the CATCH_CONFIG_DISABLE_MATCHERS path. - matchers are always compiled in to the impl file - _THROWS_WITH macros are still available with matchers disabled - but only the ones that take a string - tests that use matchers have #ifdefs, so the whole SelfTest project can compile with matchers disable.
This commit is contained in:
@@ -11,8 +11,6 @@
|
||||
|
||||
TEST_CASE( "Tag alias can be registered against tag patterns" ) {
|
||||
|
||||
using namespace Catch::Matchers;
|
||||
|
||||
Catch::TagAliasRegistry registry;
|
||||
|
||||
registry.add( "[@zzz]", "[one][two]", Catch::SourceLineInfo( "file", 2 ) );
|
||||
@@ -24,11 +22,14 @@ 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