diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-06-04 15:35:57 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-06-04 15:35:57 +0000 |
commit | 6c2f14bc180418cfad42582be6ef1cc6a5413368 (patch) | |
tree | 3b2b46d62d4889ba0e57f0fcbbc27e400ab5a22a /UnitTesting/GTMIPhoneUnitTestDelegate.m | |
parent | 8ceff783b1fd62b67c7a6301228af9f7266e183b (diff) |
[Author: dmaclach]
Turns on the undeclared-selector warning. This may cause builds to fail if they are using
our configs. Also cleaned up some whitespace issues.
R=thomasvl
DELTA=94 (71 added, 22 deleted, 1 changed)
Diffstat (limited to 'UnitTesting/GTMIPhoneUnitTestDelegate.m')
-rw-r--r-- | UnitTesting/GTMIPhoneUnitTestDelegate.m | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/UnitTesting/GTMIPhoneUnitTestDelegate.m b/UnitTesting/GTMIPhoneUnitTestDelegate.m index 9f2457d..dc4b182 100644 --- a/UnitTesting/GTMIPhoneUnitTestDelegate.m +++ b/UnitTesting/GTMIPhoneUnitTestDelegate.m @@ -6,9 +6,9 @@ // Licensed under the Apache License, Version 2.0 (the "License"); you may not // use this file except in compliance with the License. You may obtain a copy // of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -27,6 +27,13 @@ #import <UIKit/UIKit.h> #import "GTMSenTestCase.h" +@interface UIApplication (GTMIPhoneUnitTestDelegate) + +// SPI that we need to exti cleanly with a value. +- (void)_terminateWithStatus:(int)status; + +@end + @implementation GTMIPhoneUnitTestDelegate // Run through all the registered classes and run test methods on any @@ -34,7 +41,7 @@ // test completion. - (void)applicationDidFinishLaunching:(UIApplication *)application { [self runTests]; - + if (!getenv("GTM_DISABLE_TERMINATION")) { // To help using xcodebuild, make the exit status 0/1 to signal the tests // success/failure. @@ -87,7 +94,7 @@ if ([invocations count]) { NSInvocation *invocation; GTM_FOREACH_OBJECT(invocation, invocations) { - GTMTestCase *testCase + GTMTestCase *testCase = [[currClass alloc] initWithInvocation:invocation]; BOOL failed = NO; NSDate *caseStartDate = [NSDate date]; @@ -128,14 +135,14 @@ @"Executed %d tests, with %d failures (%d " @"unexpected) in %0.3f (%0.3f) seconds\n\n", fixtureName, fixtureEndDate, - fixtureSuccesses + fixtureFailures, + fixtureSuccesses + fixtureFailures, fixtureFailures, fixtureFailures, fixtureEndTime, fixtureEndTime]; - + fputs([fixtureEndString UTF8String], stderr); fflush(stderr); totalSuccesses_ += fixtureSuccesses; - totalFailures_ += fixtureFailures; + totalFailures_ += fixtureFailures; } [pool release]; } @@ -147,7 +154,7 @@ @"Executed %d tests, with %d failures (%d " @"unexpected) in %0.3f (%0.3f) seconds\n\n", suiteName, suiteEndDate, - totalSuccesses_ + totalFailures_, + totalSuccesses_ + totalFailures_, totalFailures_, totalFailures_, suiteEndTime, suiteEndTime]; fputs([suiteEndString UTF8String], stderr); |