mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
First cut of iOS test runner
This commit is contained in:
parent
9e33fdd465
commit
c8f12e1175
@ -41,11 +41,7 @@
|
|||||||
[appName.textColor release];
|
[appName.textColor release];
|
||||||
appName.textAlignment = UITextAlignmentCenter;
|
appName.textAlignment = UITextAlignmentCenter;
|
||||||
|
|
||||||
NSString* appNameStr = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
|
appName.text = [NSString stringWithFormat:@"CATCH tests"];
|
||||||
if( [appNameStr isEqualToString:@"iTchRunner"] )
|
|
||||||
appName.text = @"iTchRunner self-tests";
|
|
||||||
else
|
|
||||||
appName.text = [NSString stringWithFormat:@"CATCH tests for %@", appNameStr];
|
|
||||||
|
|
||||||
|
|
||||||
UIActionSheet* menu = [[UIActionSheet alloc] initWithTitle:@"Options"
|
UIActionSheet* menu = [[UIActionSheet alloc] initWithTitle:@"Options"
|
||||||
@ -77,6 +73,17 @@
|
|||||||
config.getReporter()->StartGroup( "" );
|
config.getReporter()->StartGroup( "" );
|
||||||
runner.runAll( true );
|
runner.runAll( true );
|
||||||
config.getReporter()->EndGroup( "", runner.getSuccessCount(), runner.getFailureCount() );
|
config.getReporter()->EndGroup( "", runner.getSuccessCount(), runner.getFailureCount() );
|
||||||
|
|
||||||
|
if( runner.getFailureCount() == 0 )
|
||||||
|
{
|
||||||
|
NSLog( @"%d", runner.getFailureCount() );
|
||||||
|
if( runner.getSuccessCount() > 0 )
|
||||||
|
appName.textColor = [[UIColor alloc] initWithRed:0.35 green:1 blue:0.35 alpha:1];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
appName.textColor = [[UIColor alloc] initWithRed:1 green:0.35 blue:0.35 alpha:1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user