diff options
| author | Martin Hořeňovský | 2021-09-08 10:08:07 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-09-08 10:08:07 +0200 |
| commit | cf5ccaa9dfe98534955bedb0c98ee51c6ea763f8 (patch) | |
| tree | 941e3cd5ac26ff291a00a943c547f9083d87f19d /src/catch2 | |
| parent | b3a84c798380aca71f872b63121a3f93fb020746 (diff) | |
| download | catch3-cf5ccaa9dfe98534955bedb0c98ee51c6ea763f8.tar.gz | |
AssertionResult::getMessage returns StringRef to internal string
Diffstat (limited to 'src/catch2')
| -rw-r--r-- | src/catch2/catch_assertion_result.cpp | 2 | ||||
| -rw-r--r-- | src/catch2/catch_assertion_result.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/catch2/catch_assertion_result.cpp b/src/catch2/catch_assertion_result.cpp index 4e160915..04e00d26 100644 --- a/src/catch2/catch_assertion_result.cpp +++ b/src/catch2/catch_assertion_result.cpp @@ -91,7 +91,7 @@ namespace Catch { : expr; } - std::string AssertionResult::getMessage() const { + StringRef AssertionResult::getMessage() const { return m_resultData.message; } SourceLineInfo AssertionResult::getSourceInfo() const { diff --git a/src/catch2/catch_assertion_result.hpp b/src/catch2/catch_assertion_result.hpp index 0afb0e02..3008664c 100644 --- a/src/catch2/catch_assertion_result.hpp +++ b/src/catch2/catch_assertion_result.hpp @@ -46,7 +46,7 @@ namespace Catch { std::string getExpressionInMacro() const; bool hasExpandedExpression() const; std::string getExpandedExpression() const; - std::string getMessage() const; + StringRef getMessage() const; SourceLineInfo getSourceInfo() const; StringRef getTestMacroName() const; |