Commit f6bb6e98 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

d3d9/tests: Don't test functions directly when reporting GetLastError().

parent 4ac05afd
......@@ -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));
......
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