Getting "(null)" when formatted printing NULL is a valid result

This commit is contained in:
Sam Lantinga 2021-09-22 10:01:42 -07:00
parent a4a9d28461
commit 42ae9116ad
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}