d3d9/tests: Use todo_wine_if() in tests
Frédéric Delanoy
frederic.delanoy at gmail.com
Tue Feb 16 05:31:58 CST 2016
Signed-off-by: Frédéric Delanoy <frederic.delanoy at gmail.com>
---
dlls/d3d9/tests/device.c | 20 ++++----------------
dlls/d3d9/tests/visual.c | 22 ++++------------------
2 files changed, 8 insertions(+), 34 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 5bf7121..9e0b0f5 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -668,11 +668,7 @@ static void test_fvf_decl_conversion(void)
hr = IDirect3DDevice9_GetFVF(device, &fvf);
ok(SUCCEEDED(hr), "Test %u: Failed to get FVF, hr %#x.\n", i, hr);
- if (decl_to_fvf_tests[i].todo)
- todo_wine ok(fvf == decl_to_fvf_tests[i].fvf,
- "Test %u: Got unexpected FVF %#x, expected %#x.\n",
- i, fvf, decl_to_fvf_tests[i].fvf);
- else
+ todo_wine_if (decl_to_fvf_tests[i].todo)
ok(fvf == decl_to_fvf_tests[i].fvf,
"Test %u: Got unexpected FVF %#x, expected %#x.\n",
i, fvf, decl_to_fvf_tests[i].fvf);
@@ -4483,18 +4479,12 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE);
expected_style = device_style | tests[i].style;
- if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)
- todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n",
- expected_style, style, i);
- else
+ todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)
ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n",
expected_style, style, i);
style = GetWindowLongA(device_window, GWL_EXSTYLE);
expected_style = device_exstyle | tests[i].exstyle;
- if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)
- todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n",
- expected_style, style, i);
- else
+ todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)
ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n",
expected_style, style, i);
@@ -8873,9 +8863,7 @@ static void test_update_volumetexture(void)
ok(SUCCEEDED(hr), "Failed to create volume texture, hr %#x, case %u.\n", hr, i);
hr = IDirect3DDevice9_UpdateTexture(device, (IDirect3DBaseTexture9 *)src, (IDirect3DBaseTexture9 *)dst);
- if (FAILED(hr))
- todo_wine ok(SUCCEEDED(hr), "Failed to update texture, hr %#x, case %u.\n", hr, i);
- else
+ todo_wine_if (FAILED(hr))
ok(SUCCEEDED(hr), "Failed to update texture, hr %#x, case %u.\n", hr, i);
IDirect3DVolumeTexture9_Release(src);
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 8b56dbe..274777b 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -1450,15 +1450,11 @@ static void color_fill_test(void)
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, fmt=%s.\n", hr, formats[i].name);
hr = IDirect3DDevice9_ColorFill(device, surface, NULL, 0xdeadbeef);
- if (formats[i].flags & TODO_FILL_RETURN)
- todo_wine ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
- else
+ todo_wine_if (formats[i].flags & TODO_FILL_RETURN)
ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
hr = IDirect3DDevice9_ColorFill(device, surface, &rect, 0xdeadbeef);
- if (formats[i].flags & TODO_FILL_RETURN)
- todo_wine ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
- else
+ todo_wine_if (formats[i].flags & TODO_FILL_RETURN)
ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
if (SUCCEEDED(hr))
@@ -8472,14 +8468,7 @@ static void test_shademode(void)
* functionality being available. */
/* PHONG should be the same as GOURAUD, since no hardware implements
* this. */
- if (tests[i].todo)
- {
- todo_wine ok(color_match(color0, tests[i].color0, 1), "Test %u shading has color0 %08x, expected %08x.\n",
- i, color0, tests[i].color0);
- todo_wine ok(color_match(color1, tests[i].color1, 1), "Test %u shading has color1 %08x, expected %08x.\n",
- i, color1, tests[i].color1);
- }
- else
+ todo_wine_if (tests[i].todo)
{
ok(color_match(color0, tests[i].color0, 1), "Test %u shading has color0 %08x, expected %08x.\n",
i, color0, tests[i].color0);
@@ -18123,10 +18112,7 @@ static void test_fog_interpolation(void)
color = getPixelColor(device, 0, 240);
ok(color_match(color, 0x000000ff, 2), "Got unexpected color 0x%08x, case %u.\n", color, i);
color = getPixelColor(device, 320, 240);
- if (tests[i].todo)
- todo_wine ok(color_match(color, tests[i].middle_color, 2),
- "Got unexpected color 0x%08x, case %u.\n", color, i);
- else
+ todo_wine_if (tests[i].todo)
ok(color_match(color, tests[i].middle_color, 2),
"Got unexpected color 0x%08x, case %u.\n", color, i);
color = getPixelColor(device, 639, 240);
--
2.7.1
More information about the wine-patches
mailing list