static void _run_tests(void) { char *local_argv[] = { "-f", NULL }; int local_argc = 0; for (char **p = &local_argv[0]; *p != NULL; p++) { ++local_argc; } #if defined(TEST_CPU) // Currently this test is the only one that runs as a black screen extern int test_cpu(int, char *[]); test_cpu(local_argc, local_argv); tkill(getpid(), SIGKILL); // and we're done ... #elif defined(TEST_VM) extern int test_vm(int, char *[]); test_vm(local_argc, local_argv); #elif defined(TEST_DISPLAY) extern int test_display(int, char *[]); test_display(local_argc, local_argv); #elif defined(TEST_DISK) extern int test_disk(int, char *[]); test_disk(local_argc, local_argv); #else # error "OOPS, no tests specified" #endif }
void display() { #ifdef MOD_TEST test_display(); #else benc_display(); robk_display(); vinh_display(); game_display(); #endif }