aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/GTMIPhoneUnitTestMain.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-11-29 21:00:23 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-11-29 21:00:23 +0000
commitc571385c00031d740b67317cb677cf193300f614 (patch)
treec6341b44aca37ddf037354f52ae81350352c8a19 /UnitTesting/GTMIPhoneUnitTestMain.m
parent5b52a35992f6bbd427eca4d419721e5354b0262d (diff)
[Author: thomasvl]
Move a bunch of tests over onto the GTM test base class. Fetch some test images from the bundle the test is compiled into instead of assuming main app. Change the default iOS logging directory to just be the documents directory since it should work for all iOS versions. Add initial support for using SenTestingKit instead of our custom version to allow the Xcode 4 UI for unittesting. Add a target for using SenTestingKit. Add a shell app for the TEST_HOST for SenTestingKit usage (since there are UI tests, we need to use a real app and not the octest binary). R=dmaclach DELTA=517 (482 added, 9 deleted, 26 changed)
Diffstat (limited to 'UnitTesting/GTMIPhoneUnitTestMain.m')
-rw-r--r--UnitTesting/GTMIPhoneUnitTestMain.m10
1 files changed, 8 insertions, 2 deletions
diff --git a/UnitTesting/GTMIPhoneUnitTestMain.m b/UnitTesting/GTMIPhoneUnitTestMain.m
index 2a0a70d..b7af4ba 100644
--- a/UnitTesting/GTMIPhoneUnitTestMain.m
+++ b/UnitTesting/GTMIPhoneUnitTestMain.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,7 +27,13 @@
// afterwards.
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+#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);
+#else
int retVal = UIApplicationMain(argc, argv, nil, @"GTMIPhoneUnitTestDelegate");
+#endif
[pool release];
return retVal;
}