Commit 8a7e7ec6 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

user32/tests: Simplify some tests using todo_wine_if().

parent 10437c02
......@@ -394,17 +394,8 @@ static void test_GetNextDlgItem(void)
{
HWND a;
a = (p->tab ? GetNextDlgTabItem : GetNextDlgGroupItem) (hwnd[p->dlg], hwnd[p->ctl], p->prev);
if (p->isok)
{
todo_wine_if (!p->isok)
ok (a == hwnd[p->res], "Test %d: %s %s item of %d in %d was %d instead of %d\n", p->test, p->prev ? "Prev" : "Next", p->tab ? "Tab" : "Group", p->ctl, p->dlg, id(a), p->res);
}
else
{
todo_wine
{
ok (a == hwnd[p->res], "Test %d: %s %s item of %d in %d was actually %d matching expected %d\n", p->test, p->prev ? "Prev" : "Next", p->tab ? "Tab" : "Group", p->ctl, p->dlg, id(a), p->res);
}
}
p++;
}
}
......
......@@ -2382,13 +2382,7 @@ static DWORD WINAPI test_menu_input_thread(LPVOID lpParameter)
return 0;
}
if (menu_tests[i]._todo_wine)
{
todo_wine {
ok(menu_tests[i].bMenuVisible == bMenuVisible, "test %d\n", i);
}
}
else
todo_wine_if (menu_tests[i]._todo_wine)
ok(menu_tests[i].bMenuVisible == bMenuVisible, "test %d\n", i);
}
return 0;
......@@ -2450,11 +2444,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam,
if (pGetMenuInfo) /* Skip on NT */
{
/* Native returns handle to destroyed window */
if (msg==WM_UNINITMENUPOPUP && popmenu==1)
todo_wine ok(!mbi.hwndMenu == !popmenu,
"msg %x: GetMenuBarInfo.hwndMenu wrong: %p expected %sNULL\n",
msg, mbi.hwndMenu, popmenu ? "not " : "");
else
todo_wine_if (msg==WM_UNINITMENUPOPUP && popmenu==1)
ok(!mbi.hwndMenu == !popmenu,
"msg %x: GetMenuBarInfo.hwndMenu wrong: %p expected %sNULL\n",
msg, mbi.hwndMenu, popmenu ? "not " : "");
......
......@@ -524,11 +524,11 @@ static void test_work_area(void)
wp.rcNormalPosition.left, wp.rcNormalPosition.top,
wp.rcNormalPosition.right, wp.rcNormalPosition.bottom);
OffsetRect(&wp.rcNormalPosition, rc_work.left, rc_work.top);
if (mi.rcMonitor.left != mi.rcWork.left ||
todo_wine_if (mi.rcMonitor.left != mi.rcWork.left ||
mi.rcMonitor.top != mi.rcWork.top) /* FIXME: remove once Wine is fixed */
todo_wine ok(EqualRect(&rc_normal, &wp.rcNormalPosition), "normal pos is different\n");
else
{
ok(EqualRect(&rc_normal, &wp.rcNormalPosition), "normal pos is different\n");
}
SetWindowLongA(hwnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
......
......@@ -11805,13 +11805,7 @@ static void test_ShowWindow(void)
"expected -1,-1 got %d,%d\n", wp.ptMinPosition.x, wp.ptMinPosition.y);
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
"expected -1,-1 got %d,%d\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
if (work_rc.left || work_rc.top) todo_wine /* FIXME: remove once Wine is fixed */
ok(EqualRect(&win_rc, &wp.rcNormalPosition),
"expected %d,%d-%d,%d got %d,%d-%d,%d\n",
win_rc.left, win_rc.top, win_rc.right, win_rc.bottom,
wp.rcNormalPosition.left, wp.rcNormalPosition.top,
wp.rcNormalPosition.right, wp.rcNormalPosition.bottom);
else
todo_wine_if (work_rc.left || work_rc.top) /* FIXME: remove once Wine is fixed */
ok(EqualRect(&win_rc, &wp.rcNormalPosition),
"expected %d,%d-%d,%d got %d,%d-%d,%d\n",
win_rc.left, win_rc.top, win_rc.right, win_rc.bottom,
......@@ -15106,9 +15100,7 @@ static void test_SendMessage_other_thread(int thread_n)
ret = GetQueueStatus(QS_SENDMESSAGE|QS_POSTMESSAGE);
/* FIXME: remove once Wine is fixed */
if (thread_n == 2) todo_wine
ok(ret == 0, "wrong status %08x\n", ret);
else
todo_wine_if (thread_n == 2)
ok(ret == 0, "wrong status %08x\n", ret);
trace("main: call PeekMessage\n");
......
......@@ -2495,9 +2495,7 @@ static void test_WM_DISPLAYCHANGE(void)
continue;
}
if(start_bpp != test_bpps[i]) {
todo_wine ok(last_bpp == test_bpps[i], "Set bpp %d, but WM_DISPLAYCHANGE reported bpp %d\n", test_bpps[i], last_bpp);
} else {
todo_wine_if(start_bpp != test_bpps[i]) {
ok(last_bpp == test_bpps[i], "Set bpp %d, but WM_DISPLAYCHANGE reported bpp %d\n", test_bpps[i], last_bpp);
}
last_set_bpp = test_bpps[i];
......
......@@ -7702,9 +7702,7 @@ static void test_child_window_from_point(void)
ok(hwnd != 0, "RealChildWindowFromPoint failed\n");
ret = window_to_index(hwnd, window, sizeof(window)/sizeof(window[0]));
/* FIXME: remove once Wine is fixed */
if (ret != real_child_pos[i])
todo_wine ok(ret == real_child_pos[i] || broken(ret == real_child_pos_nt4[i]), "expected %d, got %d\n", real_child_pos[i], ret);
else
todo_wine_if (ret != real_child_pos[i])
ok(ret == real_child_pos[i] || broken(ret == real_child_pos_nt4[i]), "expected %d, got %d\n", real_child_pos[i], ret);
get_window_attributes(hwnd, &attrs);
......
......@@ -942,10 +942,8 @@ static void test_foregroundwindow(void)
if (input_desk_id == thread_desk_id)
{
ok(ret, "SetForegroundWindow failed!\n");
if (hwnd)
todo_wine_if (!hwnd)
ok(hwnd == hwnd_test , "unexpected foreground window %p\n", hwnd);
else
todo_wine ok(hwnd == hwnd_test , "unexpected foreground window %p\n", hwnd);
}
else
{
......@@ -958,18 +956,14 @@ static void test_foregroundwindow(void)
if (input_desk_id == thread_desk_id)
{
ok(!ret, "SetForegroundWindow should fail!\n");
if (hwnd)
todo_wine_if (!hwnd)
ok(hwnd == partners[input_desk_id] , "unexpected foreground window %p\n", hwnd);
else
todo_wine ok(hwnd == partners[input_desk_id] , "unexpected foreground window %p\n", hwnd);
}
else
{
todo_wine ok(!ret, "SetForegroundWindow should fail!\n");
if (!hwnd)
todo_wine_if (hwnd)
ok(hwnd == 0, "unexpected foreground window %p\n", hwnd);
else
todo_wine ok(hwnd == 0, "unexpected foreground window %p\n", hwnd);
}
}
}
......
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