More method bodies moved out of line

This commit is contained in:
Martin Hořeňovský
2017-07-19 10:13:47 +02:00
parent d7ff62430a
commit 4a1e898eae
27 changed files with 1199 additions and 795 deletions

View File

@@ -11,6 +11,10 @@
namespace Catch {
bool DecomposedExpression::isBinaryExpression() const {
return false;
}
AssertionInfo::AssertionInfo( char const * _macroName,
SourceLineInfo const& _lineInfo,
char const * _capturedExpression,
@@ -21,6 +25,30 @@ namespace Catch {
resultDisposition( _resultDisposition )
{}
void AssertionResultData::negate( bool parenthesize ) {
negated = !negated;
parenthesized = parenthesize;
if( resultType == ResultWas::Ok )
resultType = ResultWas::ExpressionFailed;
else if( resultType == ResultWas::ExpressionFailed )
resultType = ResultWas::Ok;
}
std::string const& AssertionResultData::reconstructExpression() const {
if( decomposedExpression != nullptr ) {
decomposedExpression->reconstructExpression( reconstructedExpression );
if( parenthesized ) {
reconstructedExpression.insert( 0, 1, '(' );
reconstructedExpression.append( 1, ')' );
}
if( negated ) {
reconstructedExpression.insert( 0, 1, '!' );
}
decomposedExpression = nullptr;
}
return reconstructedExpression;
}
AssertionResult::AssertionResult() {}
AssertionResult::AssertionResult( AssertionInfo const& info, AssertionResultData const& data )