Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_capture_matchers.h File Reference
Include dependency graph for catch_capture_matchers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Catch::MatchExpr< ArgT, MatcherT >
 

Namespaces

namespace  Catch
 

Macros

#define INTERNAL_CHECK_THAT(macroName, matcher, resultDisposition, arg)
 
#define INTERNAL_CATCH_THROWS_MATCHES(macroName, exceptionType, resultDisposition, matcher, ...)
 

Functions

void Catch::handleExceptionMatchExpr (AssertionHandler &handler, StringMatcher const &matcher, StringRef const &matcherString)
 
template<typename ArgT , typename MatcherT >
auto Catch::makeMatchExpr (ArgT const &arg, MatcherT const &matcher, StringRef const &matcherString) -> MatchExpr< ArgT, MatcherT >
 

Macro Definition Documentation

◆ INTERNAL_CATCH_THROWS_MATCHES

#define INTERNAL_CATCH_THROWS_MATCHES ( macroName,
exceptionType,
resultDisposition,
matcher,
... )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(exceptionType) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
if( catchAssertionHandler.allowThrows() ) \
try { \
static_cast<void>(__VA_ARGS__ ); \
catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
} \
catch( exceptionType const& ex ) { \
catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher##_catch_sr ) ); \
} \
catch( ... ) { \
catchAssertionHandler.handleUnexpectedInflightException(); \
} \
else \
catchAssertionHandler.handleThrowingCallSkipped(); \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( false )
#define CATCH_INTERNAL_STRINGIFY(...)
#define CATCH_INTERNAL_LINEINFO
auto makeMatchExpr(ArgT const &arg, MatcherT const &matcher, StringRef const &matcherString) -> MatchExpr< ArgT, MatcherT >

Definition at line 68 of file catch_capture_matchers.h.

68#define INTERNAL_CATCH_THROWS_MATCHES( macroName, exceptionType, resultDisposition, matcher, ... ) \
69 do { \
70 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(exceptionType) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
71 if( catchAssertionHandler.allowThrows() ) \
72 try { \
73 static_cast<void>(__VA_ARGS__ ); \
74 catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
75 } \
76 catch( exceptionType const& ex ) { \
77 catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher##_catch_sr ) ); \
78 } \
79 catch( ... ) { \
80 catchAssertionHandler.handleUnexpectedInflightException(); \
81 } \
82 else \
83 catchAssertionHandler.handleThrowingCallSkipped(); \
84 INTERNAL_CATCH_REACT( catchAssertionHandler ) \
85 } while( false )

◆ INTERNAL_CHECK_THAT

#define INTERNAL_CHECK_THAT ( macroName,
matcher,
resultDisposition,
arg )
Value:
do { \
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \
} INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( false )
#define INTERNAL_CATCH_CATCH(capturer)
#define INTERNAL_CATCH_TRY

Definition at line 57 of file catch_capture_matchers.h.

57#define INTERNAL_CHECK_THAT( macroName, matcher, resultDisposition, arg ) \
58 do { \
59 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
60 INTERNAL_CATCH_TRY { \
61 catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \
62 } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
63 INTERNAL_CATCH_REACT( catchAssertionHandler ) \
64 } while( false )