Integrated INTERNAL_CATCH_THROWS_STR_MATCHES with new AssertionHandler
This commit is contained in:
parent
ef4fa56b71
commit
27fd8f80bd
9 changed files with 51 additions and 20 deletions
|
@ -13,6 +13,7 @@
|
|||
#include "catch_context.h"
|
||||
#include "catch_debugger.h"
|
||||
#include "catch_interfaces_registry_hub.h"
|
||||
#include "catch_matchers_string.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
@ -140,5 +141,14 @@ 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 );
|
||||
}
|
||||
void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString ) {
|
||||
handleExceptionMatchExpr( handler, Matchers::Equals( str ), matcherString );
|
||||
}
|
||||
|
||||
} // namespace Catch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue