diff options
| author | Phil Nash | 2017-08-09 09:08:33 +0100 |
|---|---|---|
| committer | Phil Nash | 2017-08-09 09:08:33 +0100 |
| commit | 8c95a81448d8216d8d133f6e98f3aae81c44cb76 (patch) | |
| tree | c86eb83d75631013300be49d46c22a5551920259 /include/internal/catch_assertionresult.cpp | |
| parent | 7df290dfc1a064d087f5252bc1aac5e832a16d7e (diff) | |
| download | catch3-8c95a81448d8216d8d133f6e98f3aae81c44cb76.tar.gz | |
Removed all (well, most) of the redundant, ResultBuilder-based, code
Diffstat (limited to 'include/internal/catch_assertionresult.cpp')
| -rw-r--r-- | include/internal/catch_assertionresult.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/include/internal/catch_assertionresult.cpp b/include/internal/catch_assertionresult.cpp index 877f53bf..04402000 100644 --- a/include/internal/catch_assertionresult.cpp +++ b/include/internal/catch_assertionresult.cpp @@ -10,44 +10,15 @@ namespace Catch { - - bool DecomposedExpression::isBinaryExpression() const { - return false; - } - - 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 AssertionResultData::reconstructExpression() const { if( reconstructedExpression.empty() ) { - - // Try new LazyExpression first... if( lazyExpression ) { // !TBD Use stringstream for now, but rework above to pass stream in std::ostringstream oss; oss << lazyExpression; reconstructedExpression = oss.str(); } - - // ... if not, fall back to decomposedExpression - else 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; } @@ -115,12 +86,4 @@ namespace Catch { return m_info.macroName.c_str(); } - void AssertionResult::discardDecomposedExpression() const { - m_resultData.decomposedExpression = nullptr; - } - - void AssertionResult::expandDecomposedExpression() const { - m_resultData.reconstructExpression(); - } - } // end namespace Catch |