forked from catchorg/Catch2
Introduce compile time toggle to remove Matchers from TU
The toggle is `CATCH_CONFIG_DISABLE_MATCHERS` and the only use is to speed up compilation of small TUs. For large ones it is likely insignificant, because the speed up is constant relative to number of tests/assertions in TU.
This commit is contained in:
@@ -72,7 +72,7 @@ namespace Catch {
|
||||
setResultType( resultType );
|
||||
captureExpression();
|
||||
}
|
||||
|
||||
#if defined(CATCH_CONFIG_DISABLE_MATCHERS)
|
||||
void ResultBuilder::captureExpectedException( std::string const& expectedMessage ) {
|
||||
if( expectedMessage.empty() )
|
||||
captureExpectedException( Matchers::Impl::MatchAllOf<std::string>() );
|
||||
@@ -96,7 +96,7 @@ namespace Catch {
|
||||
AssertionResult result( m_assertionInfo, data );
|
||||
handleResult( result );
|
||||
}
|
||||
|
||||
#endif // CATCH_CONFIG_DISABLE_MATCHERS
|
||||
void ResultBuilder::captureExpression() {
|
||||
AssertionResult result = build();
|
||||
handleResult( result );
|
||||
|
||||
Reference in New Issue
Block a user