mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Moved "no test cases matched" message to reporter
This commit is contained in:
parent
6d56d71318
commit
7542685a2f
@ -70,7 +70,7 @@ namespace Catch {
|
||||
}
|
||||
}
|
||||
if( testsRunForGroup == 0 && !filterGroup.getName().empty() )
|
||||
std::cerr << "\n[No test cases matched with: " << filterGroup.getName() << "]" << std::endl;
|
||||
m_reporter->noMatchingTestCases( filterGroup.getName() );
|
||||
return totals;
|
||||
|
||||
}
|
||||
|
@ -198,6 +198,8 @@ namespace Catch
|
||||
|
||||
virtual ReporterPreferences getPreferences() const = 0;
|
||||
|
||||
virtual void noMatchingTestCases( std::string const& spec ) = 0;
|
||||
|
||||
virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0;
|
||||
virtual void testGroupStarting( GroupInfo const& groupInfo ) = 0;
|
||||
|
||||
@ -222,6 +224,8 @@ namespace Catch
|
||||
|
||||
virtual ~StreamingReporterBase();
|
||||
|
||||
virtual void noMatchingTestCases( std::string const& ) {}
|
||||
|
||||
virtual void testRunStarting( TestRunInfo const& _testRunInfo ) {
|
||||
testRunInfo = _testRunInfo;
|
||||
}
|
||||
@ -390,6 +394,7 @@ namespace Catch
|
||||
return prefs;
|
||||
}
|
||||
|
||||
virtual void noMatchingTestCases( std::string const& ) {}
|
||||
virtual void testRunStarting( TestRunInfo const& ) {
|
||||
m_legacyReporter->StartTesting();
|
||||
}
|
||||
|
@ -32,6 +32,10 @@ namespace Catch {
|
||||
|
||||
}
|
||||
|
||||
virtual void noMatchingTestCases( std::string const& spec ) {
|
||||
stream << "No test cases matched '" << spec << "'" << std::endl;
|
||||
}
|
||||
|
||||
virtual void assertionStarting( AssertionInfo const& ) {
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ namespace Catch {
|
||||
return ReporterPreferences();
|
||||
}
|
||||
|
||||
virtual void noMatchingTestCases( std::string const& ) {}
|
||||
virtual void testRunStarting( TestRunInfo const& ) {}
|
||||
virtual void testGroupStarting( GroupInfo const& ) {}
|
||||
virtual void testCaseStarting( TestCaseInfo const& ) {}
|
||||
|
Loading…
Reference in New Issue
Block a user