From 5368f4556761eaf765d6296d754945b7ed2c60d8 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Sat, 7 Jan 2023 15:59:18 +0100 Subject: [PATCH] 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()) --- test/testautomation_main.c | 44 +++----------------------------------- 1 file changed, 3 insertions(+), 41 deletions(-) diff --git a/test/testautomation_main.c b/test/testautomation_main.c index 1f5af93b4..78572d1a4 100644 --- a/test/testautomation_main.c +++ b/test/testautomation_main.c @@ -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: */