Added Xcode 4 iOStest project

Updated iOS runner for Xcode for and added project
This commit is contained in:
Phil Nash
2012-02-15 08:21:02 +00:00
parent 7b449f7abe
commit 501aa8b633
6 changed files with 123 additions and 22 deletions

View File

@@ -21,6 +21,8 @@
UITextField* appName;
}
-(void) showAlert;
@end
@implementation iTchRunnerMainView
@@ -42,15 +44,8 @@
appName.textAlignment = UITextAlignmentCenter;
appName.text = [NSString stringWithFormat:@"CATCH tests"];
UIActionSheet* menu = [[UIActionSheet alloc] initWithTitle:@"Options"
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:@"Run all tests", nil];
[menu showInView: self];
[menu release];
// [self performSelector: @selector(showAlert) withObject:nil afterDelay:0.1];
[self performSelectorOnMainThread:@selector(showAlert) withObject:nil waitUntilDone:NO];
}
return self;
@@ -63,6 +58,19 @@
[super dealloc];
}
///////////////////////////////////////////////////////////////////////////////
-(void) showAlert
{
UIActionSheet* menu = [[UIActionSheet alloc] initWithTitle:@"Options"
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:@"Run all tests", nil];
[menu showInView: self];
[menu release];
}
///////////////////////////////////////////////////////////////////////////////
-(void) actionSheet: (UIActionSheet*) sheet clickedButtonAtIndex: (NSInteger) index
{
@@ -82,7 +90,7 @@
}
else
{
NSLog( @"%d failures", runner.getFailureCount() );
NSLog( @"%lu failures", runner.getFailureCount() );
appName.textColor = [[UIColor alloc] initWithRed:1 green:0.35 blue:0.35 alpha:1];
}
}