mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +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;
|
||||
|
||||
}
|
||||
|
@ -197,6 +197,8 @@ namespace Catch
|
||||
// static std::string getDescription();
|
||||
|
||||
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;
|
||||
@ -221,6 +223,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();
|
||||
}
|
||||
|
@ -31,6 +31,10 @@ namespace Catch {
|
||||
return prefs;
|
||||
|
||||
}
|
||||
|
||||
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