Function handleExpr

Synopsis

#include <include/internal/catch_run_context.h>

void handleExpr(AssertionInfo const &info, ITransientExpression const &expr, AssertionReaction &reaction) override

Description

No description yet.

Source

Lines 431-453 in include/internal/catch_run_context.cpp. Line 55 in include/internal/catch_run_context.h.

void RunContext::handleExpr(
    AssertionInfo const& info,
    ITransientExpression const& expr,
    AssertionReaction& reaction
) {
    m_reporter->assertionStarting( info );
    bool negated = isFalseTest( info.resultDisposition );
    bool result = expr.getResult() != negated;
    if( result ) {
        if (!m_includeSuccessfulResults) {
            assertionPassed();
        }
        else {
            reportExpr(info, ResultWas::Ok, &expr, negated);
        }
    }
    else {
        reportExpr(info, ResultWas::ExpressionFailed, &expr, negated );
        populateReaction( reaction );
    }
}





Add Discussion as Guest

Log in