Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed incorrect assertions in surface test suite.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkauppila committed Jul 14, 2011
1 parent 82ab9fd commit 2f7cbd6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test-automation/testsurface/testsurface.c
Expand Up @@ -157,7 +157,7 @@ void _testBlitBlendMode(SDL_Surface *testsur, SDL_Surface *face, int mode)
/* Clear surface. */
ret = SDL_FillRect( testsur, NULL,
SDL_MapRGB( testsur->format, 0, 0, 0 ) );
AssertTrue(ret != 0, "SDL_FillRect");
AssertTrue(ret == 0, "SDL_FillRect");

/* Steps to take. */
ni = testsur->w - face->w;
Expand All @@ -172,14 +172,15 @@ void _testBlitBlendMode(SDL_Surface *testsur, SDL_Surface *face, int mode)
for (i=0; i <= ni; i+=4) {
/* Set blend mode. */
ret = SDL_SetSurfaceBlendMode( face, mode );
AssertTrue(ret != 0, "SDL_SetSurfaceBlendMode");
AssertTrue(ret == 0, "SDL_SetSurfaceBlendMode");

/* Blitting. */
rect.x = i;
rect.y = j;
// TODO Add pixel level validation, SDL_BlitSurface might be no-op
ret = SDL_BlitSurface( face, NULL, testsur, &rect );
AssertTrue(ret != 0, "SDL_BlitSurface"); }
AssertTrue(ret == 0, "SDL_BlitSurface");
}
}
}

Expand Down

0 comments on commit 2f7cbd6

Please sign in to comment.