mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 15:21:43 +00:00
Fixed testautomation --filter pixels_allocFreePalette
Error messages are not part of the ABI, so we can't validate those.
Hand-picked from c9323f8fac
This commit is contained in:

committed by
Ozkan Sezer

parent
bda161d22b
commit
2319b2635b
@@ -294,7 +294,6 @@ int pixels_getPixelFormatName(void *arg)
|
|||||||
int pixels_allocFreePalette(void *arg)
|
int pixels_allocFreePalette(void *arg)
|
||||||
{
|
{
|
||||||
const char *expectedError1 = "Parameter 'ncolors' is invalid";
|
const char *expectedError1 = "Parameter 'ncolors' is invalid";
|
||||||
const char *expectedError2 = "Parameter 'palette' is invalid";
|
|
||||||
const char *error;
|
const char *error;
|
||||||
int variation;
|
int variation;
|
||||||
int i;
|
int i;
|
||||||
@@ -359,19 +358,6 @@ int pixels_allocFreePalette(void *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Invalid free pointer */
|
|
||||||
SDL_ClearError();
|
|
||||||
SDLTest_AssertPass("Call to SDL_ClearError()");
|
|
||||||
SDL_FreePalette(NULL);
|
|
||||||
SDLTest_AssertPass("Call to SDL_FreePalette(NULL)");
|
|
||||||
error = SDL_GetError();
|
|
||||||
SDLTest_AssertPass("Call to SDL_GetError()");
|
|
||||||
SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
|
|
||||||
if (error != NULL) {
|
|
||||||
SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0,
|
|
||||||
"Validate error message, expected: '%s', got: '%s'", expectedError2, error);
|
|
||||||
}
|
|
||||||
|
|
||||||
return TEST_COMPLETED;
|
return TEST_COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user