22 auto operator <<( std::ostream&
os, ITransientExpression
const& expr ) -> std::ostream& {
23 expr.streamReconstructedExpression(
os );
29 : m_isNegated( isNegated )
34 LazyExpression::operator bool()
const {
35 return m_transientExpression !=
nullptr;
39 if( lazyExpr.m_isNegated )
43 if( lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression() )
44 os <<
"(" << *lazyExpr.m_transientExpression <<
")";
46 os << *lazyExpr.m_transientExpression;
49 os <<
"{** error - unchecked empty expression requested **}";
59 : m_assertionInfo{ macroName, lineInfo, capturedExpression, resultDisposition },
64 m_resultCapture.
handleExpr( m_assertionInfo, expr, m_reaction );
67 m_resultCapture.
handleMessage( m_assertionInfo, resultType, message, m_reaction );
85#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
88 CATCH_ERROR(
"Test failure requires aborting test!" );
#define CATCH_BREAK_INTO_DEBUGGER()
auto allowThrows() const -> bool
void handleExpr(ExprLhs< T > const &expr)
AssertionHandler(StringRef const ¯oName, SourceLineInfo const &lineInfo, StringRef capturedExpression, ResultDisposition::Flags resultDisposition)
void handleExceptionNotThrownAsExpected()
void handleThrowingCallSkipped()
void handleUnexpectedExceptionNotThrown()
void handleUnexpectedInflightException()
void handleExceptionThrownAsExpected()
void handleMessage(ResultWas::OfType resultType, StringRef const &message)
LazyExpression(bool isNegated)
StdString::EqualsMatcher Equals(std::string const &str, CaseSensitive::Choice caseSensitivity)
IContext & getCurrentContext()
auto operator<<(std::ostream &os, LazyExpression const &lazyExpr) -> std::ostream &
std::string translateActiveException()
void handleExceptionMatchExpr(AssertionHandler &handler, std::string const &str, StringRef const &matcherString)
IResultCapture & getResultCapture()
virtual IConfigPtr const & getConfig() const =0
virtual void handleMessage(AssertionInfo const &info, ResultWas::OfType resultType, StringRef const &message, AssertionReaction &reaction)=0
virtual void handleExpr(AssertionInfo const &info, ITransientExpression const &expr, AssertionReaction &reaction)=0
virtual void handleUnexpectedExceptionNotThrown(AssertionInfo const &info, AssertionReaction &reaction)=0
virtual void handleNonExpr(AssertionInfo const &info, ResultWas::OfType resultType, AssertionReaction &reaction)=0
virtual void handleUnexpectedInflightException(AssertionInfo const &info, std::string const &message, AssertionReaction &reaction)=0