Stop checking verbosities up-front

This commit is contained in:
Martin Hořeňovský
2019-06-17 14:43:10 +02:00
parent c582e351ce
commit 0f39438aae
6 changed files with 1 additions and 39 deletions

View File

@@ -35,18 +35,12 @@ namespace Catch {
stream( _config.stream() )
{
m_reporterPrefs.shouldRedirectStdOut = false;
if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) )
CATCH_ERROR( "Verbosity level not supported by this reporter" );
}
ReporterPreferences getPreferences() const override {
return m_reporterPrefs;
}
static std::set<Verbosity> getSupportedVerbosities() {
return { Verbosity::Normal };
}
~StreamingReporterBase() override = default;
void noMatchingTestCases(std::string const&) override {}
@@ -153,8 +147,6 @@ namespace Catch {
stream( _config.stream() )
{
m_reporterPrefs.shouldRedirectStdOut = false;
if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) )
CATCH_ERROR( "Verbosity level not supported by this reporter" );
}
~CumulativeReporterBase() override = default;
@@ -162,10 +154,6 @@ namespace Catch {
return m_reporterPrefs;
}
static std::set<Verbosity> getSupportedVerbosities() {
return { Verbosity::Normal };
}
void testRunStarting( TestRunInfo const& ) override {}
void testGroupStarting( GroupInfo const& ) override {}
@@ -271,8 +259,6 @@ namespace Catch {
struct TestEventListenerBase : StreamingReporterBase<TestEventListenerBase> {
TestEventListenerBase( ReporterConfig const& _config );
static std::set<Verbosity> getSupportedVerbosities();
void assertionStarting(AssertionInfo const&) override;
bool assertionEnded(AssertionStats const&) override;
};