/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteParser (void) { TEST_Init(); /* default state */ Com_EnableFunctionScriptToken(qfalse); return 0; }
static void SetUpTestCase() { TEST_Init(); cl_genericPool = Mem_CreatePool("Client: Generic"); cp_campaignPool = Mem_CreatePool("Client: Local (per game)"); cp_campaign = Cvar_Get("cp_campaign", "main"); cp_missiontest = Cvar_Get("cp_missiontest", "0"); vid_imagePool = Mem_CreatePool("Vid: Image system"); r_state.active_texunit = &r_state.texunits[0]; R_FontInit(); UI_Init(); GAME_InitStartup(); OBJZERO(cls); Com_ParseScripts(false); Cmd_ExecuteString("game_setmode campaign"); Cmd_AddCommand("msgoptions_set", Cmd_Dummy_f); CL_SetClientState(ca_disconnected); cls.realtime = Sys_Milliseconds(); }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteInventory (void) { TEST_Init(); Com_ParseScripts(true); return 0; }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteRouting (void) { TEST_Init(); Com_ParseScripts(true); return 0; }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteCampaign (void) { TEST_Init(); cl_genericPool = Mem_CreatePool("Client: Generic"); cp_campaignPool = Mem_CreatePool("Client: Local (per game)"); cp_campaign = Cvar_Get("cp_campaign", "main", 0, NULL); cp_missiontest = Cvar_Get("cp_missiontest", "0", 0, NULL); vid_imagePool = Mem_CreatePool("Vid: Image system"); r_state.active_texunit = &r_state.texunits[0]; R_FontInit(); UI_Init(); OBJZERO(cls); Com_ParseScripts(qfalse); Cmd_AddCommand("msgoptions_set", Cmd_Dummy_f, NULL); cl_geoscape_overlay = Cvar_Get("cl_geoscape_overlay", "0", 0, NULL); cl_3dmap = Cvar_Get("cl_3dmap", "1", 0, NULL); CL_SetClientState(ca_disconnected); cls.realtime = Sys_Milliseconds(); return 0; }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteEvents (void) { TEST_Init(); cl_genericPool = Mem_CreatePool("Client: Generic"); return 0; }
static void SetUpTestCase() { TEST_Init(); /* we need the teamdefs for spawning ai actors */ Com_ParseScripts(true); Cvar_Set("sv_threads", "0"); sv_genericPool = Mem_CreatePool("server-gametest"); r_state.active_texunit = &r_state.texunits[0]; }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteRandomMapAssembly (void) { TEST_Init(); Com_ParseScripts(qtrue); sv_dumpmapassembly = Cvar_Get("sv_dumpassembly", "0", 0, NULL); sv_rma = Cvar_Get("sv_rma_tmp", "2", 0, NULL); return 0; }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteRandomMapAssembly (void) { TEST_Init(); Com_ParseScripts(true); sv_dumpmapassembly = Cvar_Get("sv_dumpassembly", "0"); sv_rma = Cvar_Get("sv_rma_tmp", "2"); sv_rmadisplaythemap = Cvar_Get("sv_rmadisplaythemap", "1"); return 0; }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteGame (void) { TEST_Init(); /* we need the teamdefs for spawning ai actors */ Com_ParseScripts(true); Cvar_Set("sv_threads", "0"); sv_genericPool = Mem_CreatePool("server-gametest"); r_state.active_texunit = &r_state.texunits[0]; return 0; }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteUILevel2 (void) { TEST_Init(); UI_Init(); vid_imagePool = Mem_CreatePool("Vid: Image system"); r_state.active_texunit = &texunit_diffuse; return 0; }
static void SetUpTestCase() { TEST_Init(); /* we need the teamdefs for spawning ai actors */ Com_ParseScripts(true); Cvar_Set("sv_threads", "0"); sv_maxclients = Cvar_Get("sv_maxclients", "1", CVAR_SERVERINFO, "Max. connected clients for test"); port = Cvar_Get("port", DOUBLEQUOTE(PORT_SERVER), CVAR_NOSET); masterserver_url = Cvar_Get("masterserver_url", MASTER_SERVER, CVAR_ARCHIVE, "URL of UFO:AI masterserver"); sv_genericPool = Mem_CreatePool("server-gametest"); com_networkPool = Mem_CreatePool("server-gametest-network"); r_state.active_texunit = &r_state.texunits[0]; }
static void SetUpTestCase() { TEST_Init(); PTL_InitStartup(); vid_imagePool = Mem_CreatePool("Vid: Image system"); cl_genericPool = Mem_CreatePool("Client: Generic"); r_state.active_texunit = &r_state.texunits[0]; R_FontInit(); UI_Init(); OBJZERO(cls); Com_ParseScripts(false); }
static void SetUpTestCase() { TEST_Init(); Com_ParseScripts(true); WEB_InitStartup(); user = TEST_GetStringProperty("webapi-user"); if (user == nullptr) user = ""; password = TEST_GetStringProperty("webapi-password"); if (password == nullptr) password = ""; }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteScripts (void) { TEST_Init(); cl_genericPool = Mem_CreatePool("Client: Generic"); vid_imagePool = Mem_CreatePool("Vid: Image system"); r_state.active_texunit = &r_state.texunits[0]; R_FontInit(); UI_Init(); OBJZERO(cls); Com_ParseScripts(qfalse); return 0; }
static void SetUpTestCase() { TEST_Init(); Com_ParseScripts(true); sv_dumpmapassembly = Cvar_Get("sv_dumpassembly", "0"); sv_rma = Cvar_Get("sv_rma_tmp", "2"); sv_rmadisplaythemap = Cvar_Get("sv_rmadisplaythemap", "1"); if (!sv_threads) { sv_threads = &svt; sv_threads->integer = 0; } if (!sv_maxclients) { sv_maxclients = &maxclients; sv_maxclients->integer = 1; } }
static void SetUpTestCase() { TEST_Init(); sv_genericPool = Mem_CreatePool("mapdef-test"); com_networkPool = Mem_CreatePool("Network"); vid_imagePool = Mem_CreatePool("Vid: Image system"); sv_dumpmapassembly = Cvar_Get("sv_dumpassembly", "0"); sv_public = Cvar_Get("sv_public", "0"); port = Cvar_Get("testport", "27909"); masterserver_url = Cvar_Get("masterserver_test", "http://localhost"); cl_genericPool = Mem_CreatePool("Client: Generic"); r_state.active_texunit = &r_state.texunits[0]; R_FontInit(); UI_Init(); OBJZERO(cls); Com_ParseScripts(false); }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteMapDef (void) { TEST_Init(); NET_Init(); sv_genericPool = Mem_CreatePool("mapdef-test"); com_networkPool = Mem_CreatePool("Network"); vid_imagePool = Mem_CreatePool("Vid: Image system"); sv_dumpmapassembly = Cvar_Get("sv_dumpassembly", "0", 0, NULL); sv_public = Cvar_Get("sv_public", "0", 0, NULL); port = Cvar_Get("testport", "27909", 0, NULL); cl_genericPool = Mem_CreatePool("Client: Generic"); r_state.active_texunit = &r_state.texunits[0]; R_FontInit(); UI_Init(); OBJZERO(cls); Com_ParseScripts(qfalse); return 0; }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteGeneric (void) { TEST_Init(); return 0; }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteRenderer (void) { TEST_Init(); return 0; }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteDBuffer (void) { TEST_Init(); return 0; }
int main(void) { SYS_Init(); // DISPLAY_Init(); // DISPLAY_Mode(DISPLAY_MODE_CAL); // counter = 0; // RPM_Clear(); // ENCODER_Init(ENCODER_Callback); /* // ------ PWM ------- //Set Pwm mode _PWM_SET_TIMER_AUTO_RELOAD_MODE(PWMA,PWM_CH0); //Set PWM Timer clock prescaler _PWM_SET_TIMER_PRESCALE(PWMA,PWM_CH0, 1); // Divided by 2 //Set PWM Timer clock divider select _PWM_SET_TIMER_CLOCK_DIV(PWMA,PWM_CH0,PWM_CSR_DIV1); //Set PWM Timer duty PWMA->CMR0 = 0; duty_pwm = 0; duty_changed = 1; //Set PWM Timer period PWMA->CNR0 = 249; // Enable PWM Output pin _PWM_ENABLE_PWM_OUT(PWMA, PWM_CH0); // Enable Timer period Interrupt // _PWM_ENABLE_TIMER_PERIOD_INT(PWMB, PWM_CH0); // Enable PWMB NVIC // NVIC_EnableIRQ((IRQn_Type)(PWMB_IRQn)); // Enable PWM Timer _PWM_ENABLE_TIMER(PWMA, PWM_CH0); // ---- PWM Timer used as display update // Set Pwm mode _PWM_SET_TIMER_AUTO_RELOAD_MODE(PWMA,PWM_CH3); // Set PWM Timer clock prescaler _PWM_SET_TIMER_PRESCALE(PWMA,PWM_CH3, 255); // Divided by 256 // Set PWM Timer clock divider select _PWM_SET_TIMER_CLOCK_DIV(PWMA,PWM_CH3,PWM_CSR_DIV16); // Set PWM Timer duty PWMA->CMR3 = 1250; // Set PWM Timer period PWMA->CNR3 = 2500; // Enable Timer period Interrupt _PWM_ENABLE_TIMER_PERIOD_INT(PWMA, PWM_CH3); // Enable PWM Timer _PWM_ENABLE_TIMER(PWMA, PWM_CH3); */ // PWM timer used for test signal TEST_Init(); // PWM_RPM_Collect(); while(1) {} }
static void SetUpTestCase() { TEST_Init(); }
/** * The suite initialization function. * Returns zero on success, non-zero otherwise. */ static int UFO_InitSuiteMathlibExtra (void) { TEST_Init(); return 0; }