lazily stringify expressions

This commit is contained in:
Mickey Rose authored and Martin Hořeňovský committed 2017-01-14 21:56:16 +01:00
1 parent 3b7511e564
commit a1e9b841ff
7 files changed
+223 -110

No files matched your search

+9 -1
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