iPhone test runner adds OC_TEST_CASEs

This commit is contained in:
Phil Nash 2011-03-29 08:29:01 +01:00
parent 84b394ec45
commit 5de646c728
2 changed files with 6 additions and 3 deletions

View File

@ -76,12 +76,13 @@
if( runner.getFailureCount() == 0 ) if( runner.getFailureCount() == 0 )
{ {
NSLog( @"%d", runner.getFailureCount() ); NSLog( @"no failures" );
if( runner.getSuccessCount() > 0 ) if( runner.getSuccessCount() > 0 )
appName.textColor = [[UIColor alloc] initWithRed:0.35 green:1 blue:0.35 alpha:1]; appName.textColor = [[UIColor alloc] initWithRed:0.35 green:1 blue:0.35 alpha:1];
} }
else else
{ {
NSLog( @"%d failures", runner.getFailureCount() );
appName.textColor = [[UIColor alloc] initWithRed:1 green:0.35 blue:0.35 alpha:1]; appName.textColor = [[UIColor alloc] initWithRed:1 green:0.35 blue:0.35 alpha:1];
} }
} }

View File

@ -7,11 +7,13 @@
// //
#import "internal/iTchRunnerAppDelegate.h" #import "internal/iTchRunnerAppDelegate.h"
#include "catch_objc.hpp"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
Catch::registerTestMethods();
int retVal = UIApplicationMain(argc, argv, nil, @"iTchRunnerAppDelegate"); int retVal = UIApplicationMain(argc, argv, nil, @"iTchRunnerAppDelegate");
[pool release]; [pool release];
return retVal; return retVal;