mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-18 19:05:40 +02:00
Refactoring towards interface based config
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
namespace Catch {
|
||||
class XmlReporter : public SharedImpl<IReporter> {
|
||||
public:
|
||||
XmlReporter( const ReporterConfig& config ) : m_config( config ) {}
|
||||
XmlReporter( ReporterConfig const& config ) : m_config( config ) {}
|
||||
|
||||
static std::string getDescription() {
|
||||
return "Reports test results as an XML document";
|
||||
@@ -32,8 +32,8 @@ namespace Catch {
|
||||
virtual void StartTesting() {
|
||||
m_xml = XmlWriter( m_config.stream() );
|
||||
m_xml.startElement( "Catch" );
|
||||
if( !m_config.name().empty() )
|
||||
m_xml.writeAttribute( "name", m_config.name() );
|
||||
if( !m_config.fullConfig()->name().empty() )
|
||||
m_xml.writeAttribute( "name", m_config.fullConfig()->name() );
|
||||
}
|
||||
|
||||
virtual void EndTesting( const Totals& totals ) {
|
||||
@@ -76,7 +76,7 @@ namespace Catch {
|
||||
}
|
||||
|
||||
virtual void Result( const Catch::AssertionResult& assertionResult ) {
|
||||
if( !m_config.includeSuccessfulResults() && assertionResult.getResultType() == ResultWas::Ok )
|
||||
if( !m_config.fullConfig()->includeSuccessfulResults() && assertionResult.getResultType() == ResultWas::Ok )
|
||||
return;
|
||||
|
||||
if( assertionResult.hasExpression() ) {
|
||||
|
Reference in New Issue
Block a user