mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Fix xml reporter crashing when a benchmark failed.
This commit is contained in:
parent
425957dc63
commit
7e7ab0e28b
@ -220,10 +220,13 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
|
#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
|
||||||
void XmlReporter::benchmarkStarting(BenchmarkInfo const &info) {
|
void XmlReporter::benchmarkPreparing(std::string const& name) {
|
||||||
m_xml.startElement("BenchmarkResults")
|
m_xml.startElement("BenchmarkResults")
|
||||||
.writeAttribute("name", info.name)
|
.writeAttribute("name", name);
|
||||||
.writeAttribute("samples", info.samples)
|
}
|
||||||
|
|
||||||
|
void XmlReporter::benchmarkStarting(BenchmarkInfo const &info) {
|
||||||
|
m_xml.writeAttribute("samples", info.samples)
|
||||||
.writeAttribute("resamples", info.resamples)
|
.writeAttribute("resamples", info.resamples)
|
||||||
.writeAttribute("iterations", info.iterations)
|
.writeAttribute("iterations", info.iterations)
|
||||||
.writeAttribute("clockResolution", static_cast<uint64_t>(info.clockResolution))
|
.writeAttribute("clockResolution", static_cast<uint64_t>(info.clockResolution))
|
||||||
|
@ -51,6 +51,7 @@ namespace Catch {
|
|||||||
void testRunEnded(TestRunStats const& testRunStats) override;
|
void testRunEnded(TestRunStats const& testRunStats) override;
|
||||||
|
|
||||||
#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
|
#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
|
||||||
|
void benchmarkPreparing(std::string const& name) override;
|
||||||
void benchmarkStarting(BenchmarkInfo const&) override;
|
void benchmarkStarting(BenchmarkInfo const&) override;
|
||||||
void benchmarkEnded(BenchmarkStats<> const&) override;
|
void benchmarkEnded(BenchmarkStats<> const&) override;
|
||||||
void benchmarkFailed(std::string const&) override;
|
void benchmarkFailed(std::string const&) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user