Refactored most handle() calls to more specific/ descriptive calls

This commit is contained in:
Phil Nash
2017-11-24 19:15:46 +00:00
parent 2800adba25
commit db44964e27
6 changed files with 54 additions and 29 deletions

View File

@@ -48,21 +48,30 @@ namespace Catch {
ResultDisposition::Flags resultDisposition );
~AssertionHandler();
void handle( ITransientExpression const& expr );
template<typename T>
void handle( ExprLhs<T> const& expr ) {
handle( expr.makeUnaryExpr() );
void handleExpr( ExprLhs<T> const& expr ) {
handleExpr( expr.makeUnaryExpr() );
}
void handle( ResultWas::OfType resultType );
void handleExpr( ITransientExpression const& expr );
void handle( ResultWas::OfType resultType, StringRef const& message );
void handle( ResultWas::OfType resultType, ITransientExpression const* expr, bool negated );
void handle( AssertionResultData const& resultData, ITransientExpression const* expr );
auto allowThrows() const -> bool;
void handleExceptionThrownAsExpected();
void handleUnexpectedExceptionNotThrown();
void handleExceptionNotThrownAsExpected();
void handleThrowingCallSkipped();
void handleUnexpectedInflightException();
void complete();
void setCompleted();
void useActiveException();
// query
auto allowThrows() const -> bool;
private:
void handle( ResultWas::OfType resultType );
};
void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString );