[PATCH 1/4] ddraw/tests: Don't test functions directly when reporting GetLastError()
Signed-off-by: André Hentschel <nerv(a)dawncrow.de> --- dlls/ddraw/tests/ddraw1.c | 28 +++++++++++++++++++--------- dlls/ddraw/tests/ddraw2.c | 28 +++++++++++++++++++--------- dlls/ddraw/tests/ddraw4.c | 28 +++++++++++++++++++--------- dlls/ddraw/tests/ddraw7.c | 28 +++++++++++++++++++--------- 4 files changed, 76 insertions(+), 36 deletions(-) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index e1a315f291f..df5c8ac8400 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -13964,6 +13964,7 @@ static void test_cursor_clipping(void) IDirectDraw *ddraw; HWND window; HRESULT hr; + BOOL ret; window = create_window(); ok(!!window, "Failed to create a window.\n"); @@ -13986,9 +13987,11 @@ static void test_cursor_clipping(void) goto done; } - ok(ClipCursor(NULL), "ClipCursor failed, error %#x.\n", GetLastError()); + ret = ClipCursor(NULL); + ok(ret, "ClipCursor failed, error %#x.\n", GetLastError()); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -13997,7 +14000,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -14010,7 +14014,8 @@ static void test_cursor_clipping(void) } flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -14018,7 +14023,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -14027,7 +14033,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -14040,7 +14047,8 @@ static void test_cursor_clipping(void) } flush_events(); SetRect(&rect, 0, 0, param.new_width, param.new_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -14049,7 +14057,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -14058,7 +14067,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 849d510a349..bc915c97864 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -14925,6 +14925,7 @@ static void test_cursor_clipping(void) IDirectDraw2 *ddraw; HWND window; HRESULT hr; + BOOL ret; window = create_window(); ok(!!window, "Failed to create a window.\n"); @@ -14947,9 +14948,11 @@ static void test_cursor_clipping(void) goto done; } - ok(ClipCursor(NULL), "ClipCursor failed, error %#x.\n", GetLastError()); + ret = ClipCursor(NULL); + ok(ret, "ClipCursor failed, error %#x.\n", GetLastError()); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -14958,7 +14961,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -14971,7 +14975,8 @@ static void test_cursor_clipping(void) } flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -14979,7 +14984,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -14988,7 +14994,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -15001,7 +15008,8 @@ static void test_cursor_clipping(void) } flush_events(); SetRect(&rect, 0, 0, param.new_width, param.new_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -15010,7 +15018,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -15019,7 +15028,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 56a4777add5..f009b4583f4 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -17985,6 +17985,7 @@ static void test_cursor_clipping(void) IDirectDraw4 *ddraw; HWND window; HRESULT hr; + BOOL ret; window = create_window(); ok(!!window, "Failed to create a window.\n"); @@ -18007,9 +18008,11 @@ static void test_cursor_clipping(void) goto done; } - ok(ClipCursor(NULL), "ClipCursor failed, error %#x.\n", GetLastError()); + ret = ClipCursor(NULL); + ok(ret, "ClipCursor failed, error %#x.\n", GetLastError()); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18018,7 +18021,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18031,7 +18035,8 @@ static void test_cursor_clipping(void) } flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18039,7 +18044,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18048,7 +18054,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18061,7 +18068,8 @@ static void test_cursor_clipping(void) } flush_events(); SetRect(&rect, 0, 0, param.new_width, param.new_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18070,7 +18078,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18079,7 +18088,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index c9ba50287be..613f8dae98b 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -18247,6 +18247,7 @@ static void test_cursor_clipping(void) IDirectDraw7 *ddraw; HWND window; HRESULT hr; + BOOL ret; window = create_window(); ok(!!window, "Failed to create a window.\n"); @@ -18269,9 +18270,11 @@ static void test_cursor_clipping(void) goto done; } - ok(ClipCursor(NULL), "ClipCursor failed, error %#x.\n", GetLastError()); + ret = ClipCursor(NULL); + ok(ret, "ClipCursor failed, error %#x.\n", GetLastError()); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18280,7 +18283,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18293,7 +18297,8 @@ static void test_cursor_clipping(void) } flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18301,7 +18306,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18310,7 +18316,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18323,7 +18330,8 @@ static void test_cursor_clipping(void) } flush_events(); SetRect(&rect, 0, 0, param.new_width, param.new_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18332,7 +18340,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "RestoreDisplayMode failed, hr %#x.\n", hr); flush_events(); SetRect(&rect, 0, 0, param.old_width, param.old_height); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); @@ -18341,7 +18350,8 @@ static void test_cursor_clipping(void) ok(hr == DD_OK, "SetCooperativeLevel failed, hr %#x.\n", hr); flush_events(); get_virtual_rect(&rect); - ok(GetClipCursor(&clip_rect), "GetClipCursor failed, error %#x.\n", GetLastError()); + ret = GetClipCursor(&clip_rect); + ok(ret, "GetClipCursor failed, error %#x.\n", GetLastError()); ok(EqualRect(&clip_rect, &rect), "Expect clip rect %s, got %s.\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&clip_rect)); -- 2.25.1
Signed-off-by: André Hentschel <nerv(a)dawncrow.de> --- dlls/d3d9/tests/device.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 0343fade792..1bb69935df6 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -14159,8 +14159,8 @@ static void test_multi_adapter(void) ok(!!monitor, "Adapter %u: Failed to get monitor.\n", i); monitor_info.cbSize = sizeof(monitor_info); - ok(GetMonitorInfoA(monitor, (MONITORINFO *)&monitor_info), - "Adapter %u: Failed to get monitor info, error %#x.\n", i, GetLastError()); + ret = GetMonitorInfoA(monitor, (MONITORINFO *)&monitor_info); + ok(!ret, "Adapter %u: Failed to get monitor info, error %#x.\n", i, GetLastError()); if (!i) ok(monitor_info.dwFlags == MONITORINFOF_PRIMARY, @@ -14351,6 +14351,7 @@ static void test_cursor_clipping(void) IDirect3D9 *d3d; HWND window; HRESULT hr; + BOOL ret; window = create_window(); ok(!!window, "Failed to create a window.\n"); @@ -14377,10 +14378,12 @@ static void test_cursor_clipping(void) "Adapter %u: Failed to find a different mode than %ux%u.\n", adapter_idx, current_mode.Width, current_mode.Height); - ok(ClipCursor(NULL), "Adapter %u: ClipCursor failed, error %#x.\n", adapter_idx, + ret = ClipCursor(NULL); + ok(ret, "Adapter %u: ClipCursor failed, error %#x.\n", adapter_idx, GetLastError()); get_virtual_rect(&virtual_rect); - ok(GetClipCursor(&clip_rect), "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ret = GetClipCursor(&clip_rect); + ok(ret, "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u: Expect clip rect %s, got %s.\n", adapter_idx, wine_dbgstr_rect(&virtual_rect), wine_dbgstr_rect(&clip_rect)); @@ -14395,7 +14398,8 @@ static void test_cursor_clipping(void) } flush_events(); get_virtual_rect(&virtual_rect); - ok(GetClipCursor(&clip_rect), "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ret = GetClipCursor(&clip_rect); + ok(ret, "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u: Expect clip rect %s, got %s.\n", adapter_idx, wine_dbgstr_rect(&virtual_rect), wine_dbgstr_rect(&clip_rect)); @@ -14403,7 +14407,8 @@ static void test_cursor_clipping(void) IDirect3DDevice9_Release(device); flush_events(); get_virtual_rect(&virtual_rect); - ok(GetClipCursor(&clip_rect), "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ret = GetClipCursor(&clip_rect); + ok(ret, "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u: Expect clip rect %s, got %s.\n", adapter_idx, wine_dbgstr_rect(&virtual_rect), wine_dbgstr_rect(&clip_rect)); -- 2.25.1
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=83601 Your paranoid android. === w2008s64 (32 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0. === w7u_2qxl (32 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0. device.c:14163: Test failed: Adapter 1: Failed to get monitor info, error 0. === w7u_adm (32 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0. === w7u_el (32 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0. === w8 (32 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0. === w8adm (32 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0. === w864 (32 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0. === w1064v1507 (32 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0. === w1064v1809 (32 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x12a. === w1064 (32 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x12a. === w10pro64 (32 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x12a. === wvistau64 (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x583. === w2008s64 (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x583. === w864 (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0. === w1064v1507 (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0. === w1064v1809 (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x12a. === w1064 (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x12a. === w1064_2qxl (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x12a. device.c:14163: Test failed: Adapter 1: Failed to get monitor info, error 0x12a. === w10pro64 (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x12a. === w10pro64_ar (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x12a. === w10pro64_he (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x12a. === w10pro64_ja (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x12a. === w10pro64_zh_CN (64 bit report) === d3d9: device.c:14163: Test failed: Adapter 0: Failed to get monitor info, error 0x12a.
On Sat, 19 Dec 2020 at 15:54, André Hentschel <nerv(a)dawncrow.de> wrote:
@@ -14159,8 +14159,8 @@ static void test_multi_adapter(void) ok(!!monitor, "Adapter %u: Failed to get monitor.\n", i);
monitor_info.cbSize = sizeof(monitor_info); - ok(GetMonitorInfoA(monitor, (MONITORINFO *)&monitor_info), - "Adapter %u: Failed to get monitor info, error %#x.\n", i, GetLastError()); + ret = GetMonitorInfoA(monitor, (MONITORINFO *)&monitor_info); + ok(!ret, "Adapter %u: Failed to get monitor info, error %#x.\n", i, GetLastError());
This changes behaviour.
Am 04.01.21 um 16:22 schrieb Henri Verbeet:
On Sat, 19 Dec 2020 at 15:54, André Hentschel <nerv(a)dawncrow.de> wrote:
@@ -14159,8 +14159,8 @@ static void test_multi_adapter(void) ok(!!monitor, "Adapter %u: Failed to get monitor.\n", i);
monitor_info.cbSize = sizeof(monitor_info); - ok(GetMonitorInfoA(monitor, (MONITORINFO *)&monitor_info), - "Adapter %u: Failed to get monitor info, error %#x.\n", i, GetLastError()); + ret = GetMonitorInfoA(monitor, (MONITORINFO *)&monitor_info); + ok(!ret, "Adapter %u: Failed to get monitor info, error %#x.\n", i, GetLastError());
This changes behaviour.
oops, good catch!
Signed-off-by: André Hentschel <nerv(a)dawncrow.de> --- dlls/d3d8/tests/device.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 45cf0f20eda..ffd940067e8 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -10465,8 +10465,8 @@ static void test_multi_adapter(void) ok(!!monitor, "Adapter %u: Failed to get monitor.\n", i); monitor_info.cbSize = sizeof(monitor_info); - ok(GetMonitorInfoA(monitor, (MONITORINFO *)&monitor_info), - "Adapter %u: Failed to get monitor info, error %#x.\n", i, GetLastError()); + ret = GetMonitorInfoA(monitor, (MONITORINFO *)&monitor_info); + ok(ret, "Adapter %u: Failed to get monitor info, error %#x.\n", i, GetLastError()); if (!i) ok(monitor_info.dwFlags == MONITORINFOF_PRIMARY, @@ -10597,6 +10597,7 @@ static void test_cursor_clipping(void) IDirect3D8 *d3d; HWND window; HRESULT hr; + BOOL ret; window = create_window(); ok(!!window, "Failed to create a window.\n"); @@ -10625,10 +10626,12 @@ static void test_cursor_clipping(void) "Adapter %u: Failed to find a different mode than %ux%u.\n", adapter_idx, current_mode.Width, current_mode.Height); - ok(ClipCursor(NULL), "Adapter %u: ClipCursor failed, error %#x.\n", adapter_idx, + ret = ClipCursor(NULL); + ok(ret, "Adapter %u: ClipCursor failed, error %#x.\n", adapter_idx, GetLastError()); get_virtual_rect(&virtual_rect); - ok(GetClipCursor(&clip_rect), "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ret = GetClipCursor(&clip_rect); + ok(ret, "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u: Expect clip rect %s, got %s.\n", adapter_idx, wine_dbgstr_rect(&virtual_rect), wine_dbgstr_rect(&clip_rect)); @@ -10643,7 +10646,8 @@ static void test_cursor_clipping(void) } flush_events(); get_virtual_rect(&virtual_rect); - ok(GetClipCursor(&clip_rect), "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ret = GetClipCursor(&clip_rect); + ok(ret, "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u: Expect clip rect %s, got %s.\n", adapter_idx, wine_dbgstr_rect(&virtual_rect), wine_dbgstr_rect(&clip_rect)); @@ -10651,7 +10655,8 @@ static void test_cursor_clipping(void) IDirect3DDevice8_Release(device); flush_events(); get_virtual_rect(&virtual_rect); - ok(GetClipCursor(&clip_rect), "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ret = GetClipCursor(&clip_rect); + ok(ret, "Adapter %u: GetClipCursor failed, error %#x.\n", adapter_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u: Expect clip rect %s, got %s.\n", adapter_idx, wine_dbgstr_rect(&virtual_rect), wine_dbgstr_rect(&clip_rect)); -- 2.25.1
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=83602 Your paranoid android. === w8 (32 bit report) === d3d8: device.c:1727: Test failed: D3DVIEWPORT->Width = 400. device.c:1728: Test failed: D3DVIEWPORT->Height = 300.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: André Hentschel <nerv(a)dawncrow.de> --- dlls/dxgi/tests/dxgi.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index 3c3a57806a4..53d768d1a36 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -5475,8 +5475,8 @@ static void test_multi_adapter(void) /* Should have the same monitor rectangle. */ monitor_info.cbSize = sizeof(monitor_info); - ok(GetMonitorInfoA(monitor, &monitor_info), - "Adapter %u output %u: Failed to get monitor info, error %#x.\n", adapter_index, + ret = GetMonitorInfoA(monitor, &monitor_info); + ok(ret, "Adapter %u output %u: Failed to get monitor info, error %#x.\n", adapter_index, output_index, GetLastError()); ok(EqualRect(&monitor_info.rcMonitor, &output_desc.DesktopCoordinates), "Adapter %u output %u: Got unexpected output rect %s, expected %s.\n", @@ -6572,6 +6572,7 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) IDXGIOutput *output; ULONG refcount; HRESULT hr; + BOOL ret; get_factory(device, is_d3d12, &factory); @@ -6622,11 +6623,12 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) "Adapter %u output %u: Failed to find a different mode than %ux%u.\n", adapter_idx, output_idx, width, height); - ok(ClipCursor(NULL), "Adapter %u output %u: ClipCursor failed, error %#x.\n", + ret = ClipCursor(NULL); + ok(ret, "Adapter %u output %u: ClipCursor failed, error %#x.\n", adapter_idx, output_idx, GetLastError()); get_virtual_rect(&virtual_rect); - ok(GetClipCursor(&clip_rect), - "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ret = GetClipCursor(&clip_rect); + ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, output_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u output %u: Expect clip rect %s, got %s.\n", adapter_idx, output_idx, @@ -6647,8 +6649,8 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) flush_events(); get_virtual_rect(&virtual_rect); - ok(GetClipCursor(&clip_rect), - "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ret = GetClipCursor(&clip_rect); + ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, output_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u output %u: Expect clip rect %s, got %s.\n", adapter_idx, output_idx, @@ -6671,8 +6673,8 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) flush_events(); get_virtual_rect(&virtual_rect); - ok(GetClipCursor(&clip_rect), - "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ret = GetClipCursor(&clip_rect); + ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, output_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u output %u: Expect clip rect %s, got %s.\n", adapter_idx, output_idx, @@ -6691,8 +6693,8 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) flush_events(); get_virtual_rect(&virtual_rect); - ok(GetClipCursor(&clip_rect), - "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, + ret = GetClipCursor(&clip_rect); + ok(ret, "Adapter %u output %u: GetClipCursor failed, error %#x.\n", adapter_idx, output_idx, GetLastError()); ok(EqualRect(&clip_rect, &virtual_rect), "Adapter %u output %u: Expect clip rect %s, got %s.\n", adapter_idx, output_idx, -- 2.25.1
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=83603 Your paranoid android. === w1064v1507 (32 bit report) === dxgi: dxgi.c:5689: Test failed: Got unexpected message 0x31f, hwnd 000A0160, wparam 0x1, lparam 0. === w1064v1507 (64 bit report) === dxgi: dxgi.c:5990: Test failed: Test 4: Got exstyle 0x108, expected 0x100. dxgi.c:6006: Test failed: Test 4: Got exstyle 0x108, expected 0x100. dxgi.c:6035: Test failed: Test 4: Got exstyle 0x108, expected 0x100. dxgi.c:6064: Test failed: Test 4: Got exstyle 0x108, expected 0x100. dxgi.c:6081: Test failed: Test 4: Got exstyle 0x108, expected 0x100.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
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=83600 Your paranoid android. === w8 (32 bit report) === ddraw: ddraw7.c:3091: Test failed: Failed to create surface, hr 0x887601c2. 0cc0:ddraw7: unhandled exception c0000005 at 0053096D === debiant (build log) === The task timed out
participants (4)
-
André Hentschel -
Henri Verbeet -
Henri Verbeet -
Marvin