Commit 3e532140 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

ddraw/tests: Use todo_wine_if() in tests.

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