d3d9/tests: Use todo_wine_if() in tests.

Signed-off-by: Frédéric Delanoy <frederic.delanoy@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Frédéric Delanoy 2016-02-16 23:16:01 +01:00 committed by Alexandre Julliard
parent 3e53214092
commit 77c05ebc4e
3 changed files with 11 additions and 45 deletions

View File

@ -2869,12 +2869,9 @@ static void test_window_style(void)
ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr);
style = GetWindowLongA(device_window, GWL_STYLE);
if (tests[i].style_flags & WS_VISIBLE)
todo_wine_if (!(tests[i].style_flags & WS_VISIBLE))
ok(style == device_style, "Expected device window style %#x, got %#x, i=%u.\n",
device_style, style, i);
else
todo_wine ok(style == device_style, "Expected device window style %#x, got %#x, i=%u.\n",
device_style, style, i);
style = GetWindowLongA(device_window, GWL_EXSTYLE);
todo_wine ok(style == device_exstyle, "Expected device window extended style %#x, got %#x, i=%u.\n",
device_exstyle, style, i);
@ -2890,12 +2887,9 @@ static void test_window_style(void)
ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref);
style = GetWindowLongA(device_window, GWL_STYLE);
if (device_style & WS_VISIBLE)
todo_wine_if (!(device_style & WS_VISIBLE))
ok(style == device_style, "Expected device window style %#x, got %#x, i=%u.\n",
device_style, style, i);
else
todo_wine ok(style == device_style, "Expected device window style %#x, got %#x, i=%u.\n",
device_style, style, i);
style = GetWindowLongA(device_window, GWL_EXSTYLE);
todo_wine ok(style == device_exstyle, "Expected device window extended style %#x, got %#x, i=%u.\n",
device_exstyle, style, i);

View File

@ -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);
@ -3681,10 +3677,8 @@ static void test_wndproc(void)
* But sometimes focus-follows-mouse WMs also temporarily drop window focus, which makes
* mark the device lost, then not reset, causing the test to succeed for the wrong reason. */
hr = IDirect3DDevice9_TestCooperativeLevel(device);
if (hr == D3DERR_DEVICENOTRESET)
todo_wine_if (hr != D3DERR_DEVICENOTRESET)
ok(hr == D3DERR_DEVICENOTRESET, "Got unexpected hr %#x.\n", hr);
else
todo_wine ok(hr == D3DERR_DEVICENOTRESET, "Got unexpected hr %#x.\n", hr);
expect_messages = tests[i].focus_loss_messages;
/* SetForegroundWindow is a poor replacement for the user pressing alt-tab or
@ -4483,18 +4477,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 +8861,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);

View File

@ -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);