Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-08-10 16:24:31 +0200
committerMartin Hořeňovský2017-08-10 16:24:31 +0200
commit5da76bb7be3b05c83b70bbd6e9a766a14cc54e6f (patch)
treef5a13c73599fb11aa0b15953ce93fa50bcd70285 /include
parent11295a26634fc06dc1d8ccb2aeb1a7df1150966b (diff)
downloadcatch3-5da76bb7be3b05c83b70bbd6e9a766a14cc54e6f.tar.gz
Allow specifying default reporter at compile time
Diffstat (limited to 'include')
-rw-r--r--include/catch_session.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/catch_session.hpp b/include/catch_session.hpp
index d31896c7..61b99049 100644
--- a/include/catch_session.hpp
+++ b/include/catch_session.hpp
@@ -32,10 +32,14 @@ namespace Catch {
return reporter;
}
+#ifndef CATCH_CONFIG_DEFAULT_REPORTER
+#define CATCH_CONFIG_DEFAULT_REPORTER "console"
+#endif
+
IStreamingReporterPtr makeReporter( std::shared_ptr<Config> const& config ) {
auto const& reporterNames = config->getReporterNames();
if( reporterNames.empty() )
- return createReporter( "console", config );
+ return createReporter(CATCH_CONFIG_DEFAULT_REPORTER, config );
IStreamingReporterPtr reporter;
for( auto const& name : reporterNames )