-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
GHUnitIPhoneTestMain.m
40 lines (32 loc) · 956 Bytes
/
GHUnitIPhoneTestMain.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// GHUnitIPhoneTestMain.m
// GHUnitIPhone
//
// Created by Gabriel Handford on 1/25/09.
// Copyright 2009. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "GHUnit.h"
extern BOOL NSDebugEnabled;
extern BOOL NSZombieEnabled;
extern BOOL NSDeallocateZombies;
extern BOOL NSHangOnUncaughtException;
int main(int argc, char *argv[]) {
NSDebugEnabled = YES;
NSZombieEnabled = YES;
NSDeallocateZombies = NO;
NSHangOnUncaughtException = YES;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// Register any special test case classes
//[[GHTesting sharedInstance] registerClassName:@"GHSpecialTestCase"];
int retVal = 0;
// If GHUNIT_CLI is set we are using the command line interface and run the tests
// Otherwise load the GUI app
if (getenv("GHUNIT_CLI")) {
retVal = [GHTestRunner run];
} else {
retVal = UIApplicationMain(argc, argv, nil, @"GHUnitIPhoneAppDelegate");
}
[pool release];
return retVal;
}