From f902b044d307015a3043dd1dd96f42e2f59ae7ba Mon Sep 17 00:00:00 2001 From: "H. Verbeet" Date: Wed, 16 Jul 2008 22:45:51 +0200 Subject: [PATCH] d3d9: Use color_match() in vshader_version_varying_test(). Also fixes the range on the test, 0x19 plus 1 equals 0x1a, and 0x003c0000 should've been 0x004c0000. --- dlls/d3d9/tests/visual.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 152252356ea..c625214184b 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -5473,19 +5473,13 @@ static void vshader_version_varying_test(IDirect3DDevice9 *device) { ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); color = getPixelColor(device, 160, 120); - ok((color & 0x00ff0000) >= 0x00190000 && (color & 0x00ff0000) <= 0x00210000 && - (color & 0x0000ff00) >= 0x00003300 && (color & 0x0000ff00) <= 0x00003500 && - (color & 0x000000ff) >= 0x00000066 && (color & 0x000000ff) <= 0x00000068, - "vs_3_0 returned color 0x%08x, expected 0x00203366\n", color); + ok(color_match(color, D3DCOLOR_ARGB(0x00, 0x1a, 0x34, 0x67), 1), + "vs_3_0 returned color 0x%08x, expected 0x00193366\n", color); color = getPixelColor(device, 160, 360); - ok((color & 0x00ff0000) >= 0x003c0000 && (color & 0x00ff0000) <= 0x004e0000 && - (color & 0x0000ff00) >= 0x00000000 && (color & 0x0000ff00) <= 0x00000000 && - (color & 0x000000ff) >= 0x00000066 && (color & 0x000000ff) <= 0x00000068, + ok(color_match(color, D3DCOLOR_ARGB(0x00, 0x4d, 0x00, 0x67), 1), "vs_1_1 returned color 0x%08x, expected 0x004c0066\n", color); color = getPixelColor(device, 480, 360); - ok((color & 0x00ff0000) >= 0x003c0000 && (color & 0x00ff0000) <= 0x004e0000 && - (color & 0x0000ff00) >= 0x00000000 && (color & 0x0000ff00) <= 0x00000000 && - (color & 0x000000ff) >= 0x00000066 && (color & 0x000000ff) <= 0x00000068, + ok(color_match(color, D3DCOLOR_ARGB(0x00, 0x4d, 0x00, 0x67), 1), "vs_2_0 returned color 0x%08x, expected 0x004c0066\n", color); /* cleanup */