user32/tests: Use win_skip() to skip over unimplemented functionality.
This commit is contained in:
parent
323b616532
commit
8b28508d2b
|
@ -66,7 +66,10 @@ static BOOL init_procs(void)
|
||||||
pBroadcastA = (PBROADCAST)GetProcAddress(user32, "BroadcastSystemMessage");
|
pBroadcastA = (PBROADCAST)GetProcAddress(user32, "BroadcastSystemMessage");
|
||||||
ok(pBroadcastA != NULL, "No BroadcastSystemMessage found\n");
|
ok(pBroadcastA != NULL, "No BroadcastSystemMessage found\n");
|
||||||
if (!pBroadcastA)
|
if (!pBroadcastA)
|
||||||
|
{
|
||||||
|
win_skip("BroadcastA is not available\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
pBroadcastW = (PBROADCAST)GetProcAddress(user32, "BroadcastSystemMessageW");
|
pBroadcastW = (PBROADCAST)GetProcAddress(user32, "BroadcastSystemMessageW");
|
||||||
pBroadcastExA = (PBROADCASTEX)GetProcAddress(user32, "BroadcastSystemMessageExA");
|
pBroadcastExA = (PBROADCASTEX)GetProcAddress(user32, "BroadcastSystemMessageExA");
|
||||||
|
@ -86,7 +89,7 @@ static BOOL init_procs(void)
|
||||||
cls.lpszClassName = "MainWindowClass";
|
cls.lpszClassName = "MainWindowClass";
|
||||||
|
|
||||||
if (!RegisterClassA(&cls))
|
if (!RegisterClassA(&cls))
|
||||||
return 0;
|
return FALSE;
|
||||||
|
|
||||||
if (!CreateWindowExA(0, "MainWindowClass", "Main window", WS_CAPTION | WS_SYSMENU |
|
if (!CreateWindowExA(0, "MainWindowClass", "Main window", WS_CAPTION | WS_SYSMENU |
|
||||||
WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP, 100, 100, 200,
|
WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP, 100, 100, 200,
|
||||||
|
@ -105,7 +108,7 @@ static void test_parameters(PBROADCAST broadcast, const char *functionname)
|
||||||
ret = broadcast( 0x80000000, &recips, WM_NULL, 0, 0 );
|
ret = broadcast( 0x80000000, &recips, WM_NULL, 0, 0 );
|
||||||
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
||||||
{
|
{
|
||||||
skip("%s is not implemented\n", functionname);
|
win_skip("%s is not implemented\n", functionname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ok(!ret || broken(ret), "Returned: %d\n", ret);
|
ok(!ret || broken(ret), "Returned: %d\n", ret);
|
||||||
|
@ -345,14 +348,14 @@ START_TEST(broadcast)
|
||||||
test_parameters(pBroadcastW, "BroadcastSystemMessageW");
|
test_parameters(pBroadcastW, "BroadcastSystemMessageW");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
skip("No BroadcastSystemMessageW, skipping\n");
|
win_skip("No BroadcastSystemMessageW, skipping\n");
|
||||||
if (pBroadcastExA)
|
if (pBroadcastExA)
|
||||||
{
|
{
|
||||||
trace("Running BroadcastSystemMessageExA tests\n");
|
trace("Running BroadcastSystemMessageExA tests\n");
|
||||||
test_parametersEx(pBroadcastExA);
|
test_parametersEx(pBroadcastExA);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
skip("No BroadcastSystemMessageExA, skipping\n");
|
win_skip("No BroadcastSystemMessageExA, skipping\n");
|
||||||
if (pBroadcastExW)
|
if (pBroadcastExW)
|
||||||
{
|
{
|
||||||
trace("Running BroadcastSystemMessageExW tests\n");
|
trace("Running BroadcastSystemMessageExW tests\n");
|
||||||
|
@ -361,5 +364,5 @@ START_TEST(broadcast)
|
||||||
test_noprivileges();
|
test_noprivileges();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
skip("No BroadcastSystemMessageExW, skipping\n");
|
win_skip("No BroadcastSystemMessageExW, skipping\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1223,7 +1223,7 @@ static void test_ToUnicode(void)
|
||||||
ret = ToUnicode(VK_RETURN, SC_RETURN, state, wStr, 2, 0);
|
ret = ToUnicode(VK_RETURN, SC_RETURN, state, wStr, 2, 0);
|
||||||
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
||||||
{
|
{
|
||||||
skip("ToUnicode is not implemented\n");
|
win_skip("ToUnicode is not implemented\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1258,13 +1258,13 @@ START_TEST(input)
|
||||||
{
|
{
|
||||||
init_function_pointers();
|
init_function_pointers();
|
||||||
|
|
||||||
if (!pSendInput)
|
if (pSendInput)
|
||||||
skip("SendInput is not available\n");
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
test_Input_blackbox();
|
test_Input_blackbox();
|
||||||
test_Input_whitebox();
|
test_Input_whitebox();
|
||||||
}
|
}
|
||||||
|
else win_skip("SendInput is not available\n");
|
||||||
|
|
||||||
test_keynames();
|
test_keynames();
|
||||||
test_mouse_ll_hook();
|
test_mouse_ll_hook();
|
||||||
test_key_map();
|
test_key_map();
|
||||||
|
@ -1274,5 +1274,5 @@ START_TEST(input)
|
||||||
if(pGetMouseMovePointsEx)
|
if(pGetMouseMovePointsEx)
|
||||||
test_GetMouseMovePointsEx();
|
test_GetMouseMovePointsEx();
|
||||||
else
|
else
|
||||||
skip("GetMouseMovePointsEx is not available\n");
|
win_skip("GetMouseMovePointsEx is not available\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -527,7 +527,7 @@ static void test_menu_bmp_and_string(void)
|
||||||
|
|
||||||
if( !pGetMenuInfo)
|
if( !pGetMenuInfo)
|
||||||
{
|
{
|
||||||
skip("GetMenuInfo is not available\n");
|
win_skip("GetMenuInfo is not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -635,7 +635,7 @@ static void test_menu_add_string( void )
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = GetMenuStringW( hmenu, 0, strbackW, 99, MF_BYPOSITION );
|
ret = GetMenuStringW( hmenu, 0, strbackW, 99, MF_BYPOSITION );
|
||||||
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
||||||
skip("GetMenuStringW is not implemented\n");
|
win_skip("GetMenuStringW is not implemented\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ok (ret, "GetMenuStringW on ownerdraw entry failed\n");
|
ok (ret, "GetMenuStringW on ownerdraw entry failed\n");
|
||||||
|
@ -698,7 +698,7 @@ static void test_menu_add_string( void )
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = GetMenuStringW( hmenu, 0, NULL, 0, MF_BYPOSITION);
|
ret = GetMenuStringW( hmenu, 0, NULL, 0, MF_BYPOSITION);
|
||||||
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
||||||
skip("GetMenuStringW is not implemented\n");
|
win_skip("GetMenuStringW is not implemented\n");
|
||||||
else
|
else
|
||||||
ok (!ret, "GetMenuStringW on ownerdraw entry succeeded.\n");
|
ok (!ret, "GetMenuStringW on ownerdraw entry succeeded.\n");
|
||||||
|
|
||||||
|
@ -2428,7 +2428,7 @@ START_TEST(menu)
|
||||||
test_menu_bmp_and_string();
|
test_menu_bmp_and_string();
|
||||||
|
|
||||||
if( !pSendInput)
|
if( !pSendInput)
|
||||||
skip("SendInput is not available\n");
|
win_skip("SendInput is not available\n");
|
||||||
else
|
else
|
||||||
test_menu_input();
|
test_menu_input();
|
||||||
test_menu_flags();
|
test_menu_flags();
|
||||||
|
|
|
@ -78,7 +78,7 @@ static void test_enumdisplaydevices(void)
|
||||||
|
|
||||||
if (!pEnumDisplayDevicesA)
|
if (!pEnumDisplayDevicesA)
|
||||||
{
|
{
|
||||||
skip("EnumDisplayDevicesA is not available\n");
|
win_skip("EnumDisplayDevicesA is not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ static void test_ChangeDisplaySettingsEx(void)
|
||||||
|
|
||||||
if (!pChangeDisplaySettingsExA)
|
if (!pChangeDisplaySettingsExA)
|
||||||
{
|
{
|
||||||
skip("ChangeDisplaySettingsExA is not available\n");
|
win_skip("ChangeDisplaySettingsExA is not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ static void test_monitors(void)
|
||||||
|
|
||||||
if (!pMonitorFromPoint || !pMonitorFromWindow)
|
if (!pMonitorFromPoint || !pMonitorFromWindow)
|
||||||
{
|
{
|
||||||
skip("MonitorFromPoint or MonitorFromWindow are not available\n");
|
win_skip("MonitorFromPoint or MonitorFromWindow are not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ static void test_work_area(void)
|
||||||
|
|
||||||
if (!pEnumDisplayMonitors || !pGetMonitorInfoA)
|
if (!pEnumDisplayMonitors || !pGetMonitorInfoA)
|
||||||
{
|
{
|
||||||
skip("EnumDisplayMonitors or GetMonitorInfoA are not available\n");
|
win_skip("EnumDisplayMonitors or GetMonitorInfoA are not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6293,7 +6293,7 @@ static void test_interthread_messages(void)
|
||||||
wnd_event.event = CreateEventW(NULL, 0, 0, NULL);
|
wnd_event.event = CreateEventW(NULL, 0, 0, NULL);
|
||||||
if (!wnd_event.event)
|
if (!wnd_event.event)
|
||||||
{
|
{
|
||||||
skip("skipping interthread message test under win9x\n");
|
win_skip("skipping interthread message test under win9x\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8051,7 +8051,7 @@ static void test_winevents(void)
|
||||||
/* WH_MOUSE_LL is not supported on Win9x platforms */
|
/* WH_MOUSE_LL is not supported on Win9x platforms */
|
||||||
if (!hCBT_global_hook)
|
if (!hCBT_global_hook)
|
||||||
{
|
{
|
||||||
trace("Skipping WH_MOUSE_LL test on this platform\n");
|
win_skip("Skipping WH_MOUSE_LL test on this platform\n");
|
||||||
goto skip_mouse_ll_hook_test;
|
goto skip_mouse_ll_hook_test;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10612,7 +10612,7 @@ static void test_dbcs_wm_char(void)
|
||||||
|
|
||||||
if (!pGetCPInfoExA)
|
if (!pGetCPInfoExA)
|
||||||
{
|
{
|
||||||
skip("GetCPInfoExA is not available\n");
|
win_skip("GetCPInfoExA is not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11232,7 +11232,7 @@ static void test_menu_messages(void)
|
||||||
|
|
||||||
if (!pGetMenuInfo || !pSetMenuInfo)
|
if (!pGetMenuInfo || !pSetMenuInfo)
|
||||||
{
|
{
|
||||||
skip("GetMenuInfo and/or SetMenuInfo are not available\n");
|
win_skip("GetMenuInfo and/or SetMenuInfo are not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cls.style = 0;
|
cls.style = 0;
|
||||||
|
@ -11414,11 +11414,11 @@ START_TEST(msg)
|
||||||
ok(pIsWinEventHookInstalled(event), "IsWinEventHookInstalled(%u) failed\n", event);
|
ok(pIsWinEventHookInstalled(event), "IsWinEventHookInstalled(%u) failed\n", event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!hEvent_hook) skip( "no win event hook support\n" );
|
if (!hEvent_hook) win_skip( "no win event hook support\n" );
|
||||||
|
|
||||||
cbt_hook_thread_id = GetCurrentThreadId();
|
cbt_hook_thread_id = GetCurrentThreadId();
|
||||||
hCBT_hook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, GetCurrentThreadId());
|
hCBT_hook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, GetCurrentThreadId());
|
||||||
if (!hCBT_hook) skip( "cannot set global hook, will skip hook tests\n" );
|
if (!hCBT_hook) win_skip( "cannot set global hook, will skip hook tests\n" );
|
||||||
|
|
||||||
test_winevents();
|
test_winevents();
|
||||||
|
|
||||||
|
@ -11462,7 +11462,7 @@ START_TEST(msg)
|
||||||
test_SetActiveWindow();
|
test_SetActiveWindow();
|
||||||
|
|
||||||
if (!pTrackMouseEvent)
|
if (!pTrackMouseEvent)
|
||||||
skip("TrackMouseEvent is not available\n");
|
win_skip("TrackMouseEvent is not available\n");
|
||||||
else
|
else
|
||||||
test_TrackMouseEvent();
|
test_TrackMouseEvent();
|
||||||
|
|
||||||
|
|
|
@ -2315,7 +2315,7 @@ static void test_WM_DISPLAYCHANGE(void)
|
||||||
|
|
||||||
if (!pChangeDisplaySettingsExA)
|
if (!pChangeDisplaySettingsExA)
|
||||||
{
|
{
|
||||||
skip("ChangeDisplaySettingsExA is not available\n");
|
win_skip("ChangeDisplaySettingsExA is not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4848,7 +4848,7 @@ static void test_GetWindowModuleFileName(void)
|
||||||
|
|
||||||
if (!pGetWindowModuleFileNameA)
|
if (!pGetWindowModuleFileNameA)
|
||||||
{
|
{
|
||||||
skip("GetWindowModuleFileNameA is not available\n");
|
win_skip("GetWindowModuleFileNameA is not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ static void wsprintfWTest(void)
|
||||||
rc=wsprintfW(buf, fmt, -1);
|
rc=wsprintfW(buf, fmt, -1);
|
||||||
if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
|
if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
|
||||||
{
|
{
|
||||||
skip("wsprintfW is not implemented\n");
|
win_skip("wsprintfW is not implemented\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ok(rc == 10, "wsPrintfW length failure: rc=%d error=%d\n",rc,GetLastError());
|
ok(rc == 10, "wsPrintfW length failure: rc=%d error=%d\n",rc,GetLastError());
|
||||||
|
|
Loading…
Reference in New Issue