PageRenderTime 30ms CodeModel.GetById 15ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/google-toolbox-for-mac/UnitTesting/GTMUIUnitTestingHarness/main.m

http://macfuse.googlecode.com/
Objective C | 39 lines | 11 code | 6 blank | 22 comment | 0 complexity | a9775a4fb9aecc6cacfe95b610935e89 MD5 | raw file
 1//
 2//  main.m
 3//  GTMUnitTestingTest
 4//
 5//  Copyright 2006-2008 Google Inc.
 6//
 7//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
 8//  use this file except in compliance with the License.  You may obtain a copy
 9//  of the License at
10//
11//  http://www.apache.org/licenses/LICENSE-2.0
12//
13//  Unless required by applicable law or agreed to in writing, software
14//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
16//  License for the specific language governing permissions and limitations under
17//  the License.
18//
19
20
21#import <Cocoa/Cocoa.h>
22#import "GTMAppKitUnitTestingUtilities.h"
23#import "GTMFoundationUnitTestingUtilities.h"
24
25int main(int argc, char *argv[]) {
26  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
27
28  [GTMAppKitUnitTestingUtilities setUpForUIUnitTestsIfBeingTested];
29
30  // Give ourselves a max of 10 minutes for the tests.  Sometimes (in automated
31  // builds) the unittesting bundle fails to load which causes the app to keep
32  // running forever.  This will force it to exit after a certain amount of time
33  // instead of hanging running forever.
34  [GTMFoundationUnitTestingUtilities installTestingTimeout:10*60.0];
35
36  int result = NSApplicationMain(argc,  (const char **) argv);
37  [pool drain];
38  return result;
39}