Commit b6d8ee50 authored by Markus Kauppila's avatar Markus Kauppila

Fixed incorrect assertions in surface test suite.

parent 66677c0a
...@@ -157,7 +157,7 @@ void _testBlitBlendMode(SDL_Surface *testsur, SDL_Surface *face, int mode) ...@@ -157,7 +157,7 @@ void _testBlitBlendMode(SDL_Surface *testsur, SDL_Surface *face, int mode)
/* Clear surface. */ /* Clear surface. */
ret = SDL_FillRect( testsur, NULL, ret = SDL_FillRect( testsur, NULL,
SDL_MapRGB( testsur->format, 0, 0, 0 ) ); SDL_MapRGB( testsur->format, 0, 0, 0 ) );
AssertTrue(ret != 0, "SDL_FillRect"); AssertTrue(ret == 0, "SDL_FillRect");
/* Steps to take. */ /* Steps to take. */
ni = testsur->w - face->w; ni = testsur->w - face->w;
...@@ -172,14 +172,15 @@ void _testBlitBlendMode(SDL_Surface *testsur, SDL_Surface *face, int mode) ...@@ -172,14 +172,15 @@ void _testBlitBlendMode(SDL_Surface *testsur, SDL_Surface *face, int mode)
for (i=0; i <= ni; i+=4) { for (i=0; i <= ni; i+=4) {
/* Set blend mode. */ /* Set blend mode. */
ret = SDL_SetSurfaceBlendMode( face, mode ); ret = SDL_SetSurfaceBlendMode( face, mode );
AssertTrue(ret != 0, "SDL_SetSurfaceBlendMode"); AssertTrue(ret == 0, "SDL_SetSurfaceBlendMode");
/* Blitting. */ /* Blitting. */
rect.x = i; rect.x = i;
rect.y = j; rect.y = j;
// TODO Add pixel level validation, SDL_BlitSurface might be no-op // TODO Add pixel level validation, SDL_BlitSurface might be no-op
ret = SDL_BlitSurface( face, NULL, testsur, &rect ); ret = SDL_BlitSurface( face, NULL, testsur, &rect );
AssertTrue(ret != 0, "SDL_BlitSurface"); } AssertTrue(ret == 0, "SDL_BlitSurface");
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment