From 5de646c7286a08ad821f226e897de64e5c470124 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Tue, 29 Mar 2011 08:29:01 +0100 Subject: [PATCH] iPhone test runner adds OC_TEST_CASEs --- runners/iTchRunner/internal/iTchRunnerMainView.h | 3 ++- runners/iTchRunner/itChRunnerMain.mm | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/runners/iTchRunner/internal/iTchRunnerMainView.h b/runners/iTchRunner/internal/iTchRunnerMainView.h index c9d85ae0..b745c216 100644 --- a/runners/iTchRunner/internal/iTchRunnerMainView.h +++ b/runners/iTchRunner/internal/iTchRunnerMainView.h @@ -76,12 +76,13 @@ if( runner.getFailureCount() == 0 ) { - NSLog( @"%d", runner.getFailureCount() ); + NSLog( @"no failures" ); if( runner.getSuccessCount() > 0 ) appName.textColor = [[UIColor alloc] initWithRed:0.35 green:1 blue:0.35 alpha:1]; } else { + NSLog( @"%d failures", runner.getFailureCount() ); appName.textColor = [[UIColor alloc] initWithRed:1 green:0.35 blue:0.35 alpha:1]; } } diff --git a/runners/iTchRunner/itChRunnerMain.mm b/runners/iTchRunner/itChRunnerMain.mm index 5a2b51f0..88451962 100644 --- a/runners/iTchRunner/itChRunnerMain.mm +++ b/runners/iTchRunner/itChRunnerMain.mm @@ -7,11 +7,13 @@ // #import "internal/iTchRunnerAppDelegate.h" +#include "catch_objc.hpp" int main(int argc, char *argv[]) -{ - +{ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + + Catch::registerTestMethods(); int retVal = UIApplicationMain(argc, argv, nil, @"iTchRunnerAppDelegate"); [pool release]; return retVal;