Chip Davis : d3d9/tests: Use compare_uint() in a couple more places.
Alexandre Julliard
julliard at winehq.org
Mon Apr 6 15:53:22 CDT 2020
Module: wine
Branch: master
Commit: ea70874aa10a663c3045dafab34533ccb488938f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ea70874aa10a663c3045dafab34533ccb488938f
Author: Chip Davis <cdavis at codeweavers.com>
Date: Fri Apr 3 10:57:55 2020 -0500
d3d9/tests: Use compare_uint() in a couple more places.
Signed-off-by: Chip Davis <cdavis at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d9/tests/visual.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 92116b3eb8..f873f3ae9b 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -1514,7 +1514,7 @@ static void test_clear_different_size_surfaces(void)
depth = (WORD *)((BYTE *)lr.pBits + y * lr.Pitch);
for (x = 0; x < 4; ++x)
{
- ok(abs(depth[x] - 0x7fff) <= 2, "Got depth 0x%04x at %u, %u.\n", depth[x], x, y);
+ ok(compare_uint(depth[x], 0x7fff, 2), "Got depth 0x%04x at %u, %u.\n", depth[x], x, y);
}
}
hr = IDirect3DSurface9_UnlockRect(ds);
@@ -1729,7 +1729,7 @@ static void color_fill_test(void)
/* Windows drivers disagree on how to promote the 8 bit per channel
* input argument to 16 bit for D3DFMT_G16R16. */
ok(color_match(surface_data[0], formats[i].fill_value, 2) &&
- abs((expected_a) - (fill_a)) < 3,
+ compare_uint(expected_a, fill_a, 2),
"Expected clear value 0x%08x, got 0x%08x, fmt=%s.\n",
formats[i].fill_value, surface_data[0], formats[i].name);
hr = IDirect3DSurface9_UnlockRect(surface);
More information about the wine-cvs
mailing list