Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_capture_matchers.cpp
Go to the documentation of this file.
1
/*
2
* Created by Phil on 9/8/2017.
3
* Copyright 2017 Two Blue Cubes Ltd. All rights reserved.
4
*
5
* Distributed under the Boost Software License, Version 1.0. (See accompanying
6
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
*/
8
#include "
catch_capture_matchers.h
"
9
#include "
catch_interfaces_registry_hub.h
"
10
11
namespace
Catch
{
12
13
using
StringMatcher
=
Matchers::Impl::MatcherBase<std::string>
;
14
15
// This is the general overload that takes a any string matcher
16
// There is another overload, in catch_assertionhandler.h/.cpp, that only takes a string and infers
17
// the Equals matcher (so the header does not mention matchers)
18
void
handleExceptionMatchExpr
(
AssertionHandler
& handler,
StringMatcher
const
& matcher,
StringRef
const
& matcherString ) {
19
std::string exceptionMessage =
Catch::translateActiveException
();
20
MatchExpr<std::string, StringMatcher const&>
expr( exceptionMessage, matcher, matcherString );
21
handler.
handleExpr
( expr );
22
}
23
24
}
// namespace Catch
catch_capture_matchers.h
catch_interfaces_registry_hub.h
Catch::AssertionHandler
Definition
catch.hpp:2173
Catch::AssertionHandler::handleExpr
void handleExpr(ExprLhs< T > const &expr)
Definition
catch_assertionhandler.h:64
Catch::MatchExpr
Definition
catch.hpp:3370
Catch::StringRef
Definition
catch.hpp:522
Catch
Definition
231-Cfg-OutputStreams.cpp:32
Catch::translateActiveException
std::string translateActiveException()
Definition
catch_registry_hub.cpp:90
Catch::handleExceptionMatchExpr
void handleExceptionMatchExpr(AssertionHandler &handler, std::string const &str, StringRef const &matcherString)
Definition
catch_assertionhandler.cpp:117
Catch::Matchers::Impl::MatcherBase< std::string >
libraries
sys-vm
external
Catch2
include
internal
catch_capture_matchers.cpp
Generated by
1.12.0