diff test/automated/surface/surface.c @ 3477:2c07bb579922

We want to be strict on software renderer tests and opaque tests, but give a decent margin for blending inaccuracy for the blended tests.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 21 Nov 2009 07:59:19 +0000
parents da53c4046c65
children c32c53fca10d
line wrap: on
line diff
--- a/test/automated/surface/surface.c	Sat Nov 21 07:46:12 2009 +0000
+++ b/test/automated/surface/surface.c	Sat Nov 21 07:59:19 2009 +0000
@@ -69,7 +69,7 @@
 
    /* See if it's the same. */
    if (SDL_ATassert( "Primitives output not the same.",
-            surface_compare( rface, &img_face)==0 ))
+            surface_compare( rface, &img_face, 0 )==0 ))
       return;
 
    /* Clean up. */
@@ -159,7 +159,7 @@
 
    /* See if it's the same. */
    if (SDL_ATassert( "Primitives output not the same.",
-            surface_compare( testsur, &img_primitives )==0 ))
+            surface_compare( testsur, &img_primitives, 0 )==0 ))
       return;
 
    SDL_ATend();
@@ -241,7 +241,7 @@
 
    /* See if it's the same. */
    if (SDL_ATassert( "Primitives output not the same.",
-            surface_compare( testsur, &img_blend )==0 ))
+            surface_compare( testsur, &img_blend, 0 )==0 ))
       return;
 
    SDL_ATend();
@@ -304,7 +304,7 @@
 
    /* See if it's the same. */
    if (SDL_ATassert( "Blitting output not the same (normal blit).",
-            surface_compare( testsur, &img_blit )==0 ))
+            surface_compare( testsur, &img_blit, 0 )==0 ))
       return;
 
    /* Clear surface. */
@@ -332,7 +332,7 @@
 
    /* See if it's the same. */
    if (SDL_ATassert( "Blitting output not the same (using SDL_SetSurfaceColorMod).",
-            surface_compare( testsur, &img_blitColour )==0 ))
+            surface_compare( testsur, &img_blitColour, 0 )==0 ))
       return;
 
    /* Clear surface. */
@@ -365,7 +365,7 @@
 
    /* See if it's the same. */
    if (SDL_ATassert( "Blitting output not the same (using SDL_SetSurfaceAlphaMod).",
-            surface_compare( testsur, &img_blitAlpha )==0 ))
+            surface_compare( testsur, &img_blitAlpha, 0 )==0 ))
       return;
 
    /* Clean up. */
@@ -473,35 +473,35 @@
    if (surface_testBlitBlendMode( testsur, face, SDL_BLENDMODE_NONE ))
       return;
    if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLENDMODE_NONE).",
-            surface_compare( testsur, &img_blendNone )==0 ))
+            surface_compare( testsur, &img_blendNone, 0 )==0 ))
       return;
 
    /* Test Mask. */
    if (surface_testBlitBlendMode( testsur, face, SDL_BLENDMODE_MASK ))
       return;
    if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLENDMODE_MASK).",
-            surface_compare( testsur, &img_blendMask )==0 ))
+            surface_compare( testsur, &img_blendMask, 0 )==0 ))
       return;
 
    /* Test Blend. */
    if (surface_testBlitBlendMode( testsur, face, SDL_BLENDMODE_BLEND ))
       return;
    if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLENDMODE_BLEND).",
-            surface_compare( testsur, &img_blendBlend )==0 ))
+            surface_compare( testsur, &img_blendBlend, 0 )==0 ))
       return;
 
    /* Test Add. */
    if (surface_testBlitBlendMode( testsur, face, SDL_BLENDMODE_ADD ))
       return;
    if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLENDMODE_ADD).",
-            surface_compare( testsur, &img_blendAdd )==0 ))
+            surface_compare( testsur, &img_blendAdd, 0 )==0 ))
       return;
 
    /* Test Mod. */
    if (surface_testBlitBlendMode( testsur, face, SDL_BLENDMODE_MOD ))
       return;
    if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLENDMODE_MOD).",
-            surface_compare( testsur, &img_blendMod )==0 ))
+            surface_compare( testsur, &img_blendMod, 0 )==0 ))
       return;
 
    /* Clear surface. */
@@ -545,7 +545,7 @@
 
    /* Check to see if matches. */
    if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLEND_*).",
-            surface_compare( testsur, &img_blendAll )==0 ))
+            surface_compare( testsur, &img_blendAll, 0 )==0 ))
       return;
 
    /* Clean up. */