2014-06-26 04:46:47 +00:00
|
|
|
//
|
2014-10-11 02:14:46 +00:00
|
|
|
// CPUTestAppDelegate.m
|
2014-06-26 04:46:47 +00:00
|
|
|
// 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"
|
2014-06-26 04:46:47 +00:00
|
|
|
|
|
|
|
#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-06-26 04:46:47 +00:00
|
|
|
|
2014-10-11 02:14:46 +00:00
|
|
|
@implementation CPUTestAppDelegate
|
2014-06-26 04:46:47 +00:00
|
|
|
|
|
|
|
- (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
|
|
|
|
});
|
2014-06-26 04:46:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|