mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 05:16:10 +01:00
Fixed iTChRunner
This commit is contained in:
parent
fd1cd7820d
commit
5b15c21c9c
1
.gitignore
vendored
1
.gitignore
vendored
@ -21,3 +21,4 @@ projects/XCode4/iOSTest/Build
|
|||||||
projects/XCode4/CatchSelfTest/DerivedData
|
projects/XCode4/CatchSelfTest/DerivedData
|
||||||
projects/XCode4/OCTest/DerivedData
|
projects/XCode4/OCTest/DerivedData
|
||||||
*.pyc
|
*.pyc
|
||||||
|
projects/XCode4/iOSTest/DerivedData
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
// This is a copy & paste from Catch::Runner2 to get us bootstrapped (this is due to all be
|
// This is a copy & paste from Catch::Runner2 to get us bootstrapped (this is due to all be
|
||||||
// replaced anyway)
|
// replaced anyway)
|
||||||
inline Catch::Totals runTestsForGroup( Catch::Runner& context, const Catch::TestCaseFilters& filterGroup ) {
|
inline Catch::Totals runTestsForGroup( Catch::RunContext& context, const Catch::TestCaseFilters& filterGroup ) {
|
||||||
using namespace Catch;
|
using namespace Catch;
|
||||||
Totals totals;
|
Totals totals;
|
||||||
std::vector<TestCase>::const_iterator it = getRegistryHub().getTestCaseRegistry().getAllTests().begin();
|
std::vector<TestCase>::const_iterator it = getRegistryHub().getTestCaseRegistry().getAllTests().begin();
|
||||||
@ -102,10 +102,10 @@ inline Catch::Totals runTestsForGroup( Catch::Runner& context, const Catch::Test
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
-(void) actionSheet: (UIActionSheet*) sheet clickedButtonAtIndex: (NSInteger) index
|
-(void) actionSheet: (UIActionSheet*) sheet clickedButtonAtIndex: (NSInteger) index
|
||||||
{
|
{
|
||||||
Catch::Config config;
|
Catch::Ptr<Catch::Config> config = new Catch::Config();
|
||||||
Catch::IReporter* reporter = new Catch::iTchRunnerReporter( self );
|
Catch::IReporter* reporter = new Catch::iTchRunnerReporter( self );
|
||||||
Catch::LegacyReporterAdapter* reporterAdapter = new Catch::LegacyReporterAdapter( reporter, Catch::ReporterConfig( config.stream(), config.data() ) );
|
Catch::LegacyReporterAdapter* reporterAdapter = new Catch::LegacyReporterAdapter( reporter );
|
||||||
Catch::Runner runner( config, reporterAdapter );
|
Catch::RunContext runner( config.get(), reporterAdapter );
|
||||||
|
|
||||||
|
|
||||||
std::vector<Catch::TestCaseFilters> filterGroups;
|
std::vector<Catch::TestCaseFilters> filterGroups;
|
||||||
@ -117,10 +117,12 @@ inline Catch::Totals runTestsForGroup( Catch::Runner& context, const Catch::Test
|
|||||||
std::vector<Catch::TestCaseFilters>::const_iterator it = filterGroups.begin();
|
std::vector<Catch::TestCaseFilters>::const_iterator it = filterGroups.begin();
|
||||||
std::vector<Catch::TestCaseFilters>::const_iterator itEnd = filterGroups.end();
|
std::vector<Catch::TestCaseFilters>::const_iterator itEnd = filterGroups.end();
|
||||||
|
|
||||||
for(; it != itEnd && !runner.aborting(); ++it ) {
|
std::size_t groupCount = filterGroups.size();
|
||||||
runner.testGroupStarting( it->getName() );
|
std::size_t groupIndex = 0;
|
||||||
|
for(; it != itEnd && !runner.aborting(); ++it, ++index ) {
|
||||||
|
runner.testGroupStarting( it->getName(), groupIndex, groupCount );
|
||||||
totals += runTestsForGroup( runner, *it );
|
totals += runTestsForGroup( runner, *it );
|
||||||
runner.testGroupEnded( it->getName(), totals );
|
runner.testGroupEnded( it->getName(), totals, groupIndex, groupCount );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user