=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: ddraw/tests: Add some slop to the fog tests.

Alexandre Julliard julliard at winehq.org
Fri Sep 16 13:28:30 CDT 2011


Module: wine
Branch: master
Commit: eac78fd488bfe928d16e4d2573da1f3a43562bfa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=eac78fd488bfe928d16e4d2573da1f3a43562bfa

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Thu Sep 15 23:12:09 2011 +0200

ddraw/tests: Add some slop to the fog tests.

---

 dlls/ddraw/tests/visual.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/ddraw/tests/visual.c b/dlls/ddraw/tests/visual.c
index 3cb698f..96c940f 100644
--- a/dlls/ddraw/tests/visual.c
+++ b/dlls/ddraw/tests/visual.c
@@ -586,15 +586,15 @@ static void fog_test(IDirect3DDevice7 *device)
     }
 
     color = getPixelColor(device, 160, 360);
-    ok(color == 0x00FF0000, "Untransformed vertex with no table or vertex fog has color %08x\n", color);
+    ok(color_match(color, 0x00FF0000, 1), "Untransformed vertex with no table or vertex fog has color %08x\n", color);
     color = getPixelColor(device, 160, 120);
-    ok(color == 0x0000FF00, "Untransformed vertex with linear vertex fog has color %08x\n", color);
+    ok(color_match(color, 0x0000FF00, 1), "Untransformed vertex with linear vertex fog has color %08x\n", color);
     color = getPixelColor(device, 480, 120);
-    ok(color == 0x00FFFF00, "Transformed vertex with linear vertex fog has color %08x\n", color);
+    ok(color_match(color, 0x00FFFF00, 1), "Transformed vertex with linear vertex fog has color %08x\n", color);
     if(caps.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_FOGTABLE)
     {
         color = getPixelColor(device, 480, 360);
-        ok(color == 0x0000FF00, "Transformed vertex with linear table fog has color %08x\n", color);
+        ok(color_match(color, 0x0000FF00, 1), "Transformed vertex with linear table fog has color %08x\n", color);
     }
     else
     {
@@ -641,7 +641,7 @@ static void fog_test(IDirect3DDevice7 *device)
         color = getPixelColor(device, 160, 360);
         ok(color_match(color, 0x00ff0000, 4), "Unfogged quad has color %08x\n", color);
         color = getPixelColor(device, 160, 120);
-        ok(color == 0x0000ff00, "Fogged out quad has color %08x\n", color);
+        ok(color_match(color, 0x0000ff00, 1), "Fogged out quad has color %08x\n", color);
 
         /* Test fog behavior with an orthogonal (but not identity) projection matrix */
         hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, (D3DMATRIX *)world_mat2);
@@ -673,7 +673,7 @@ static void fog_test(IDirect3DDevice7 *device)
         color = getPixelColor(device, 160, 360);
         todo_wine ok(color_match(color, 0x00e51900, 4), "Partially fogged quad has color %08x\n", color);
         color = getPixelColor(device, 160, 120);
-        ok(color == 0x0000ff00, "Fogged out quad has color %08x\n", color);
+        ok(color_match(color, 0x0000ff00, 1), "Fogged out quad has color %08x\n", color);
 
         hr = IDirect3DDevice7_SetTransform(device, D3DTRANSFORMSTATE_WORLD, (D3DMATRIX *)ident_mat);
         ok(hr == D3D_OK, "SetTransform returned %#08x\n", hr);




More information about the wine-cvs mailing list