diff --git a/test/testcustomcursor.c b/test/testcustomcursor.c index 7b7b65040..6a4910fa8 100644 --- a/test/testcustomcursor.c +++ b/test/testcustomcursor.c @@ -342,14 +342,15 @@ int main(int argc, char *argv[]) const char *color_cursor = NULL; SDL_Cursor *cursor; - /* Enable standard application logging */ - SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); - /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); if (!state) { return 1; } + + /* Enable standard application logging */ + SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + for (i = 1; i < argc;) { int consumed; diff --git a/test/testdraw.c b/test/testdraw.c index d558bac26..2a7d6c36e 100644 --- a/test/testdraw.c +++ b/test/testdraw.c @@ -14,7 +14,7 @@ #include #include -#include +#include #ifdef SDL_PLATFORM_EMSCRIPTEN #include @@ -217,10 +217,6 @@ static void loop(void) int main(int argc, char *argv[]) { int i; - - /* Enable standard application logging */ - SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); - /* Initialize parameters */ num_objects = NUM_OBJECTS; @@ -229,6 +225,10 @@ int main(int argc, char *argv[]) if (!state) { return 1; } + + /* Enable standard application logging */ + SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + for (i = 1; i < argc;) { int consumed; @@ -309,6 +309,7 @@ int main(int argc, char *argv[]) } #endif + SDLTest_CleanupTextDrawing(); SDLTest_CommonQuit(state); return 0; diff --git a/test/testpopup.c b/test/testpopup.c index 8084bad63..ecb04128f 100644 --- a/test/testpopup.c +++ b/test/testpopup.c @@ -55,6 +55,7 @@ static void quit(int rc) SDL_free(menus); menus = NULL; + SDLTest_CleanupTextDrawing(); SDLTest_CommonQuit(state); /* Let 'main()' return normally */ if (rc != 0) { diff --git a/test/testrendertarget.c b/test/testrendertarget.c index c38836504..2c4b6dc0c 100644 --- a/test/testrendertarget.c +++ b/test/testrendertarget.c @@ -218,14 +218,15 @@ int main(int argc, char *argv[]) int frames; Uint64 then, now; - /* Enable standard application logging */ - SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); - /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); if (!state) { return 1; } + + /* Enable standard application logging */ + SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + for (i = 1; i < argc;) { int consumed; diff --git a/test/testtime.c b/test/testtime.c index 505c05ebc..14e8a57b2 100644 --- a/test/testtime.c +++ b/test/testtime.c @@ -221,6 +221,7 @@ int main(int argc, char *argv[]) } quit: + SDLTest_CleanupTextDrawing(); SDLTest_CommonQuit(state); return 0; } diff --git a/test/testtimer.c b/test/testtimer.c index 249b76a7e..ab797c2f5 100644 --- a/test/testtimer.c +++ b/test/testtimer.c @@ -261,7 +261,7 @@ int main(int argc, char *argv[]) return_code = test_sdl_delay_within_bounds(); } - SDLTest_CommonDestroyState(state); SDL_Quit(); + SDLTest_CommonDestroyState(state); return return_code; }