From 2f7cbd63742944fd39e03bb4d4d6271bf49f7929 Mon Sep 17 00:00:00 2001 From: Markus Kauppila Date: Thu, 14 Jul 2011 20:43:32 +0300 Subject: [PATCH] Fixed incorrect assertions in surface test suite. --- test/test-automation/testsurface/testsurface.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/test-automation/testsurface/testsurface.c b/test/test-automation/testsurface/testsurface.c index 82cea5ab8..6de92aab2 100644 --- a/test/test-automation/testsurface/testsurface.c +++ b/test/test-automation/testsurface/testsurface.c @@ -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; @@ -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"); + } } }