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

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-05-30 15:54:35 +0200
committerMartin Hořeňovský2021-05-31 08:41:20 +0200
commita01073d87105371f4465e243fde9ae719d52f5d1 (patch)
tree54c8693837f8bf4a317c65c908582e2f63abf4f0
parent02839ba9344814af70a6a435807fc7e23b3aa6c1 (diff)
downloadcatch3-a01073d87105371f4465e243fde9ae719d52f5d1.tar.gz
Write single characters directly instead of as C-strings in Sonarqube
-rw-r--r--src/catch2/reporters/catch_reporter_sonarqube.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/catch2/reporters/catch_reporter_sonarqube.cpp b/src/catch2/reporters/catch_reporter_sonarqube.cpp
index 30e9af95..a450a806 100644
--- a/src/catch2/reporters/catch_reporter_sonarqube.cpp
+++ b/src/catch2/reporters/catch_reporter_sonarqube.cpp
@@ -113,26 +113,26 @@ namespace Catch {
XmlWriter::ScopedElement e = xml.scopedElement(elementName);
ReusableStringStream messageRss;
- messageRss << result.getTestMacroName() << "(" << result.getExpression() << ")";
+ messageRss << result.getTestMacroName() << '(' << result.getExpression() << ')';
xml.writeAttribute("message"_sr, messageRss.str());
ReusableStringStream textRss;
if (stats.totals.assertions.total() > 0) {
textRss << "FAILED:\n";
if (result.hasExpression()) {
- textRss << "\t" << result.getExpressionInMacro() << "\n";
+ textRss << '\t' << result.getExpressionInMacro() << '\n';
}
if (result.hasExpandedExpression()) {
- textRss << "with expansion:\n\t" << result.getExpandedExpression() << "\n";
+ textRss << "with expansion:\n\t" << result.getExpandedExpression() << '\n';
}
}
if (!result.getMessage().empty())
- textRss << result.getMessage() << "\n";
+ textRss << result.getMessage() << '\n';
for (auto const& msg : stats.infoMessages)
if (msg.type == ResultWas::Info)
- textRss << msg.message << "\n";
+ textRss << msg.message << '\n';
textRss << "at " << result.getSourceInfo();
xml.writeText(textRss.str(), XmlFormatting::Newline);