diff options
| author | Martin Hořeňovský | 2021-05-30 15:54:35 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-05-31 08:41:20 +0200 |
| commit | a01073d87105371f4465e243fde9ae719d52f5d1 (patch) | |
| tree | 54c8693837f8bf4a317c65c908582e2f63abf4f0 /src | |
| parent | 02839ba9344814af70a6a435807fc7e23b3aa6c1 (diff) | |
| download | catch3-a01073d87105371f4465e243fde9ae719d52f5d1.tar.gz | |
Write single characters directly instead of as C-strings in Sonarqube
Diffstat (limited to 'src')
| -rw-r--r-- | src/catch2/reporters/catch_reporter_sonarqube.cpp | 10 |
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); |