mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
parent
ba0a09fd9e
commit
b435e0d7c7
@ -51,6 +51,12 @@ Catch does not use ```std::cout```, ```std::cerr``` and ```std::clog``` directly
|
||||
|
||||
This can be useful on certain platforms that do not provide the standard iostreams, such as certain embedded systems.
|
||||
|
||||
# Default reporter
|
||||
|
||||
CATCH_CONFIG_DEFAULT_REPORTER <reporter>
|
||||
|
||||
The default reporter (reporter used when no reporters are explicitly specified) can be overriden during compilation time by using the above macro. Note that desired value of the macro is a C string and quotes have to be escaped during compilation: `clang++ test.cpp -DCATCH_CONFIG_DEFAULT_REPORTER=\"xml\"`.
|
||||
|
||||
# C++ conformance toggles
|
||||
|
||||
CATCH_CONFIG_CPP11_NULLPTR // nullptr is supported?
|
||||
|
@ -31,10 +31,14 @@ namespace Catch {
|
||||
return reporter;
|
||||
}
|
||||
|
||||
#if !defined(CATCH_CONFIG_DEFAULT_REPORTER)
|
||||
#define CATCH_CONFIG_DEFAULT_REPORTER "console"
|
||||
#endif
|
||||
|
||||
Ptr<IStreamingReporter> makeReporter( Ptr<Config> const& config ) {
|
||||
std::vector<std::string> reporters = config->getReporterNames();
|
||||
if( reporters.empty() )
|
||||
reporters.push_back( "console" );
|
||||
reporters.push_back( CATCH_CONFIG_DEFAULT_REPORTER );
|
||||
|
||||
Ptr<IStreamingReporter> reporter;
|
||||
for( std::vector<std::string>::const_iterator it = reporters.begin(), itEnd = reporters.end();
|
||||
|
Loading…
Reference in New Issue
Block a user