Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
This patch series is just some tests cleanup, it shouldn't change the tested behavior or the results. It's there in preparation for some work on wined3d window styles.
dlls/d3d9/tests/d3d9ex.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index d0967f0ac05..d1437726860 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -123,12 +123,6 @@ out:
static HWND create_window(void) { - WNDCLASSA wc = {0}; - - wc.lpfnWndProc = DefWindowProcA; - wc.lpszClassName = "d3d9_test_wc"; - RegisterClassA(&wc); - return CreateWindowA("d3d9_test_wc", "d3d9_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); } @@ -4911,6 +4905,7 @@ static void test_pinned_buffers(void) START_TEST(d3d9ex) { DEVMODEW current_mode; + WNDCLASSA wc = {0};
d3d9_handle = LoadLibraryA("d3d9.dll"); if (!d3d9_handle) @@ -4937,6 +4932,10 @@ START_TEST(d3d9ex) return; }
+ wc.lpfnWndProc = DefWindowProcA; + wc.lpszClassName = "d3d9_test_wc"; + RegisterClassA(&wc); + test_qi_base_to_ex(); test_qi_ex_to_base(); test_swapchain_get_displaymode_ex(); @@ -4962,4 +4961,6 @@ START_TEST(d3d9ex) test_resource_access(); test_sysmem_draw(); test_pinned_buffers(); + + UnregisterClassA("d3d9_test_wc", GetModuleHandleA(NULL)); }
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/d3d8/tests/device.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 19351da0912..008395df1a6 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -3784,11 +3784,13 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | WS_VISIBLE; - todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x.\n", + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, + "Expected device window style %#x, got %#x.\n", expected_style, style); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle | WS_EX_TOPMOST; - todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x.\n", + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, + "Expected device window extended style %#x, got %#x.\n", expected_style, style);
style = GetWindowLongA(focus_window, GWL_STYLE); @@ -3802,7 +3804,8 @@ static void test_window_style(void) ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r)); GetClientRect(device_window, &r); - todo_wine ok(!EqualRect(&r, &fullscreen_rect), "Client rect and window rect are equal.\n"); + todo_wine ok(!EqualRect(&r, &fullscreen_rect) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, + "Client rect and window rect are equal.\n"); GetWindowRect(focus_window, &r); ok(EqualRect(&r, &focus_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&focus_rect), wine_dbgstr_rect(&r));
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=66455
Your paranoid android.
=== w8 (32 bit report) ===
d3d8: device.c:1680: Test failed: Reset failed, hr 0x80070057. device.c:1682: Test failed: TestCooperativeLevel failed, hr 0x88760869. 0f0c:device: unhandled exception c0000005 at 6A0973ED
=== w1064v1809_ar (32 bit report) ===
d3d8: device.c:999: Test failed: The cursor handle is 00010019
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/d3d9/tests/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 8c1ebc1719c..86936b0cc17 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -4859,12 +4859,12 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | tests[i].style; - todo_wine ok(style == expected_style || broken(style == (expected_style & 0xff000000)), + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, "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; - todo_wine ok(style == expected_style || broken(style == (expected_style & 0xff)), + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i);
@@ -4883,7 +4883,7 @@ static void test_window_style(void) ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s, i=%u.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r), i); GetClientRect(device_window, &r2); - todo_wine ok(!EqualRect(&r, &r2) || broken(!(style & WS_THICKFRAME)), + todo_wine ok(!EqualRect(&r, &r2) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, "Client rect and window rect are equal, i=%u.\n", i); GetWindowRect(focus_window, &r); ok(EqualRect(&r, &focus_rect), "Expected %s, got %s, i=%u.\n",
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/d3d9/tests/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 86936b0cc17..d00a26b942c 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -4919,19 +4919,19 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | tests[i].focus_loss_style | tests[i].style; - todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x.\n", - expected_style, style); + todo_wine 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; - todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x.\n", - expected_style, style); + todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + expected_style, style, i);
style = GetWindowLongA(focus_window, GWL_STYLE); - ok(style == focus_style, "Expected focus window style %#x, got %#x.\n", - focus_style, style); + ok(style == focus_style, "Expected focus window style %#x, got %#x, i=%u.\n", + focus_style, style, i); style = GetWindowLongA(focus_window, GWL_EXSTYLE); - ok(style == focus_exstyle, "Expected focus window extended style %#x, got %#x.\n", - focus_exstyle, style); + ok(style == focus_exstyle, "Expected focus window extended style %#x, got %#x, i=%u.\n", + focus_exstyle, style, i);
/* In d3d8 follow-up tests fail on native if the device is destroyed while * lost. This doesn't happen in d3d9 on my test machine but it still seems
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=66457
Your paranoid android.
=== w1064v1809_ar (32 bit report) ===
d3d9: device.c:1810: Test failed: The cursor handle is 00010019
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/d3d9/tests/d3d9ex.c | 48 ++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 21 deletions(-)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index d1437726860..17dd3c5c12e 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -3514,13 +3514,15 @@ static void test_window_style(void) }
style = GetWindowLongA(device_window, GWL_STYLE); - todo_wine ok((style & ~WS_OVERLAPPEDWINDOW) == (device_style & ~WS_OVERLAPPEDWINDOW), + expected_style = device_style; + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window style %#x, got %#x, i=%u.\n", - device_style, style, i); + expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); - todo_wine ok((style & ~WS_EX_OVERLAPPEDWINDOW) == (device_exstyle & ~WS_EX_OVERLAPPEDWINDOW), + expected_style = device_exstyle; + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window extended style %#x, got %#x, i=%u.\n", - device_exstyle, style, i); + expected_style, style, i);
style = GetWindowLongA(focus_window, GWL_STYLE); ok(style == focus_style, "Expected focus window style %#x, got %#x, i=%u.\n", @@ -3537,8 +3539,8 @@ static void test_window_style(void) ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s, i=%u.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r), i); GetClientRect(device_window, &r2); - if (!(device_style & WS_OVERLAPPEDWINDOW)) - ok(!EqualRect(&r, &r2), "Client rect and window rect are equal, i=%u.\n", i); + todo_wine ok(!EqualRect(&r, &r2) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, + "Client rect and window rect are equal, i=%u.\n", i); GetWindowRect(focus_window, &r); ok(EqualRect(&r, &focus_rect), "Expected %s, got %s, i=%u.\n", wine_dbgstr_rect(&focus_rect), wine_dbgstr_rect(&r), i); @@ -3548,12 +3550,14 @@ static void test_window_style(void) ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr);
style = GetWindowLongA(device_window, GWL_STYLE); + expected_style = device_style; 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); + ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", + expected_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); + expected_style = device_exstyle; + todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + expected_style, style, i);
style = GetWindowLongA(focus_window, GWL_STYLE); ok(style == focus_style, "Expected focus window style %#x, got %#x, i=%u.\n", @@ -3566,12 +3570,14 @@ 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); - 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); + expected_style = device_style; + todo_wine_if (!(tests[i].style_flags & WS_VISIBLE)) + ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", + expected_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); + expected_style = device_exstyle; + todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + expected_style, style, i);
style = GetWindowLongA(focus_window, GWL_STYLE); ok(style == focus_style, "Expected focus window style %#x, got %#x, i=%u.\n", @@ -3587,13 +3593,12 @@ static void test_window_style(void) ok(!!device, "Failed to create a D3D device.\n"); style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | tests[i].create2_style; - todo_wine ok((style & ~WS_OVERLAPPEDWINDOW) == (expected_style & ~WS_OVERLAPPEDWINDOW), + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); - expected_style = device_exstyle | tests[i].create2_exstyle; style = GetWindowLongA(device_window, GWL_EXSTYLE); - todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) - ok((style & ~WS_EX_OVERLAPPEDWINDOW) == (expected_style & ~WS_EX_OVERLAPPEDWINDOW), + expected_style = device_exstyle | tests[i].create2_exstyle; + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i);
@@ -3624,8 +3629,9 @@ static void test_window_style(void) todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", expected_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); + expected_style = device_exstyle; + todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + expected_style, style, i);
style = GetWindowLongA(focus_window, GWL_STYLE); ok(style == focus_style, "Expected focus window style %#x, got %#x, i=%u.\n",
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com