diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2013-07-09 15:00:19 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2013-07-09 15:00:19 +0000 |
commit | 945e1a3f1b580e2e090c61bc7144403370cb0fe3 (patch) | |
tree | 446395a7eff3fc001d9cf0382c2e4ab0b19f4c45 /UnitTesting/GTMIPhoneUnitTestMain.m | |
parent | 3899877e6114e5dbf353608ea62f5e01e226346b (diff) |
Adding support for unit tests using ARC.
DELTA=11 (9 added, 0 deleted, 2 changed)
Diffstat (limited to 'UnitTesting/GTMIPhoneUnitTestMain.m')
-rw-r--r-- | UnitTesting/GTMIPhoneUnitTestMain.m | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/UnitTesting/GTMIPhoneUnitTestMain.m b/UnitTesting/GTMIPhoneUnitTestMain.m index b7af4ba..6bfc711 100644 --- a/UnitTesting/GTMIPhoneUnitTestMain.m +++ b/UnitTesting/GTMIPhoneUnitTestMain.m @@ -26,14 +26,23 @@ // SenTestCase, outputs results and test run time, and terminates right // afterwards. int main(int argc, char *argv[]) { + int retVal; +#if __has_feature(objc_arc) + @autoreleasepool { +#else NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; +#endif #if GTM_IPHONE_USE_SENTEST // Is using SenTest, just create a dummy app that can be used as the // TEST_HOST. - int retVal = UIApplicationMain(argc, argv, nil, nil); + retVal = UIApplicationMain(argc, argv, nil, nil); #else - int retVal = UIApplicationMain(argc, argv, nil, @"GTMIPhoneUnitTestDelegate"); + retVal = UIApplicationMain(argc, argv, nil, @"GTMIPhoneUnitTestDelegate"); #endif +#if __has_feature(objc_arc) + } +#else [pool release]; +#endif return retVal; } |