From 1b26b54402eaa0a4fab4fcc799dcfa80d539fe8b Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 15 Sep 2024 12:04:10 -0700
Subject: [PATCH] Verify that the subsystems were successfully initialized
(cherry picked from commit 0548050fc5a4edf1f47c3633c2cd06d8762b5532)
---
test/testautomation_subsystems.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/testautomation_subsystems.c b/test/testautomation_subsystems.c
index 15b17535904f4..73eaca2fdf9ea 100644
--- a/test/testautomation_subsystems.c
+++ b/test/testautomation_subsystems.c
@@ -100,6 +100,8 @@ static int subsystems_dependRefCountInitAllQuitByOne(void)
/* Following should init SDL_INIT_EVENTS and give it +3 ref counts. */
SDL_InitSubSystem(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK);
SDLTest_AssertPass("Call to SDL_InitSubSystem(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK)");
+ result = SDL_WasInit(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK);
+ SDLTest_AssertCheck(result == (SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK), "Check result from SDL_WasInit(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK), expected: 0x%x, got: 0x%x", (SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK), result);
result = SDL_WasInit(SDL_INIT_EVENTS);
SDLTest_AssertCheck(result == SDL_INIT_EVENTS, "Check result from SDL_WasInit(SDL_INIT_EVENTS), expected: 0x4000, got: 0x%x", result);