=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: d3d8/tests: Use todo_wine_if( ) in tests.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Feb 17 11:15:04 CST 2016
Module: wine
Branch: master
Commit: cdf961a0f1b164bb5a1605dc3e3c6b6870d9fe24
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cdf961a0f1b164bb5a1605dc3e3c6b6870d9fe24
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Tue Feb 16 23:16:02 2016 +0100
d3d8/tests: Use todo_wine_if() in tests.
Signed-off-by: Frédéric Delanoy <frederic.delanoy at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d8/tests/device.c | 16 ++++------------
dlls/d3d8/tests/visual.c | 5 +----
2 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index 5dba46c..32e2f09 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -2712,10 +2712,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 = IDirect3DDevice8_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 = focus_loss_messages;
/* SetForegroundWindow is a poor replacement for the user pressing alt-tab or
@@ -2736,9 +2734,7 @@ static void test_wndproc(void)
ok(hr == D3DERR_DEVICELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice8_TestCooperativeLevel(device);
/* Focus-follows-mouse WMs prematurely reactivate our window. */
- if (hr == D3DERR_DEVICENOTRESET)
- todo_wine ok(hr == D3DERR_DEVICELOST, "Got unexpected hr %#x.\n", hr);
- else
+ todo_wine_if (hr == D3DERR_DEVICENOTRESET)
ok(hr == D3DERR_DEVICELOST, "Got unexpected hr %#x.\n", hr);
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode);
@@ -6313,9 +6309,7 @@ static void test_update_volumetexture(void)
ok(SUCCEEDED(hr), "Failed to create volume texture, hr %#x, case %u.\n", hr, i);
hr = IDirect3DDevice8_UpdateTexture(device, (IDirect3DBaseTexture8 *)src, (IDirect3DBaseTexture8 *)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);
IDirect3DVolumeTexture8_Release(src);
@@ -7837,9 +7831,7 @@ static void test_swapchain_parameters(void)
for (j = 0; j < bb_count; ++j)
{
hr = IDirect3DDevice8_GetBackBuffer(device, j, D3DBACKBUFFER_TYPE_MONO, &backbuffer);
- if (j)
- todo_wine ok(SUCCEEDED(hr), "Failed to get backbuffer %u, hr %#x, test %u.\n", j, hr, i);
- else
+ todo_wine_if (j)
ok(SUCCEEDED(hr), "Failed to get backbuffer %u, hr %#x, test %u.\n", j, hr, i);
if (SUCCEEDED(hr))
IDirect3DSurface8_Release(backbuffer);
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
index db2e0db..856df5d 100644
--- a/dlls/d3d8/tests/visual.c
+++ b/dlls/d3d8/tests/visual.c
@@ -5829,10 +5829,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);
More information about the wine-cvs
mailing list