test/testautomation_surface.c
changeset 6822 18f6818ba281
parent 6811 60d95fcfaf3c
child 7172 b3569dff1c6e
     1.1 --- a/test/testautomation_surface.c	Wed Jan 23 08:03:19 2013 -0800
     1.2 +++ b/test/testautomation_surface.c	Thu Jan 24 07:58:59 2013 -0800
     1.3 @@ -326,19 +326,19 @@
     1.4  surface_testBlit(void *arg)
     1.5  {
     1.6     int ret;
     1.7 -   SDL_Surface *referenceSurface;
     1.8 +   SDL_Surface *compareSurface;
     1.9  
    1.10     /* Basic blitting */ 
    1.11     _testBlitBlendMode(-1);
    1.12     
    1.13     /* Verify result by comparing surfaces */
    1.14 -   referenceSurface = SDLTest_ImageBlit();
    1.15 -   ret = SDLTest_CompareSurfaces( testSurface, referenceSurface, 0 );
    1.16 +   compareSurface = SDLTest_ImageBlit();
    1.17 +   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
    1.18     SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
    1.19     
    1.20     /* Clean up. */
    1.21 -   if (referenceSurface != NULL) {   
    1.22 -   	SDL_FreeSurface( referenceSurface );
    1.23 +   if (compareSurface != NULL) {   
    1.24 +   	SDL_FreeSurface( compareSurface );
    1.25     }
    1.26  
    1.27     return TEST_COMPLETED;
    1.28 @@ -351,19 +351,19 @@
    1.29  surface_testBlitColorMod(void *arg)
    1.30  {
    1.31     int ret;
    1.32 -   SDL_Surface *referenceSurface;
    1.33 +   SDL_Surface *compareSurface;
    1.34  
    1.35     /* Basic blitting with color mod */ 
    1.36     _testBlitBlendMode(-2);
    1.37     
    1.38     /* Verify result by comparing surfaces */
    1.39 -   referenceSurface = SDLTest_ImageBlitColor();
    1.40 -   ret = SDLTest_CompareSurfaces( testSurface, referenceSurface, 0 );
    1.41 +   compareSurface = SDLTest_ImageBlitColor();
    1.42 +   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
    1.43     SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
    1.44     
    1.45     /* Clean up. */
    1.46 -   if (referenceSurface != NULL) {   
    1.47 -   	SDL_FreeSurface( referenceSurface );
    1.48 +   if (compareSurface != NULL) {   
    1.49 +   	SDL_FreeSurface( compareSurface );
    1.50     }
    1.51  
    1.52     return TEST_COMPLETED;
    1.53 @@ -376,19 +376,19 @@
    1.54  surface_testBlitAlphaMod(void *arg)
    1.55  {
    1.56     int ret;
    1.57 -   SDL_Surface *referenceSurface;
    1.58 +   SDL_Surface *compareSurface;
    1.59  
    1.60     /* Basic blitting with alpha mod */ 
    1.61     _testBlitBlendMode(-3);
    1.62     
    1.63     /* Verify result by comparing surfaces */
    1.64 -   referenceSurface = SDLTest_ImageBlitAlpha();
    1.65 -   ret = SDLTest_CompareSurfaces( testSurface, referenceSurface, 0 );
    1.66 +   compareSurface = SDLTest_ImageBlitAlpha();
    1.67 +   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
    1.68     SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
    1.69     
    1.70     /* Clean up. */
    1.71 -   if (referenceSurface != NULL) {   
    1.72 -   	SDL_FreeSurface( referenceSurface );
    1.73 +   if (compareSurface != NULL) {   
    1.74 +   	SDL_FreeSurface( compareSurface );
    1.75     }
    1.76  
    1.77     return TEST_COMPLETED;
    1.78 @@ -402,19 +402,19 @@
    1.79  surface_testBlitBlendNone(void *arg)
    1.80  {
    1.81     int ret;
    1.82 -   SDL_Surface *referenceSurface;
    1.83 +   SDL_Surface *compareSurface;
    1.84  
    1.85     /* Basic blitting */ 
    1.86     _testBlitBlendMode(SDL_BLENDMODE_NONE);
    1.87     
    1.88     /* Verify result by comparing surfaces */
    1.89 -   referenceSurface = SDLTest_ImageBlitBlendNone();
    1.90 -   ret = SDLTest_CompareSurfaces( testSurface, referenceSurface, 0 );
    1.91 +   compareSurface = SDLTest_ImageBlitBlendNone();
    1.92 +   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
    1.93     SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
    1.94     
    1.95     /* Clean up. */
    1.96 -   if (referenceSurface != NULL) {   
    1.97 -   	SDL_FreeSurface( referenceSurface );
    1.98 +   if (compareSurface != NULL) {   
    1.99 +   	SDL_FreeSurface( compareSurface );
   1.100     }
   1.101  
   1.102     return TEST_COMPLETED;
   1.103 @@ -427,19 +427,19 @@
   1.104  surface_testBlitBlendBlend(void *arg)
   1.105  {
   1.106     int ret;
   1.107 -   SDL_Surface *referenceSurface;
   1.108 +   SDL_Surface *compareSurface;
   1.109  
   1.110     /* Blend blitting */ 
   1.111     _testBlitBlendMode(SDL_BLENDMODE_BLEND);
   1.112     
   1.113     /* Verify result by comparing surfaces */
   1.114 -   referenceSurface = SDLTest_ImageBlitBlend();
   1.115 -   ret = SDLTest_CompareSurfaces( testSurface, referenceSurface, 0 );
   1.116 +   compareSurface = SDLTest_ImageBlitBlend();
   1.117 +   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   1.118     SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.119     
   1.120     /* Clean up. */
   1.121 -   if (referenceSurface != NULL) {   
   1.122 -   	SDL_FreeSurface( referenceSurface );
   1.123 +   if (compareSurface != NULL) {   
   1.124 +   	SDL_FreeSurface( compareSurface );
   1.125     }
   1.126  
   1.127     return TEST_COMPLETED;
   1.128 @@ -452,19 +452,19 @@
   1.129  surface_testBlitBlendAdd(void *arg)
   1.130  {
   1.131     int ret;
   1.132 -   SDL_Surface *referenceSurface;
   1.133 +   SDL_Surface *compareSurface;
   1.134  
   1.135     /* Add blitting */ 
   1.136     _testBlitBlendMode(SDL_BLENDMODE_ADD);
   1.137     
   1.138     /* Verify result by comparing surfaces */
   1.139 -   referenceSurface = SDLTest_ImageBlitBlendAdd();
   1.140 -   ret = SDLTest_CompareSurfaces( testSurface, referenceSurface, 0 );
   1.141 +   compareSurface = SDLTest_ImageBlitBlendAdd();
   1.142 +   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   1.143     SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.144     
   1.145     /* Clean up. */
   1.146 -   if (referenceSurface != NULL) {   
   1.147 -   	SDL_FreeSurface( referenceSurface );
   1.148 +   if (compareSurface != NULL) {   
   1.149 +   	SDL_FreeSurface( compareSurface );
   1.150     }
   1.151  
   1.152     return TEST_COMPLETED;
   1.153 @@ -477,19 +477,19 @@
   1.154  surface_testBlitBlendMod(void *arg)
   1.155  {
   1.156     int ret;
   1.157 -   SDL_Surface *referenceSurface;
   1.158 +   SDL_Surface *compareSurface;
   1.159  
   1.160     /* Mod blitting */ 
   1.161     _testBlitBlendMode(SDL_BLENDMODE_MOD);
   1.162     
   1.163     /* Verify result by comparing surfaces */
   1.164 -   referenceSurface = SDLTest_ImageBlitBlendMod();
   1.165 -   ret = SDLTest_CompareSurfaces( testSurface, referenceSurface, 0 );
   1.166 +   compareSurface = SDLTest_ImageBlitBlendMod();
   1.167 +   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   1.168     SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.169     
   1.170     /* Clean up. */
   1.171 -   if (referenceSurface != NULL) {   
   1.172 -   	SDL_FreeSurface( referenceSurface );
   1.173 +   if (compareSurface != NULL) {   
   1.174 +   	  SDL_FreeSurface( compareSurface );
   1.175     }
   1.176  
   1.177     return TEST_COMPLETED;
   1.178 @@ -502,19 +502,19 @@
   1.179  surface_testBlitBlendLoop(void *arg) {
   1.180  
   1.181     int ret;
   1.182 -   SDL_Surface *referenceSurface;
   1.183 +   SDL_Surface *compareSurface;
   1.184  
   1.185     /* All blitting modes */ 
   1.186     _testBlitBlendMode(-4);
   1.187     
   1.188     /* Verify result by comparing surfaces */
   1.189 -   referenceSurface = SDLTest_ImageBlitBlendAll();
   1.190 -   ret = SDLTest_CompareSurfaces( testSurface, referenceSurface, 0 );
   1.191 +   compareSurface = SDLTest_ImageBlitBlendAll();
   1.192 +   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   1.193     SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   1.194     
   1.195     /* Clean up. */
   1.196 -   if (referenceSurface != NULL) {   
   1.197 -   	SDL_FreeSurface( referenceSurface );
   1.198 +   if (compareSurface != NULL) {   
   1.199 +   	 SDL_FreeSurface(compareSurface);
   1.200     }
   1.201  
   1.202     return TEST_COMPLETED;