Mercurial > sdl-ios-xcode
diff test/automated/surface/surface.c @ 3722:d8772964e402 gsoc2009_unit_tests
Added more strict warning flags.
Fixed bugs/issues uncovered by warning flags.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Thu, 09 Jul 2009 10:42:56 +0000 |
parents | 9bb7758a9741 |
children | 1496cdbb6055 |
line wrap: on
line diff
--- a/test/automated/surface/surface.c Thu Jul 09 10:36:09 2009 +0000 +++ b/test/automated/surface/surface.c Thu Jul 09 10:42:56 2009 +0000 @@ -25,8 +25,8 @@ typedef struct SurfaceImage_s { - unsigned int width; - unsigned int height; + int width; + int height; unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ const unsigned char pixel_data[]; } SurfaceImage_t; @@ -53,7 +53,6 @@ { int ret; int i,j; - Uint32 pix; int bpp; Uint8 *p, *pd; @@ -268,7 +267,7 @@ ret = SDL_BlendLine( testsur, 0, 0, i, 59, (((i/2)%3)==0) ? SDL_BLENDMODE_BLEND : (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_MOD, - 60+2*j, 240-2*j, 50, 3*j ); + 60+2*i, 240-2*i, 50, 3*i ); if (SDL_ATassert( "SDL_BlendLine", ret == 0)) return; } @@ -276,7 +275,7 @@ ret = SDL_BlendLine( testsur, 0, 0, 79, i, (((i/2)%3)==0) ? SDL_BLENDMODE_BLEND : (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_MOD, - 60+2*j, 240-2*j, 50, 3*j ); + 60+2*i, 240-2*i, 50, 3*i ); if (SDL_ATassert( "SDL_BlendLine", ret == 0)) return; } @@ -314,7 +313,6 @@ SDL_Rect rect; SDL_Surface *face, *testsur; int i, j, ni, nj; - int mode; SDL_ATbegin( "Blit Tests" ); @@ -498,6 +496,14 @@ if (SDL_ATassert( "SDL_SetSurfaceAlphaMod", ret == 0)) return; + /* Steps to take. */ + ni = testsur->w - face->w; + nj = testsur->h - face->h; + + /* Constant values. */ + rect.w = face->w; + rect.h = face->h; + /* Test None. */ if (surface_testBlitBlendMode( testsur, face, SDL_BLENDMODE_NONE )) return; @@ -588,6 +594,9 @@ */ int main( int argc, const char *argv[] ) { + (void) argc; + (void) argv; + SDL_ATinit( "SDL_Surface" ); /* Initializes the SDL subsystems. */