From 42ae9116adce82703f847f1ec9867d7e99f17b1f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 22 Sep 2021 10:01:42 -0700 Subject: [PATCH] Getting "(null)" when formatted printing NULL is a valid result --- test/testautomation_platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/testautomation_platform.c b/test/testautomation_platform.c index 5e0971f0e..4e28ba166 100644 --- a/test/testautomation_platform.c +++ b/test/testautomation_platform.c @@ -384,7 +384,7 @@ int platform_testSetErrorInvalidInput(void *arg) if (lastError != NULL) { len = SDL_strlen(lastError); - SDLTest_AssertCheck(len == 0, + SDLTest_AssertCheck(len == 0 || SDL_strcmp(lastError, "(null)") == 0, "SDL_GetError(): expected message len 0, was len: %i", (int) len); } @@ -404,7 +404,7 @@ int platform_testSetErrorInvalidInput(void *arg) if (lastError != NULL) { len = SDL_strlen(lastError); - SDLTest_AssertCheck(len == 0, + SDLTest_AssertCheck(len == 0 || SDL_strcmp( lastError, "(null)" ) == 0, "SDL_GetError(): expected message len 0, was len: %i", (int) len); }