Commit 8b28508d authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

user32/tests: Use win_skip() to skip over unimplemented functionality.

parent 323b6165
......@@ -66,7 +66,10 @@ static BOOL init_procs(void)
pBroadcastA = (PBROADCAST)GetProcAddress(user32, "BroadcastSystemMessage");
ok(pBroadcastA != NULL, "No BroadcastSystemMessage found\n");
if (!pBroadcastA)
{
win_skip("BroadcastA is not available\n");
return FALSE;
}
pBroadcastW = (PBROADCAST)GetProcAddress(user32, "BroadcastSystemMessageW");
pBroadcastExA = (PBROADCASTEX)GetProcAddress(user32, "BroadcastSystemMessageExA");
......@@ -86,7 +89,7 @@ static BOOL init_procs(void)
cls.lpszClassName = "MainWindowClass";
if (!RegisterClassA(&cls))
return 0;
return FALSE;
if (!CreateWindowExA(0, "MainWindowClass", "Main window", WS_CAPTION | WS_SYSMENU |
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 );
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
skip("%s is not implemented\n", functionname);
win_skip("%s is not implemented\n", functionname);
return;
}
ok(!ret || broken(ret), "Returned: %d\n", ret);
......@@ -345,14 +348,14 @@ START_TEST(broadcast)
test_parameters(pBroadcastW, "BroadcastSystemMessageW");
}
else
skip("No BroadcastSystemMessageW, skipping\n");
win_skip("No BroadcastSystemMessageW, skipping\n");
if (pBroadcastExA)
{
trace("Running BroadcastSystemMessageExA tests\n");
test_parametersEx(pBroadcastExA);
}
else
skip("No BroadcastSystemMessageExA, skipping\n");
win_skip("No BroadcastSystemMessageExA, skipping\n");
if (pBroadcastExW)
{
trace("Running BroadcastSystemMessageExW tests\n");
......@@ -361,5 +364,5 @@ START_TEST(broadcast)
test_noprivileges();
}
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);
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
skip("ToUnicode is not implemented\n");
win_skip("ToUnicode is not implemented\n");
return;
}
......@@ -1258,13 +1258,13 @@ START_TEST(input)
{
init_function_pointers();
if (!pSendInput)
skip("SendInput is not available\n");
else
if (pSendInput)
{
test_Input_blackbox();
test_Input_whitebox();
}
else win_skip("SendInput is not available\n");
test_keynames();
test_mouse_ll_hook();
test_key_map();
......@@ -1274,5 +1274,5 @@ START_TEST(input)
if(pGetMouseMovePointsEx)
test_GetMouseMovePointsEx();
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)
{
skip("GetMenuInfo is not available\n");
win_skip("GetMenuInfo is not available\n");
return;
}
......@@ -635,7 +635,7 @@ static void test_menu_add_string( void )
SetLastError(0xdeadbeef);
ret = GetMenuStringW( hmenu, 0, strbackW, 99, MF_BYPOSITION );
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
skip("GetMenuStringW is not implemented\n");
win_skip("GetMenuStringW is not implemented\n");
else
{
ok (ret, "GetMenuStringW on ownerdraw entry failed\n");
......@@ -698,7 +698,7 @@ static void test_menu_add_string( void )
SetLastError(0xdeadbeef);
ret = GetMenuStringW( hmenu, 0, NULL, 0, MF_BYPOSITION);
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
skip("GetMenuStringW is not implemented\n");
win_skip("GetMenuStringW is not implemented\n");
else
ok (!ret, "GetMenuStringW on ownerdraw entry succeeded.\n");
......@@ -2428,7 +2428,7 @@ START_TEST(menu)
test_menu_bmp_and_string();
if( !pSendInput)
skip("SendInput is not available\n");
win_skip("SendInput is not available\n");
else
test_menu_input();
test_menu_flags();
......
......@@ -78,7 +78,7 @@ static void test_enumdisplaydevices(void)
if (!pEnumDisplayDevicesA)
{
skip("EnumDisplayDevicesA is not available\n");
win_skip("EnumDisplayDevicesA is not available\n");
return;
}
......@@ -156,7 +156,7 @@ static void test_ChangeDisplaySettingsEx(void)
if (!pChangeDisplaySettingsExA)
{
skip("ChangeDisplaySettingsExA is not available\n");
win_skip("ChangeDisplaySettingsExA is not available\n");
return;
}
......@@ -288,7 +288,7 @@ static void test_monitors(void)
if (!pMonitorFromPoint || !pMonitorFromWindow)
{
skip("MonitorFromPoint or MonitorFromWindow are not available\n");
win_skip("MonitorFromPoint or MonitorFromWindow are not available\n");
return;
}
......@@ -331,7 +331,7 @@ static void test_work_area(void)
if (!pEnumDisplayMonitors || !pGetMonitorInfoA)
{
skip("EnumDisplayMonitors or GetMonitorInfoA are not available\n");
win_skip("EnumDisplayMonitors or GetMonitorInfoA are not available\n");
return;
}
......
......@@ -6293,7 +6293,7 @@ static void test_interthread_messages(void)
wnd_event.event = CreateEventW(NULL, 0, 0, NULL);
if (!wnd_event.event)
{
skip("skipping interthread message test under win9x\n");
win_skip("skipping interthread message test under win9x\n");
return;
}
......@@ -8051,7 +8051,7 @@ static void test_winevents(void)
/* WH_MOUSE_LL is not supported on Win9x platforms */
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;
}
......@@ -10612,7 +10612,7 @@ static void test_dbcs_wm_char(void)
if (!pGetCPInfoExA)
{
skip("GetCPInfoExA is not available\n");
win_skip("GetCPInfoExA is not available\n");
return;
}
......@@ -11232,7 +11232,7 @@ static void test_menu_messages(void)
if (!pGetMenuInfo || !pSetMenuInfo)
{
skip("GetMenuInfo and/or SetMenuInfo are not available\n");
win_skip("GetMenuInfo and/or SetMenuInfo are not available\n");
return;
}
cls.style = 0;
......@@ -11414,11 +11414,11 @@ START_TEST(msg)
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();
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();
......@@ -11462,7 +11462,7 @@ START_TEST(msg)
test_SetActiveWindow();
if (!pTrackMouseEvent)
skip("TrackMouseEvent is not available\n");
win_skip("TrackMouseEvent is not available\n");
else
test_TrackMouseEvent();
......
......@@ -2315,7 +2315,7 @@ static void test_WM_DISPLAYCHANGE(void)
if (!pChangeDisplaySettingsExA)
{
skip("ChangeDisplaySettingsExA is not available\n");
win_skip("ChangeDisplaySettingsExA is not available\n");
return;
}
......
......@@ -4848,7 +4848,7 @@ static void test_GetWindowModuleFileName(void)
if (!pGetWindowModuleFileNameA)
{
skip("GetWindowModuleFileNameA is not available\n");
win_skip("GetWindowModuleFileNameA is not available\n");
return;
}
......
......@@ -45,7 +45,7 @@ static void wsprintfWTest(void)
rc=wsprintfW(buf, fmt, -1);
if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
skip("wsprintfW is not implemented\n");
win_skip("wsprintfW is not implemented\n");
return;
}
ok(rc == 10, "wsPrintfW length failure: rc=%d error=%d\n",rc,GetLastError());
......
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