mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 19:33:29 +01:00
Write single characters directly instead of as C-strings in Sonarqube
This commit is contained in:
parent
02839ba934
commit
a01073d871
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user