diff --git a/test/testautomation_pixels.c b/test/testautomation_pixels.c index 3b806d6055..72243eb5ab 100644 --- a/test/testautomation_pixels.c +++ b/test/testautomation_pixels.c @@ -102,8 +102,8 @@ const char *_nonRGBPixelFormatsVerbose[] = { /* Definition of some invalid formats for negative tests */ const int _numInvalidPixelFormats = 2; Uint32 _invalidPixelFormats[] = { - 0xfffffffe, - 0xffffffff + SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_1010102 + 1, 32, 4), + SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_1010102 + 2, 32, 4) }; const char *_invalidPixelFormatsVerbose[] = { "SDL_PIXELFORMAT_UNKNOWN", @@ -121,7 +121,6 @@ const char *_invalidPixelFormatsVerbose[] = { int pixels_allocFreeFormat(void *arg) { const char *unknownFormat = "SDL_PIXELFORMAT_UNKNOWN"; - const char *expectedError = "Parameter 'format' is invalid"; const char *error; int i; Uint32 format; @@ -172,6 +171,7 @@ int pixels_allocFreeFormat(void *arg) } } +#if 0 /* This succeeds for SDL3, but we don't expect SDL2 applications to call SDL_AllocFormat() for FOURCC formats directly */ /* Non-RGB formats */ for (i = 0; i < _numNonRGBPixelFormats; i++) { format = _nonRGBPixelFormats[i]; @@ -182,6 +182,7 @@ int pixels_allocFreeFormat(void *arg) SDLTest_AssertPass("Call to SDL_AllocFormat()"); SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); } +#endif /* Negative cases */ @@ -196,23 +197,6 @@ int pixels_allocFreeFormat(void *arg) 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, expectedError) == 0, - "Validate error message, expected: '%s', got: '%s'", expectedError, error); - } - } - - /* Invalid free pointer */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - SDL_FreeFormat(NULL); - SDLTest_AssertPass("Call to SDL_FreeFormat(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, expectedError) == 0, - "Validate error message, expected: '%s', got: '%s'", expectedError, error); } return TEST_COMPLETED;