Created
September 12, 2009 16:57
-
-
Save ddribin/185897 to your computer and use it in GitHub Desktop.
main.m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.m | |
// Testing | |
// | |
// Created by Dave Dribin on 9/12/09. | |
// Copyright 2009 Bit Maki, Inc.. All rights reserved. | |
// | |
#import <Cocoa/Cocoa.h> | |
int DDTestApplicationMain(int argc, const char ** argv) | |
{ | |
BOOL testMode = (getenv("TEST_HOST") != NULL); | |
if (!testMode) { | |
return NSApplicationMain(argc, argv); | |
} else { | |
fprintf(stderr, "***** Running Run Loop for testing *****\n"); | |
[[NSRunLoop currentRunLoop] run]; | |
fprintf(stderr,"***** Done *****\n"); | |
return 0; | |
} | |
} | |
int main(int argc, char *argv[]) | |
{ | |
return DDTestApplicationMain(argc, (const char **)argv); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment