#include "SDL.h"
#include "SDL_test.h"
Go to the source code of this file.
◆ main_testImpliedJoystickInit()
static int main_testImpliedJoystickInit |
( |
void * |
arg | ) |
|
|
static |
◆ main_testImpliedJoystickQuit()
static int main_testImpliedJoystickQuit |
( |
void * |
arg | ) |
|
|
static |
◆ main_testInitQuitJoystickHaptic()
static int main_testInitQuitJoystickHaptic |
( |
void * |
arg | ) |
|
|
static |
Automated SDL subsystems management test.
Written by J�rgen Tjern� "jorgenpt"
Released under Public Domain.
Definition at line 19 of file testautomation_main.c.
21 #if defined SDL_JOYSTICK_DISABLED || defined SDL_HAPTIC_DISABLED
24 int enabled_subsystems;
29 enabled_subsystems =
SDL_WasInit(initialized_subsystems);
30 SDLTest_AssertCheck( enabled_subsystems == initialized_subsystems,
"SDL_WasInit(SDL_INIT_EVERYTHING) contains all systems (%i)", enabled_subsystems );
34 enabled_subsystems =
SDL_WasInit(initialized_subsystems);
35 SDLTest_AssertCheck( enabled_subsystems == 0,
"SDL_Quit should shut down everything (%i)", enabled_subsystems );
References SDL_Init, SDL_INIT_HAPTIC, SDL_INIT_JOYSTICK, SDL_Quit, SDL_WasInit, SDLTest_AssertCheck(), TEST_COMPLETED, and TEST_SKIPPED.
◆ main_testInitQuitSubSystem()
static int main_testInitQuitSubSystem |
( |
void * |
arg | ) |
|
|
static |
Definition at line 47 of file testautomation_main.c.
49 #if defined SDL_JOYSTICK_DISABLED || defined SDL_HAPTIC_DISABLED || defined SDL_GAMECONTROLLER_DISABLED
56 int initialized_system;
57 int subsystem = subsystems[
i];
63 SDLTest_AssertCheck( (initialized_system & subsystem) != 0,
"SDL_WasInit(%x) should be true (%x)", subsystem, initialized_system );
References i, SDL_arraysize, SDL_INIT_GAMECONTROLLER, SDL_INIT_HAPTIC, SDL_INIT_JOYSTICK, SDL_InitSubSystem, SDL_QuitSubSystem, SDL_WasInit, SDLTest_AssertCheck(), TEST_COMPLETED, and TEST_SKIPPED.
◆ joy_and_controller
◆ mainTest1
◆ mainTest2
◆ mainTest3
◆ mainTest4
◆ mainTests
◆ mainTestSuite
const int joy_and_controller
static const SDLTest_TestCaseReference mainTest2
static const SDLTest_TestCaseReference mainTest4
static int main_testInitQuitSubSystem(void *arg)
static int main_testImpliedJoystickInit(void *arg)
static const SDLTest_TestCaseReference mainTest1
int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription,...) SDL_PRINTF_VARARG_FUNC(2)
Assert for test cases that logs but does not break execution flow on failures. Updates assertion coun...
static const SDLTest_TestCaseReference mainTest3
static const SDLTest_TestCaseReference * mainTests[]
static int main_testImpliedJoystickQuit(void *arg)
static int main_testInitQuitJoystickHaptic(void *arg)