mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-22 14:25:37 +00:00
Remove one test that contains call of SDL_Quit() / SDL_Init() because it
conficts with the initializaion of test common. (before it used SDL_VideoInit SDL_VideoQuit which weren't perturbated by SDL_Quit())
This commit is contained in:
parent
3d5679bb8e
commit
5368f45567
|
@ -9,37 +9,6 @@
|
|||
#include "SDL.h"
|
||||
#include "SDL_test.h"
|
||||
|
||||
/* !
|
||||
* \brief Tests SDL_Init() and SDL_Quit() of Joystick and Haptic subsystems
|
||||
* \sa
|
||||
* http://wiki.libsdl.org/SDL_Init
|
||||
* http://wiki.libsdl.org/SDL_Quit
|
||||
*/
|
||||
static int main_testInitQuitJoystickHaptic(void *arg)
|
||||
{
|
||||
#if defined SDL_JOYSTICK_DISABLED || defined SDL_HAPTIC_DISABLED
|
||||
return TEST_SKIPPED;
|
||||
#else
|
||||
int enabled_subsystems;
|
||||
int previous_subsystems = SDL_WasInit(SDL_INIT_EVERYTHING);
|
||||
int initialized_subsystems = SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC;
|
||||
|
||||
SDLTest_AssertCheck(SDL_Init(initialized_subsystems) == 0, "SDL_Init multiple systems.");
|
||||
|
||||
enabled_subsystems = SDL_WasInit(initialized_subsystems);
|
||||
SDLTest_AssertCheck(enabled_subsystems == initialized_subsystems, "SDL_WasInit(SDL_INIT_EVERYTHING) contains all systems (%i)", enabled_subsystems);
|
||||
|
||||
SDL_Quit();
|
||||
|
||||
enabled_subsystems = SDL_WasInit(initialized_subsystems);
|
||||
SDLTest_AssertCheck(enabled_subsystems == 0, "SDL_Quit should shut down everything (%i)", enabled_subsystems);
|
||||
|
||||
SDL_Init(previous_subsystems);
|
||||
|
||||
return TEST_COMPLETED;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* !
|
||||
* \brief Tests SDL_InitSubSystem() and SDL_QuitSubSystem()
|
||||
* \sa
|
||||
|
@ -157,22 +126,18 @@ main_testSetError(void *arg)
|
|||
#endif
|
||||
|
||||
static const SDLTest_TestCaseReference mainTest1 = {
|
||||
(SDLTest_TestCaseFp)main_testInitQuitJoystickHaptic, "main_testInitQuitJoystickHaptic", "Tests SDL_Init/Quit of Joystick and Haptic subsystem", TEST_ENABLED
|
||||
};
|
||||
|
||||
static const SDLTest_TestCaseReference mainTest2 = {
|
||||
(SDLTest_TestCaseFp)main_testInitQuitSubSystem, "main_testInitQuitSubSystem", "Tests SDL_InitSubSystem/QuitSubSystem", TEST_ENABLED
|
||||
};
|
||||
|
||||
static const SDLTest_TestCaseReference mainTest3 = {
|
||||
static const SDLTest_TestCaseReference mainTest2 = {
|
||||
(SDLTest_TestCaseFp)main_testImpliedJoystickInit, "main_testImpliedJoystickInit", "Tests that init for gamecontroller properly implies joystick", TEST_ENABLED
|
||||
};
|
||||
|
||||
static const SDLTest_TestCaseReference mainTest4 = {
|
||||
static const SDLTest_TestCaseReference mainTest3 = {
|
||||
(SDLTest_TestCaseFp)main_testImpliedJoystickQuit, "main_testImpliedJoystickQuit", "Tests that quit for gamecontroller doesn't quit joystick if you inited it explicitly", TEST_ENABLED
|
||||
};
|
||||
|
||||
static const SDLTest_TestCaseReference mainTest5 = {
|
||||
static const SDLTest_TestCaseReference mainTest4 = {
|
||||
(SDLTest_TestCaseFp)main_testSetError, "main_testSetError", "Tests that SDL_SetError() handles arbitrarily large strings", TEST_ENABLED
|
||||
};
|
||||
|
||||
|
@ -182,7 +147,6 @@ static const SDLTest_TestCaseReference *mainTests[] = {
|
|||
&mainTest2,
|
||||
&mainTest3,
|
||||
&mainTest4,
|
||||
&mainTest5,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -193,5 +157,3 @@ SDLTest_TestSuiteReference mainTestSuite = {
|
|||
mainTests,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
Loading…
Reference in a new issue