Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-09-08 10:08:07 +0200
committerMartin Hořeňovský2021-09-08 10:08:07 +0200
commitcf5ccaa9dfe98534955bedb0c98ee51c6ea763f8 (patch)
tree941e3cd5ac26ff291a00a943c547f9083d87f19d /src
parentb3a84c798380aca71f872b63121a3f93fb020746 (diff)
downloadcatch3-cf5ccaa9dfe98534955bedb0c98ee51c6ea763f8.tar.gz
AssertionResult::getMessage returns StringRef to internal string
Diffstat (limited to 'src')
-rw-r--r--src/catch2/catch_assertion_result.cpp2
-rw-r--r--src/catch2/catch_assertion_result.hpp2
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;