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

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2023-08-14 12:41:52 +0200
committerMartin Hořeňovský2023-08-14 12:41:52 +0200
commite09de7222c47ba1bb589985246d5d33e5f01b8fd (patch)
treef6fa0996ffb155a4bb142473ef06521b4f780cef
parenta64ff326bfa6c72e83bfec0b47cf04ad9f4a5cc0 (diff)
downloadcatch3-e09de7222c47ba1bb589985246d5d33e5f01b8fd.tar.gz
Small cleanup in XML reporter
-rw-r--r--src/catch2/reporters/catch_reporter_xml.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/catch2/reporters/catch_reporter_xml.cpp b/src/catch2/reporters/catch_reporter_xml.cpp
index f80cd247..35a3028e 100644
--- a/src/catch2/reporters/catch_reporter_xml.cpp
+++ b/src/catch2/reporters/catch_reporter_xml.cpp
@@ -234,26 +234,23 @@ namespace Catch {
}
void XmlReporter::benchmarkEnded(BenchmarkStats<> const& benchmarkStats) {
- m_xml.startElement("mean")
+ m_xml.scopedElement("mean")
.writeAttribute("value"_sr, benchmarkStats.mean.point.count())
.writeAttribute("lowerBound"_sr, benchmarkStats.mean.lower_bound.count())
.writeAttribute("upperBound"_sr, benchmarkStats.mean.upper_bound.count())
.writeAttribute("ci"_sr, benchmarkStats.mean.confidence_interval);
- m_xml.endElement();
- m_xml.startElement("standardDeviation")
+ m_xml.scopedElement("standardDeviation")
.writeAttribute("value"_sr, benchmarkStats.standardDeviation.point.count())
.writeAttribute("lowerBound"_sr, benchmarkStats.standardDeviation.lower_bound.count())
.writeAttribute("upperBound"_sr, benchmarkStats.standardDeviation.upper_bound.count())
.writeAttribute("ci"_sr, benchmarkStats.standardDeviation.confidence_interval);
- m_xml.endElement();
- m_xml.startElement("outliers")
+ m_xml.scopedElement("outliers")
.writeAttribute("variance"_sr, benchmarkStats.outlierVariance)
.writeAttribute("lowMild"_sr, benchmarkStats.outliers.low_mild)
.writeAttribute("lowSevere"_sr, benchmarkStats.outliers.low_severe)
.writeAttribute("highMild"_sr, benchmarkStats.outliers.high_mild)
.writeAttribute("highSevere"_sr, benchmarkStats.outliers.high_severe);
m_xml.endElement();
- m_xml.endElement();
}
void XmlReporter::benchmarkFailed(StringRef error) {