New Matchers implementation

- simpler
- less templates and machinery
- no cloning, copying or unnecessary heap allocations
- better factored
This commit is contained in:
Phil Nash
2017-02-08 14:17:17 +00:00
parent 5530303be7
commit 7fed25ad1f
8 changed files with 218 additions and 269 deletions

View File

@@ -60,12 +60,13 @@ namespace Catch {
void ResultBuilder::captureExpectedException( std::string const& expectedMessage ) {
if( expectedMessage.empty() )
captureExpectedException( Matchers::Impl::Generic::AllOf<std::string>() );
captureExpectedException( Matchers::Impl::MatchAllOf<std::string>() );
else
captureExpectedException( Matchers::Equals( expectedMessage ) );
}
void ResultBuilder::captureExpectedException( Matchers::Impl::Matcher<std::string> const& matcher ) {
void ResultBuilder::captureExpectedException( Matchers::Impl::MatcherBase<std::string> const& matcher ) {
assert( !isFalseTest( m_assertionInfo.resultDisposition ) );
AssertionResultData data = m_data;