Tags beginning with a non alpha-numeric character are now disallowed.
Added !throws special tag which denotes a test case to be skipped when run with -e (the idea being that the test case is expected to throw an exception which is not caught within a XXX_THROWS assertion).
This commit is contained in:
parent
c5406a25bf
commit
20cad7cb1d
18 changed files with 312 additions and 244 deletions
|
@ -50,29 +50,29 @@ namespace Catch {
|
|||
}
|
||||
return totals;
|
||||
}
|
||||
|
||||
Totals runTestsForGroup( RunContext& context, const TestCaseFilters& filterGroup ) {
|
||||
Totals runTestsForGroup( RunContext& context, TestCaseFilters const& filterGroup ) {
|
||||
Totals totals;
|
||||
std::vector<TestCase>::const_iterator it = getRegistryHub().getTestCaseRegistry().getAllTests().begin();
|
||||
std::vector<TestCase>::const_iterator itEnd = getRegistryHub().getTestCaseRegistry().getAllTests().end();
|
||||
|
||||
std::vector<TestCase> testCases;
|
||||
getRegistryHub().getTestCaseRegistry().getFilteredTests( filterGroup, *m_config, testCases );
|
||||
|
||||
int testsRunForGroup = 0;
|
||||
for(; it != itEnd; ++it ) {
|
||||
if( filterGroup.shouldInclude( *it ) ) {
|
||||
testsRunForGroup++;
|
||||
if( m_testsAlreadyRun.find( *it ) == m_testsAlreadyRun.end() ) {
|
||||
for( std::vector<TestCase>::const_iterator it = testCases.begin(), itEnd = testCases.end();
|
||||
it != itEnd;
|
||||
++it ) {
|
||||
testsRunForGroup++;
|
||||
if( m_testsAlreadyRun.find( *it ) == m_testsAlreadyRun.end() ) {
|
||||
|
||||
if( context.aborting() )
|
||||
break;
|
||||
if( context.aborting() )
|
||||
break;
|
||||
|
||||
totals += context.runTest( *it );
|
||||
m_testsAlreadyRun.insert( *it );
|
||||
}
|
||||
totals += context.runTest( *it );
|
||||
m_testsAlreadyRun.insert( *it );
|
||||
}
|
||||
}
|
||||
if( testsRunForGroup == 0 && !filterGroup.getName().empty() )
|
||||
m_reporter->noMatchingTestCases( filterGroup.getName() );
|
||||
return totals;
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue