apple2ix/Apple2Mac/Apple2MacTests/CPUTestAppDelegate.m

41 lines
837 B
Mathematica
Raw Normal View History

//
2014-10-11 02:14:46 +00:00
// CPUTestAppDelegate.m
// Apple2Mac
//
// Created by Aaron Culliney on 6/21/14.
// Copyright (c) 2014 deadc0de.org. All rights reserved.
//
2014-10-11 02:14:46 +00:00
#import "CPUTestAppDelegate.h"
#import "common.h"
2014-10-11 02:22:03 +00:00
extern int test_cpu(int, char **);
extern int test_vm(int argc, char **argv);
2014-10-11 02:14:46 +00:00
@implementation CPUTestAppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
2014-10-11 02:22:03 +00:00
dispatch_async(dispatch_get_main_queue(), ^{
char *local_argv[] = {
"-f",
NULL
};
int local_argc = 0;
for (char **p = &local_argv[0]; *p != NULL; p++) {
++local_argc;
}
#if defined(TEST_CPU)
test_cpu(local_argc, local_argv);
#elif defined(TEST_VM)
test_vm(local_argc, local_argv);
#else
#error "OOPS, no tests specified"
#endif
});
}
@end