mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 22:19:25 +00:00
Made ReportConfig a value type
This commit is contained in:
parent
f606517376
commit
d2553cdc64
10 changed files with 156 additions and 134 deletions
|
@ -25,13 +25,16 @@ namespace Catch {
|
|||
INTERNAL_CATCH_REGISTER_REPORTER( "basic", BasicReporter )
|
||||
INTERNAL_CATCH_REGISTER_REPORTER( "xml", XmlReporter )
|
||||
INTERNAL_CATCH_REGISTER_REPORTER( "junit", JunitReporter )
|
||||
|
||||
|
||||
inline int Main( Config& config ) {
|
||||
|
||||
std::string reporterName = config.data().reporter.empty()
|
||||
? "basic"
|
||||
: config.data().reporter;
|
||||
Ptr<IReporter> reporter = getCurrentContext().getReporterRegistry().create( reporterName, config );
|
||||
|
||||
ReporterConfig reporterConfig( config.getName(), config.stream(), config.includeSuccessfulResults() );
|
||||
|
||||
Ptr<IReporter> reporter = getCurrentContext().getReporterRegistry().create( reporterName, reporterConfig );
|
||||
|
||||
if( !config.data().stream.empty() ) {
|
||||
if( config.data().stream[0] == '%' )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue