=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: ddraw/tests: Use a slop for test_shademode.

Alexandre Julliard julliard at wine.codeweavers.com
Sun Jan 3 14:24:15 CST 2016


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

Author: Stefan Dösinger <stefandoesinger at gmx.at>
Date:   Fri Jan  1 18:24:51 2016 +0000

ddraw/tests: Use a slop for test_shademode.

Signed-off-by: Stefan Dösinger <stefandoesinger at gmx.at>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ddraw/tests/ddraw1.c | 4 ++--
 dlls/ddraw/tests/ddraw2.c | 4 ++--
 dlls/ddraw/tests/ddraw4.c | 4 ++--
 dlls/ddraw/tests/ddraw7.c | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index 33d60b0..9dcf1f6 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -7951,9 +7951,9 @@ static void test_shademode(void)
          * functionality being available. */
         /* PHONG should be the same as GOURAUD, since no hardware implements
          * this. */
-        ok(color0 == tests[i].color0, "Test %u shading has color0 %08x, expected %08x.\n",
+        ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08x, expected %08x.\n",
                 i, color0, tests[i].color0);
-        ok(color1 == tests[i].color1, "Test %u shading has color1 %08x, expected %08x.\n",
+        ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08x, expected %08x.\n",
                 i, color1, tests[i].color1);
     }
 
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index f92067b..47da233 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -9054,9 +9054,9 @@ static void test_shademode(void)
          * functionality being available. */
         /* PHONG should be the same as GOURAUD, since no hardware implements
          * this. */
-        ok(color0 == tests[i].color0, "Test %u shading has color0 %08x, expected %08x.\n",
+        ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08x, expected %08x.\n",
                 i, color0, tests[i].color0);
-        ok(color1 == tests[i].color1, "Test %u shading has color1 %08x, expected %08x.\n",
+        ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08x, expected %08x.\n",
                 i, color1, tests[i].color1);
     }
 
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index 78e2aa0..1f05cec 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -10223,9 +10223,9 @@ static void test_shademode(void)
          * functionality being available. */
         /* PHONG should be the same as GOURAUD, since no hardware implements
          * this. */
-        ok(color0 == tests[i].color0, "Test %u shading has color0 %08x, expected %08x.\n",
+        ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08x, expected %08x.\n",
                 i, color0, tests[i].color0);
-        ok(color1 == tests[i].color1, "Test %u shading has color1 %08x, expected %08x.\n",
+        ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08x, expected %08x.\n",
                 i, color1, tests[i].color1);
     }
 
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index 632dc7d..f7a71b8 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -10506,9 +10506,9 @@ static void test_shademode(void)
          * functionality being available. */
         /* PHONG should be the same as GOURAUD, since no hardware implements
          * this. */
-        ok(color0 == tests[i].color0, "Test %u shading has color0 %08x, expected %08x.\n",
+        ok(compare_color(color0, tests[i].color0, 1), "Test %u shading has color0 %08x, expected %08x.\n",
                 i, color0, tests[i].color0);
-        ok(color1 == tests[i].color1, "Test %u shading has color1 %08x, expected %08x.\n",
+        ok(compare_color(color1, tests[i].color1, 1), "Test %u shading has color1 %08x, expected %08x.\n",
                 i, color1, tests[i].color1);
     }
 




More information about the wine-cvs mailing list