mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Allow specifying default reporter at compile time
This commit is contained in:
parent
11295a2663
commit
5da76bb7be
@ -32,10 +32,14 @@ namespace Catch {
|
|||||||
return reporter;
|
return reporter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CATCH_CONFIG_DEFAULT_REPORTER
|
||||||
|
#define CATCH_CONFIG_DEFAULT_REPORTER "console"
|
||||||
|
#endif
|
||||||
|
|
||||||
IStreamingReporterPtr makeReporter( std::shared_ptr<Config> const& config ) {
|
IStreamingReporterPtr makeReporter( std::shared_ptr<Config> const& config ) {
|
||||||
auto const& reporterNames = config->getReporterNames();
|
auto const& reporterNames = config->getReporterNames();
|
||||||
if( reporterNames.empty() )
|
if( reporterNames.empty() )
|
||||||
return createReporter( "console", config );
|
return createReporter(CATCH_CONFIG_DEFAULT_REPORTER, config );
|
||||||
|
|
||||||
IStreamingReporterPtr reporter;
|
IStreamingReporterPtr reporter;
|
||||||
for( auto const& name : reporterNames )
|
for( auto const& name : reporterNames )
|
||||||
|
Loading…
Reference in New Issue
Block a user