Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow configuration of default reporter #978

Closed
robertlemmen opened this issue Aug 1, 2017 · 0 comments
Closed

allow configuration of default reporter #978

robertlemmen opened this issue Aug 1, 2017 · 0 comments

Comments

@robertlemmen
Copy link

setting the reporter on the cmdline is nice, but it would be good to be able to set the default one in the compilation. if only so that prove/prove6 can be used nicely, which seem to be unable to pass arguments to the thing under test....

--- /usr/include/catch.hpp      2017-08-01 15:10:43.564565422 +0100
+++ catch.hpp   2017-08-01 15:16:20.332581488 +0100
@@ -5630,9 +5630,14 @@
                 m_config->setStreamBuf( m_ofs.rdbuf() );
             }
         }
+
+#ifndef CATCH_CONFIG_DEFAULT_REPORTER
+#define CATCH_CONFIG_DEFAULT_REPORTER "console"
+#endif
+
         void makeReporter() {
             std::string reporterName = m_config->getReporterName().empty()
-                ? "console"
+                ? CATCH_CONFIG_DEFAULT_REPORTER
                 : m_config->getReporterName();
 
             m_reporter = getRegistryHub().getReporterRegistry().create( reporterName, m_config.get() );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants