From 9f8b848fe59ff9ec46093f87842a9413bce4ee92 Mon Sep 17 00:00:00 2001 From: Jozef Grajciar Date: Tue, 9 Oct 2018 10:43:24 +0200 Subject: [PATCH] XmlReporter: add information about rng-seed Xml result of reported will now contain value of rng-seed in case it is not zero. The value will be stored in element Randomness and it's attribute seed. Relates to #1402 --- include/reporters/catch_reporter_xml.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/reporters/catch_reporter_xml.cpp b/include/reporters/catch_reporter_xml.cpp index c3200537..902014cf 100644 --- a/include/reporters/catch_reporter_xml.cpp +++ b/include/reporters/catch_reporter_xml.cpp @@ -55,6 +55,9 @@ namespace Catch { m_xml.startElement( "Catch" ); if( !m_config->name().empty() ) m_xml.writeAttribute( "name", m_config->name() ); + if( m_config->rngSeed() != 0 ) + m_xml.scopedElement( "Randomness" ) + .writeAttribute( "seed", m_config->rngSeed() ); } void XmlReporter::testGroupStarting( GroupInfo const& groupInfo ) {