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

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_assertionhandler.cpp
diff options
context:
space:
mode:
authorPhil Nash2017-08-09 12:10:14 +0100
committerPhil Nash2017-08-09 12:10:14 +0100
commitee9b19efd3737afc93e14023cc0b4a9fd2a21b7c (patch)
tree6bee3b9ac3be2a8057fa767bab44386c12a7b13a /include/internal/catch_assertionhandler.cpp
parentb59e0ed48a4d94f9e595a5936434e9bad7834ece (diff)
downloadcatch3-ee9b19efd3737afc93e14023cc0b4a9fd2a21b7c.tar.gz
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.
Diffstat (limited to 'include/internal/catch_assertionhandler.cpp')
-rw-r--r--include/internal/catch_assertionhandler.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/internal/catch_assertionhandler.cpp b/include/internal/catch_assertionhandler.cpp
index ea4f75af..9e7c8453 100644
--- a/include/internal/catch_assertionhandler.cpp
+++ b/include/internal/catch_assertionhandler.cpp
@@ -14,7 +14,7 @@
#include "catch_context.h"
#include "catch_debugger.h"
#include "catch_interfaces_registry_hub.h"
-#include "catch_matchers_string.h"
+#include "catch_capture_matchers.h"
#include <cassert>
@@ -138,12 +138,8 @@ namespace Catch {
m_inExceptionGuard = false;
}
- using StringMatcher = Matchers::Impl::MatcherBase<std::string>;
-
- void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef matcherString ) {
- MatchExpr<std::string, StringMatcher const&> expr( Catch::translateActiveException(), matcher, matcherString );
- handler.handle( expr );
- }
+ // This is the overload that takes a string and infers the Equals matcher from it
+ // The more general overload, that takes any string matcher, is in catch_capture_matchers.cpp
void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString ) {
handleExceptionMatchExpr( handler, Matchers::Equals( str ), matcherString );
}