ddraw/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:
parent
8a902f3761
commit
3e53214092
|
@ -3312,17 +3312,9 @@ static void FindDevice(void)
|
|||
|
||||
hr = IDirect3D_FindDevice(Direct3D1, &search, &result);
|
||||
|
||||
if (deviceGUIDs[i].todo)
|
||||
{
|
||||
todo_wine
|
||||
todo_wine_if (deviceGUIDs[i].todo)
|
||||
ok(hr == D3D_OK,
|
||||
"[%d] Expected IDirect3D1::FindDevice to return D3D_OK, got 0x%08x\n", i, hr);
|
||||
}
|
||||
else
|
||||
{
|
||||
ok(hr == D3D_OK,
|
||||
"[%d] Expected IDirect3D1::FindDevice to return D3D_OK, got 0x%08x\n", i, hr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Curiously the color model criteria seem to be ignored. */
|
||||
|
|
|
@ -7240,18 +7240,12 @@ static void test_color_fill(void)
|
|||
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, surface %s.\n", hr, tests[i].name);
|
||||
|
||||
hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
|
||||
if (tests[i].format.dwFourCC)
|
||||
todo_wine ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
else
|
||||
todo_wine_if (tests[i].format.dwFourCC)
|
||||
ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
|
||||
hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
|
||||
if (tests[i].format.dwFourCC)
|
||||
todo_wine ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
else
|
||||
todo_wine_if (tests[i].format.dwFourCC)
|
||||
ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
|
||||
|
|
|
@ -8394,18 +8394,12 @@ static void test_color_fill(void)
|
|||
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, surface %s.\n", hr, tests[i].name);
|
||||
|
||||
hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
|
||||
if (tests[i].format.dwFourCC)
|
||||
todo_wine ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
else
|
||||
todo_wine_if (tests[i].format.dwFourCC)
|
||||
ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
|
||||
hr = IDirectDrawSurface_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
|
||||
if (tests[i].format.dwFourCC)
|
||||
todo_wine ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
else
|
||||
todo_wine_if (tests[i].format.dwFourCC)
|
||||
ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
|
||||
|
|
|
@ -5201,11 +5201,7 @@ static void test_block_formats_creation(void)
|
|||
expect_hr = D3D_OK;
|
||||
|
||||
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL);
|
||||
if (todo)
|
||||
todo_wine ok(hr == expect_hr,
|
||||
"Got unexpected hr %#x for format %s, resource type %s, size %ux%u, expected %#x.\n",
|
||||
hr, formats[i].name, types[j].name, w, h, expect_hr);
|
||||
else
|
||||
todo_wine_if (todo)
|
||||
ok(hr == expect_hr,
|
||||
"Got unexpected hr %#x for format %s, resource type %s, size %ux%u, expected %#x.\n",
|
||||
hr, formats[i].name, types[j].name, w, h, expect_hr);
|
||||
|
@ -9348,18 +9344,12 @@ static void test_color_fill(void)
|
|||
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, surface %s.\n", hr, tests[i].name);
|
||||
|
||||
hr = IDirectDrawSurface4_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
|
||||
if (tests[i].format.dwFourCC)
|
||||
todo_wine ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
else
|
||||
todo_wine_if (tests[i].format.dwFourCC)
|
||||
ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
|
||||
hr = IDirectDrawSurface4_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
|
||||
if (tests[i].format.dwFourCC)
|
||||
todo_wine ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
else
|
||||
todo_wine_if (tests[i].format.dwFourCC)
|
||||
ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
|
||||
|
|
|
@ -4996,11 +4996,7 @@ static void test_block_formats_creation(void)
|
|||
expect_hr = D3D_OK;
|
||||
|
||||
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL);
|
||||
if (todo)
|
||||
todo_wine ok(hr == expect_hr,
|
||||
"Got unexpected hr %#x for format %s, resource type %s, size %ux%u, expected %#x.\n",
|
||||
hr, formats[i].name, types[j].name, w, h, expect_hr);
|
||||
else
|
||||
todo_wine_if (todo)
|
||||
ok(hr == expect_hr,
|
||||
"Got unexpected hr %#x for format %s, resource type %s, size %ux%u, expected %#x.\n",
|
||||
hr, formats[i].name, types[j].name, w, h, expect_hr);
|
||||
|
@ -8862,10 +8858,7 @@ static void test_fog_interpolation(void)
|
|||
color = get_surface_color(rt, 0, 240);
|
||||
ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x, case %u.\n", color, i);
|
||||
color = get_surface_color(rt, 320, 240);
|
||||
if (tests[i].todo)
|
||||
todo_wine ok(compare_color(color, tests[i].middle_color, 2),
|
||||
"Got unexpected color 0x%08x, case %u.\n", color, i);
|
||||
else
|
||||
todo_wine_if (tests[i].todo)
|
||||
ok(compare_color(color, tests[i].middle_color, 2),
|
||||
"Got unexpected color 0x%08x, case %u.\n", color, i);
|
||||
color = get_surface_color(rt, 639, 240);
|
||||
|
@ -9618,18 +9611,12 @@ static void test_color_fill(void)
|
|||
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, surface %s.\n", hr, tests[i].name);
|
||||
|
||||
hr = IDirectDrawSurface7_Blt(surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
|
||||
if (tests[i].format.dwFourCC)
|
||||
todo_wine ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
else
|
||||
todo_wine_if (tests[i].format.dwFourCC)
|
||||
ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
|
||||
hr = IDirectDrawSurface7_Blt(surface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
|
||||
if (tests[i].format.dwFourCC)
|
||||
todo_wine ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
else
|
||||
todo_wine_if (tests[i].format.dwFourCC)
|
||||
ok(hr == tests[i].colorfill_hr, "Blt returned %#x, expected %#x, surface %s.\n",
|
||||
hr, tests[i].colorfill_hr, tests[i].name);
|
||||
|
||||
|
@ -10737,10 +10724,7 @@ static void test_lockrect_invalid(void)
|
|||
locked_desc.dwSize = sizeof(locked_desc);
|
||||
|
||||
hr = IDirectDrawSurface7_Lock(surface, rect, &locked_desc, DDLOCK_WAIT, NULL);
|
||||
if (SUCCEEDED(resources[r].hr))
|
||||
todo_wine ok(hr == resources[r].hr, "Lock returned %#x for rect [%d, %d]->[%d, %d], type %s.\n",
|
||||
hr, rect->left, rect->top, rect->right, rect->bottom, resources[r].name);
|
||||
else
|
||||
todo_wine_if (SUCCEEDED(resources[r].hr))
|
||||
ok(hr == resources[r].hr, "Lock returned %#x for rect [%d, %d]->[%d, %d], type %s.\n",
|
||||
hr, rect->left, rect->top, rect->right, rect->bottom, resources[r].name);
|
||||
if (SUCCEEDED(hr))
|
||||
|
|
Loading…
Reference in New Issue