lazily stringify expressions

This commit is contained in:
Mickey Rose
2017-01-09 13:23:10 +01:00
committed by Martin Hořeňovský
parent 3b7511e564
commit a1e9b841ff
7 changed files with 223 additions and 110 deletions

View File

@@ -72,7 +72,7 @@ namespace Catch {
}
std::string AssertionResult::getExpandedExpression() const {
return m_resultData.reconstructedExpression;
return m_resultData.reconstructExpression();
}
std::string AssertionResult::getMessage() const {
@@ -86,6 +86,14 @@ namespace Catch {
return m_info.macroName;
}
void AssertionResult::discardDecomposedExpression() const {
m_resultData.decomposedExpression = CATCH_NULL;
}
void AssertionResult::expandDecomposedExpression() const {
m_resultData.reconstructExpression();
}
} // end namespace Catch
#endif // TWOBLUECUBES_CATCH_ASSERTIONRESULT_HPP_INCLUDED