From fa56de2cd67c661b358e38883aba48144c28e759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Sat, 20 Feb 2016 16:20:58 +0100 Subject: [PATCH] user32/tests: Use todo_wine_if() in tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frédéric Delanoy Signed-off-by: Alexandre Julliard --- dlls/user32/tests/listbox.c | 3 +-- dlls/user32/tests/msg.c | 7 +------ dlls/user32/tests/win.c | 20 +++++++------------- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index 9380457ea1f..ba400f9b076 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -125,8 +125,7 @@ keypress (HWND handle, WPARAM keycode, BYTE scancode, BOOL extended) t.s.f, got.f) #define listbox_todo_field_ok(t, s, f, got) \ - if (t.s##_todo.f) todo_wine { listbox_field_ok(t, s, f, got); } \ - else listbox_field_ok(t, s, f, got) + todo_wine_if (t.s##_todo.f) { listbox_field_ok(t, s, f, got); } #define listbox_ok(t, s, got) \ listbox_todo_field_ok(t, s, selected, got); \ diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 3d4bea55e43..94fe4cb64b0 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -13985,12 +13985,7 @@ static void test_WaitForInputIdle( char *argv0 ) broken(ret == wait_idle_expect[i].broken), "%u: WaitForInputIdle error %08x expected %08x\n", i, ret, wait_idle_expect[i].exp ); - else if (wait_idle_expect[i].todo) - todo_wine - ok( ret == wait_idle_expect[i].exp || broken(ret == wait_idle_expect[i].broken), - "%u: WaitForInputIdle error %08x expected %08x\n", - i, ret, wait_idle_expect[i].exp ); - else + else todo_wine_if (wait_idle_expect[i].todo) ok( ret == wait_idle_expect[i].exp || broken(ret == wait_idle_expect[i].broken), "%u: WaitForInputIdle error %08x expected %08x\n", i, ret, wait_idle_expect[i].exp ); diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 70c07e01077..71459e14f35 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -4179,10 +4179,8 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle dwExStyleOut = dwExStyleIn & ~WS_EX_WINDOWEDGE; ok(dwActualStyle == dwStyleOut, "expected style %#x, got %#x\n", dwStyleOut, dwActualStyle); /* FIXME: Remove the condition below once Wine is fixed */ - if (dwActualExStyle != dwExStyleOut) - todo_wine ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle); - else - ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle); + todo_wine_if (dwActualExStyle != dwExStyleOut) + ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle); DestroyWindow(hwnd); if (hwndParent) DestroyWindow(hwndParent); @@ -4309,10 +4307,8 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou else ex_style_out = ex_style_in & ~WS_EX_WINDOWEDGE; /* FIXME: Remove the condition below once Wine is fixed */ - if (ex_style != ex_style_out) - todo_wine ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style); - else - ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style); + todo_wine_if (ex_style != ex_style_out) + ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style); DestroyWindow(hwnd); DestroyWindow(parent); @@ -5001,8 +4997,8 @@ static void zero_parentdc_test(struct parentdc_test *t) t.w.r.f, got.w.r.f) #define parentdc_todo_field_ok(t, w, r, f, got) \ - if (t.w##_todo.r.f) todo_wine { parentdc_field_ok(t, w, r, f, got); } \ - else parentdc_field_ok(t, w, r, f, got) + todo_wine_if (t.w##_todo.r.f) \ + parentdc_field_ok(t, w, r, f, got); #define parentdc_rect_ok(t, w, r, got) \ parentdc_todo_field_ok(t, w, r, left, got); \ @@ -6423,9 +6419,7 @@ static void run_NCRedrawLoop(UINT flags) DispatchMessageA(&msg); MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT); } - if (flags == (RDW_INVALIDATE | RDW_FRAME)) - todo_wine ok(loopcount < 100, "Detected infinite WM_PAINT loop (%x).\n", flags); - else + todo_wine_if (flags == (RDW_INVALIDATE | RDW_FRAME)) ok(loopcount < 100, "Detected infinite WM_PAINT loop (%x).\n", flags); DestroyWindow(hwnd); }