test/testautomation_surface.c
changeset 6773 5ebc5a9e35b4
child 6779 c3b579c78059
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/testautomation_surface.c	Wed Dec 26 22:26:44 2012 -0800
     1.3 @@ -0,0 +1,519 @@
     1.4 +/**
     1.5 + * Original code: automated SDL surface test written by Edgar Simo "bobbens"
     1.6 + * Adapted/rewritten for test lib by Andreas Schiffler
     1.7 + */
     1.8 +
     1.9 +#include <stdio.h>
    1.10 +#include <sys/stat.h>
    1.11 +
    1.12 +#include "SDL.h"
    1.13 +#include "SDL_test.h"
    1.14 +
    1.15 +/* ================= Test Case Implementation ================== */
    1.16 +
    1.17 +
    1.18 +/* Shared test surface */
    1.19 +
    1.20 +static SDL_Surface *testsurface = NULL;
    1.21 +
    1.22 +/* Fixture */
    1.23 +
    1.24 +void
    1.25 +_surfaceSetUp(void *arg)
    1.26 +{
    1.27 +   testsurface = SDLTest_ImageBlit();
    1.28 +   SDLTest_AssertCheck(testsurface != NULL, "Check that testsurface is not NULL");
    1.29 +}
    1.30 +
    1.31 +void
    1.32 +_surfaceTearDown(void *arg)
    1.33 +{
    1.34 +	if (testsurface != NULL) {
    1.35 +		SDL_FreeSurface(testsurface);
    1.36 +		testsurface = NULL;
    1.37 +	}
    1.38 +}
    1.39 +
    1.40 +/* Helper functions for the test cases */
    1.41 +
    1.42 +#define TEST_SURFACE_WIDTH testsurface->w
    1.43 +#define TEST_SURFACE_HEIGHT testsurface->h
    1.44 +
    1.45 +/**
    1.46 + * Helper that clears the test surface
    1.47 + */
    1.48 +void _clearTestSurface()
    1.49 +{
    1.50 +	int ret;
    1.51 +	Uint32 color;
    1.52 +	
    1.53 +	/* Clear surface. */
    1.54 +	color = SDL_MapRGB( testsurface->format, 0, 0, 0);
    1.55 +	SDLTest_AssertPass("Call to SDL_MapRGB()");
    1.56 +	ret = SDL_FillRect( testsurface, NULL, color);
    1.57 +	SDLTest_AssertPass("Call to SDL_FillRect()");
    1.58 +	SDLTest_AssertCheck(ret == 0, "Verify result from SDL_FillRect, expected: 0, got: %i", ret);
    1.59 +}
    1.60 +
    1.61 +/**
    1.62 + * Helper that blits in a specific blend mode, -1 for basic blitting, -2 for color mod, -3 for alpha mod, -4 for mixed blend modes.
    1.63 + */
    1.64 +void _testBlitBlendMode(int mode)
    1.65 +{
    1.66 +	int ret;
    1.67 +	int i, j, ni, nj;
    1.68 +	SDL_Surface *face;
    1.69 +	SDL_Rect rect;
    1.70 +	Uint32 color;
    1.71 +	int nmode;
    1.72 +	int checkFailCount1;
    1.73 +	int checkFailCount2;
    1.74 +	int checkFailCount3;
    1.75 +	int checkFailCount4;
    1.76 +
    1.77 +	/* Check test surface */
    1.78 +	SDLTest_AssertCheck(testsurface != NULL, "Verify testsurface is not NULL");
    1.79 +	if (testsurface == NULL) return;
    1.80 +	
    1.81 +	/* Create sample surface */
    1.82 +	face = SDLTest_ImageFace();
    1.83 +	SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL");
    1.84 +	if (face == NULL) return;
    1.85 +
    1.86 +	/* Clear the test surface */
    1.87 +        _clearTestSurface();
    1.88 +        
    1.89 +	/* Target rect size */
    1.90 +	rect.w = face->w;
    1.91 +	rect.h = face->h;
    1.92 +	
    1.93 +	/* Steps to take */
    1.94 +	ni = testsurface->w - face->w;
    1.95 +	nj = testsurface->h - face->h;
    1.96 +
    1.97 +	/* Optionally set blend mode. */
    1.98 +	if (mode >= 0) {
    1.99 +		ret = SDL_SetSurfaceBlendMode( face, (SDL_BlendMode)mode );
   1.100 +		SDLTest_AssertPass("Call to SDL_SetSurfaceBlendMode()");
   1.101 +		SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceBlendMode(..., %i), expected: 0, got: %i", mode, ret);
   1.102 +	}
   1.103 +	
   1.104 +	/* Test blend mode. */
   1.105 +	checkFailCount1 = 0;
   1.106 +	checkFailCount2 = 0;
   1.107 +	checkFailCount3 = 0;
   1.108 +	checkFailCount4 = 0;
   1.109 +	for (j=0; j <= nj; j+=4) {
   1.110 +	  for (i=0; i <= ni; i+=4) {
   1.111 +	  	if (mode == -2) {
   1.112 +			/* Set colour mod. */
   1.113 +			ret = SDL_SetSurfaceColorMod( face, (255/nj)*j, (255/ni)*i, (255/nj)*j );
   1.114 +			if (ret != 0) checkFailCount2++;
   1.115 +		}
   1.116 +	  	else if (mode == -3) {
   1.117 +	  		/* Set alpha mod. */
   1.118 +			ret = SDL_SetSurfaceAlphaMod( face, (255/ni)*i );
   1.119 +			if (ret != 0) checkFailCount3++;
   1.120 +		}
   1.121 +		else if (mode == -4) {
   1.122 +			/* Crazy blending mode magic. */
   1.123 +			nmode = (i/4*j/4) % 4;
   1.124 +			if (nmode==0) nmode = SDL_BLENDMODE_NONE;
   1.125 +			else if (nmode==1) nmode = SDL_BLENDMODE_BLEND;
   1.126 +			else if (nmode==2) nmode = SDL_BLENDMODE_ADD;
   1.127 +			else if (nmode==3) nmode = SDL_BLENDMODE_MOD;
   1.128 +			ret = SDL_SetSurfaceBlendMode( face, nmode );		
   1.129 +			if (ret != 0) checkFailCount4++;
   1.130 +		}
   1.131 +
   1.132 +		 /* Blitting. */
   1.133 +		 rect.x = i;
   1.134 +		 rect.y = j;
   1.135 +		 ret = SDL_BlitSurface( face, NULL, testsurface, &rect );
   1.136 +		 if (ret != 0) checkFailCount1++;
   1.137 +	  }
   1.138 +	}
   1.139 +	SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_BlitSurface, expected: 0, got: %i", checkFailCount1);
   1.140 +	SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetSurfaceColorMod, expected: 0, got: %i", checkFailCount2);
   1.141 +	SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_SetSurfaceAlphaMod, expected: 0, got: %i", checkFailCount3);
   1.142 +	SDLTest_AssertCheck(checkFailCount4 == 0, "Validate results from calls to SDL_SetSurfaceBlendMode, expected: 0, got: %i", checkFailCount4);
   1.143 +	
   1.144 +	/* Clean up */
   1.145 +	if (face != NULL) {
   1.146 +		SDL_FreeSurface(face);
   1.147 +		face = NULL;
   1.148 +	}
   1.149 +}
   1.150 +
   1.151 +/* Helper to check that a file exists */
   1.152 +void
   1.153 +_AssertFileExist(const char *filename)
   1.154 +{
   1.155 +	struct stat st;
   1.156 +	int ret = stat(filename, &st);
   1.157 +
   1.158 +	SDLTest_AssertCheck(ret == 0, "Verify file '%s' exists", filename);
   1.159 +}
   1.160 +
   1.161 +
   1.162 +/* Test case functions */
   1.163 +
   1.164 +/**
   1.165 + * @brief Tests sprite saving and loading
   1.166 + */
   1.167 +int
   1.168 +surface_testSaveLoadBitmap(void *arg)
   1.169 +{
   1.170 +    int ret;
   1.171 +    const char *sampleFilename = "testSaveLoadBitmap.bmp";
   1.172 +    SDL_Surface *face;
   1.173 +    SDL_Surface *rface;
   1.174 +
   1.175 +    /* Create sample surface */
   1.176 +    face = SDLTest_ImageFace();
   1.177 +    SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL");
   1.178 +    if (face == NULL) return;
   1.179 +
   1.180 +    /* Delete test file; ignore errors */
   1.181 +    unlink(sampleFilename);
   1.182 +
   1.183 +    /* Save a surface */
   1.184 +    ret = SDL_SaveBMP(face, sampleFilename);
   1.185 +    SDLTest_AssertPass("Call to SDL_SaveBMP()");
   1.186 +    SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SaveBMP, expected: 0, got: %i", ret); 
   1.187 +    _AssertFileExist(sampleFilename);
   1.188 +    	
   1.189 +    /* Load a surface */
   1.190 +    rface = SDL_LoadBMP(sampleFilename);
   1.191 +    SDLTest_AssertPass("Call to SDL_LoadBMP()");
   1.192 +    SDLTest_AssertCheck(rface != NULL, "Verify result from SDL_LoadBMP is not NULL");
   1.193 +    if (rface != NULL) {
   1.194 +	    SDLTest_AssertCheck(face->w == rface->w, "Verify width of loaded surface, expected: %i, got: %i", face->w, rface->w);
   1.195 +	    SDLTest_AssertCheck(face->h == rface->h, "Verify height of loaded surface, expected: %i, got: %i", face->h, rface->h);
   1.196 +    }
   1.197 +
   1.198 +    /* Delete test file; ignore errors */
   1.199 +    unlink(sampleFilename);
   1.200 +
   1.201 +    /* Clean up */
   1.202 +    if (face != NULL) {
   1.203 +	SDL_FreeSurface(face);
   1.204 +	face = NULL;
   1.205 +    }
   1.206 +    if (rface != NULL) {
   1.207 +	SDL_FreeSurface(rface);
   1.208 +	rface = NULL;
   1.209 +    }
   1.210 +    
   1.211 +    return TEST_COMPLETED;
   1.212 +}
   1.213 +
   1.214 +/*!
   1.215 + *  Tests surface conversion.
   1.216 + */
   1.217 +int
   1.218 +surface_testSurfaceConversion(void *arg)
   1.219 +{
   1.220 +	SDL_Surface *rface = NULL, *face = NULL;
   1.221 +	int ret = 0;
   1.222 +
   1.223 +	/* Create sample surface */
   1.224 +	face = SDLTest_ImageFace();
   1.225 +	SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL");
   1.226 +	if (face == NULL) 
   1.227 +		return TEST_ABORTED;
   1.228 +
   1.229 +	/* Set transparent pixel as the pixel at (0,0) */
   1.230 +	if (face->format->palette) {
   1.231 +	   ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels);
   1.232 +	   SDLTest_AssertPass("Call to SDL_SetColorKey()");
   1.233 +	   SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey, expected: 0, got: %i", ret);
   1.234 +	}
   1.235 +
   1.236 +	/* Convert to 32 bit to compare. */
   1.237 +	rface = SDL_ConvertSurface( face, testsurface->format, 0 );
   1.238 +	SDLTest_AssertPass("Call to SDL_ConvertSurface()");
   1.239 +	SDLTest_AssertCheck(rface != NULL, "Verify result from SDL_ConvertSurface is not NULL");
   1.240 +
   1.241 +	/* Compare surface. */
   1.242 +	ret = SDLTest_CompareSurfaces( rface, face, 0 );
   1.243 +	SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.244 +	
   1.245 +	/* Clean up. */
   1.246 +	if (face != NULL) {
   1.247 +		SDL_FreeSurface( face );
   1.248 +		face = NULL;
   1.249 +	}
   1.250 +	if (rface != NULL) {
   1.251 +		SDL_FreeSurface( rface );
   1.252 +		rface = NULL;
   1.253 +	}	
   1.254 +
   1.255 +	return TEST_COMPLETED;
   1.256 +}
   1.257 +
   1.258 +
   1.259 +/**
   1.260 + * @brief Tests sprite loading. A failure case.
   1.261 + */
   1.262 +int
   1.263 +surface_testLoadFailure(void *arg)
   1.264 +{
   1.265 +	SDL_Surface *face = SDL_LoadBMP("nonexistant.bmp");
   1.266 +	SDLTest_AssertCheck(face == NULL, "SDL_CreateLoadBmp");
   1.267 +
   1.268 +	return TEST_COMPLETED;
   1.269 +}
   1.270 +
   1.271 +/**
   1.272 + * @brief Tests some blitting routines.
   1.273 + */
   1.274 +int
   1.275 +surface_testBlit(void *arg)
   1.276 +{
   1.277 +   int ret;
   1.278 +   SDL_Surface *referenceSurface;
   1.279 +
   1.280 +   /* Basic blitting */ 
   1.281 +   _testBlitBlendMode(-1);
   1.282 +   
   1.283 +   /* Verify result by comparing surfaces */
   1.284 +   referenceSurface = SDLTest_ImageBlit();
   1.285 +   ret = SDLTest_CompareSurfaces( testsurface, referenceSurface, 0 );
   1.286 +   SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.287 +   
   1.288 +   /* Clean up. */
   1.289 +   if (referenceSurface != NULL) {   
   1.290 +   	SDL_FreeSurface( referenceSurface );
   1.291 +   }
   1.292 +
   1.293 +   return TEST_COMPLETED;
   1.294 +}
   1.295 +
   1.296 +/**
   1.297 + * @brief Tests some blitting routines with color mod
   1.298 + */
   1.299 +int
   1.300 +surface_testBlitColorMod(void *arg)
   1.301 +{
   1.302 +   int ret;
   1.303 +   SDL_Surface *referenceSurface;
   1.304 +
   1.305 +   /* Basic blitting with color mod */ 
   1.306 +   _testBlitBlendMode(-2);
   1.307 +   
   1.308 +   /* Verify result by comparing surfaces */
   1.309 +   referenceSurface = SDLTest_ImageBlitColor();
   1.310 +   ret = SDLTest_CompareSurfaces( testsurface, referenceSurface, 0 );
   1.311 +   SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.312 +   
   1.313 +   /* Clean up. */
   1.314 +   if (referenceSurface != NULL) {   
   1.315 +   	SDL_FreeSurface( referenceSurface );
   1.316 +   }
   1.317 +
   1.318 +   return TEST_COMPLETED;
   1.319 +}
   1.320 +
   1.321 +/**
   1.322 + * @brief Tests some blitting routines with alpha mod
   1.323 + */
   1.324 +int
   1.325 +surface_testBlitAlphaMod(void *arg)
   1.326 +{
   1.327 +   int ret;
   1.328 +   SDL_Surface *referenceSurface;
   1.329 +
   1.330 +   /* Basic blitting with alpha mod */ 
   1.331 +   _testBlitBlendMode(-3);
   1.332 +   
   1.333 +   /* Verify result by comparing surfaces */
   1.334 +   referenceSurface = SDLTest_ImageBlitAlpha();
   1.335 +   ret = SDLTest_CompareSurfaces( testsurface, referenceSurface, 0 );
   1.336 +   SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.337 +   
   1.338 +   /* Clean up. */
   1.339 +   if (referenceSurface != NULL) {   
   1.340 +   	SDL_FreeSurface( referenceSurface );
   1.341 +   }
   1.342 +
   1.343 +   return TEST_COMPLETED;
   1.344 +}
   1.345 +
   1.346 +
   1.347 +/**
   1.348 + * @brief Tests some more blitting routines.
   1.349 + */
   1.350 +int
   1.351 +surface_testBlitBlendNone(void *arg)
   1.352 +{
   1.353 +   int ret;
   1.354 +   SDL_Surface *referenceSurface;
   1.355 +
   1.356 +   /* Basic blitting */ 
   1.357 +   _testBlitBlendMode(SDL_BLENDMODE_NONE);
   1.358 +   
   1.359 +   /* Verify result by comparing surfaces */
   1.360 +   referenceSurface = SDLTest_ImageBlitBlendNone();
   1.361 +   ret = SDLTest_CompareSurfaces( testsurface, referenceSurface, 0 );
   1.362 +   SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.363 +   
   1.364 +   /* Clean up. */
   1.365 +   if (referenceSurface != NULL) {   
   1.366 +   	SDL_FreeSurface( referenceSurface );
   1.367 +   }
   1.368 +
   1.369 +   return TEST_COMPLETED;
   1.370 +}
   1.371 +
   1.372 +/**
   1.373 + * @brief Tests some more blitting routines.
   1.374 + */
   1.375 +int
   1.376 +surface_testBlitBlendBlend(void *arg)
   1.377 +{
   1.378 +   int ret;
   1.379 +   SDL_Surface *referenceSurface;
   1.380 +
   1.381 +   /* Blend blitting */ 
   1.382 +   _testBlitBlendMode(SDL_BLENDMODE_BLEND);
   1.383 +   
   1.384 +   /* Verify result by comparing surfaces */
   1.385 +   referenceSurface = SDLTest_ImageBlitBlend();
   1.386 +   ret = SDLTest_CompareSurfaces( testsurface, referenceSurface, 0 );
   1.387 +   SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.388 +   
   1.389 +   /* Clean up. */
   1.390 +   if (referenceSurface != NULL) {   
   1.391 +   	SDL_FreeSurface( referenceSurface );
   1.392 +   }
   1.393 +
   1.394 +   return TEST_COMPLETED;
   1.395 +}
   1.396 +
   1.397 +/**
   1.398 + * @brief Tests some more blitting routines.
   1.399 + */
   1.400 +int
   1.401 +surface_testBlitBlendAdd(void *arg)
   1.402 +{
   1.403 +   int ret;
   1.404 +   SDL_Surface *referenceSurface;
   1.405 +
   1.406 +   /* Add blitting */ 
   1.407 +   _testBlitBlendMode(SDL_BLENDMODE_ADD);
   1.408 +   
   1.409 +   /* Verify result by comparing surfaces */
   1.410 +   referenceSurface = SDLTest_ImageBlitBlendAdd();
   1.411 +   ret = SDLTest_CompareSurfaces( testsurface, referenceSurface, 0 );
   1.412 +   SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.413 +   
   1.414 +   /* Clean up. */
   1.415 +   if (referenceSurface != NULL) {   
   1.416 +   	SDL_FreeSurface( referenceSurface );
   1.417 +   }
   1.418 +
   1.419 +   return TEST_COMPLETED;
   1.420 +}
   1.421 +
   1.422 +/**
   1.423 + * @brief Tests some more blitting routines.
   1.424 + */
   1.425 +int
   1.426 +surface_testBlitBlendMod(void *arg)
   1.427 +{
   1.428 +   int ret;
   1.429 +   SDL_Surface *referenceSurface;
   1.430 +
   1.431 +   /* Mod blitting */ 
   1.432 +   _testBlitBlendMode(SDL_BLENDMODE_MOD);
   1.433 +   
   1.434 +   /* Verify result by comparing surfaces */
   1.435 +   referenceSurface = SDLTest_ImageBlitBlendMod();
   1.436 +   ret = SDLTest_CompareSurfaces( testsurface, referenceSurface, 0 );
   1.437 +   SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.438 +   
   1.439 +   /* Clean up. */
   1.440 +   if (referenceSurface != NULL) {   
   1.441 +   	SDL_FreeSurface( referenceSurface );
   1.442 +   }
   1.443 +
   1.444 +   return TEST_COMPLETED;
   1.445 +}
   1.446 +
   1.447 +/**
   1.448 + * @brief Tests some more blitting routines with loop
   1.449 + */
   1.450 +int
   1.451 +surface_testBlitBlendLoop(void *arg) {
   1.452 +
   1.453 +   int ret;
   1.454 +   SDL_Surface *referenceSurface;
   1.455 +
   1.456 +   /* All blitting */ 
   1.457 +   _testBlitBlendMode(-4);
   1.458 +   
   1.459 +   /* Verify result by comparing surfaces */
   1.460 +   referenceSurface = SDLTest_ImageBlitBlendAll();
   1.461 +   ret = SDLTest_CompareSurfaces( testsurface, referenceSurface, 0 );
   1.462 +   SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.463 +   
   1.464 +   /* Clean up. */
   1.465 +   if (referenceSurface != NULL) {   
   1.466 +   	SDL_FreeSurface( referenceSurface );
   1.467 +   }
   1.468 +
   1.469 +   return TEST_COMPLETED;
   1.470 +
   1.471 +}
   1.472 +
   1.473 +/* ================= Test References ================== */
   1.474 +
   1.475 +/* Surface test cases */
   1.476 +static const SDLTest_TestCaseReference surfaceTest1 =
   1.477 +		{ (SDLTest_TestCaseFp)surface_testSaveLoadBitmap, "surface_testSaveLoadBitmap", "Tests sprite saving and loading.", TEST_ENABLED};
   1.478 +
   1.479 +static const SDLTest_TestCaseReference surfaceTest2 =
   1.480 +		{ (SDLTest_TestCaseFp)surface_testBlit, "surface_testBlit", "Tests basic blitting.", TEST_ENABLED};
   1.481 +
   1.482 +static const SDLTest_TestCaseReference surfaceTest3 =
   1.483 +		{ (SDLTest_TestCaseFp)surface_testBlitBlendNone, "surface_testBlitBlendNone", "Tests blitting routines with none blending mode.", TEST_ENABLED};
   1.484 +
   1.485 +static const SDLTest_TestCaseReference surfaceTest4 =
   1.486 +		{ (SDLTest_TestCaseFp)surface_testLoadFailure, "surface_testLoadFailure", "Tests sprite loading. A failure case.", TEST_ENABLED};
   1.487 +
   1.488 +static const SDLTest_TestCaseReference surfaceTest5 =
   1.489 +		{ (SDLTest_TestCaseFp)surface_testSurfaceConversion, "surface_testSurfaceConversion", "Tests surface conversion.", TEST_ENABLED};
   1.490 +
   1.491 +static const SDLTest_TestCaseReference surfaceTest6 =
   1.492 +		{ (SDLTest_TestCaseFp)surface_testBlitColorMod, "surface_testBlitColorMod", "Tests some blitting routines with color mod.", TEST_ENABLED};
   1.493 +
   1.494 +static const SDLTest_TestCaseReference surfaceTest7 =
   1.495 +		{ (SDLTest_TestCaseFp)surface_testBlitAlphaMod, "surface_testBlitAlphaMod", "Tests some blitting routines with alpha mod.", TEST_ENABLED};
   1.496 +
   1.497 +static const SDLTest_TestCaseReference surfaceTest8 =
   1.498 +		{ (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blittin routines with verious blending modes", TEST_ENABLED};
   1.499 +
   1.500 +static const SDLTest_TestCaseReference surfaceTest9 =
   1.501 +		{ (SDLTest_TestCaseFp)surface_testBlitBlendBlend, "surface_testBlitBlendBlend", "Tests blitting routines with blend blending mode.", TEST_ENABLED};
   1.502 +
   1.503 +static const SDLTest_TestCaseReference surfaceTest10 =
   1.504 +		{ (SDLTest_TestCaseFp)surface_testBlitBlendAdd, "surface_testBlitBlendAdd", "Tests blitting routines with add blending mode.", TEST_ENABLED};
   1.505 +
   1.506 +static const SDLTest_TestCaseReference surfaceTest11 =
   1.507 +		{ (SDLTest_TestCaseFp)surface_testBlitBlendMod, "surface_testBlitBlendMod", "Tests blitting routines with mod blending mode.", TEST_ENABLED};
   1.508 +
   1.509 +/* Sequence of Surface test cases */
   1.510 +static const SDLTest_TestCaseReference *surfaceTests[] =  {
   1.511 +	&surfaceTest1, &surfaceTest2, &surfaceTest3, &surfaceTest4, &surfaceTest5,
   1.512 +	&surfaceTest6, &surfaceTest7, &surfaceTest8, &surfaceTest9, &surfaceTest10, &surfaceTest11, NULL
   1.513 +};
   1.514 +
   1.515 +/* Surface test suite (global) */
   1.516 +SDLTest_TestSuiteReference surfaceTestSuite = {
   1.517 +	"Surface",
   1.518 +	_surfaceSetUp,
   1.519 +	surfaceTests,
   1.520 +	_surfaceTearDown
   1.521 +
   1.522 +};