Module: wine Branch: master Commit: 079686b707d494db1306d9a62bc1d184050c1c0c URL: http://source.winehq.org/git/wine.git/?a=commit;h=079686b707d494db1306d9a62b...
Author: H. Verbeet hverbeet@gmail.com Date: Wed Jun 25 00:32:08 2008 +0200
d3d9: Use color_match() in fog_with_shader_test().
---
dlls/d3d9/tests/visual.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index ad5bab2..1a9b5fc 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -1463,9 +1463,7 @@ static void fog_with_shader_test(IDirect3DDevice9 *device)
/* As the red and green component are the result of blending use 5% tolerance on the expected value */ color = getPixelColor(device, 128, 240); - ok((unsigned char)(color) == ((unsigned char)test_data[i].color[j]) - && abs( ((unsigned char)(color>>8)) - (unsigned char)(test_data[i].color[j]>>8) ) < 13 - && abs( ((unsigned char)(color>>16)) - (unsigned char)(test_data[i].color[j]>>16) ) < 13, + ok(color_match(color, test_data[i].color[j], 13), "fog vs%i ps%i fvm%i ftm%i %d: got color %08x, expected %08x +-5%%\n", test_data[i].vshader, test_data[i].pshader, test_data[i].vfog, test_data[i].tfog, j, color, test_data[i].color[j]); }