From 8b28508d2b0fe495048bab079ebb76365327bd70 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 23 Feb 2009 10:41:03 +0100 Subject: [PATCH] user32/tests: Use win_skip() to skip over unimplemented functionality. --- dlls/user32/tests/broadcast.c | 13 ++++++++----- dlls/user32/tests/input.c | 10 +++++----- dlls/user32/tests/menu.c | 8 ++++---- dlls/user32/tests/monitor.c | 8 ++++---- dlls/user32/tests/msg.c | 14 +++++++------- dlls/user32/tests/sysparams.c | 2 +- dlls/user32/tests/win.c | 2 +- dlls/user32/tests/wsprintf.c | 2 +- 8 files changed, 31 insertions(+), 28 deletions(-) diff --git a/dlls/user32/tests/broadcast.c b/dlls/user32/tests/broadcast.c index 41f94917d9a..48f1318a879 100644 --- a/dlls/user32/tests/broadcast.c +++ b/dlls/user32/tests/broadcast.c @@ -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"); } diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index defe1423355..0d5818990bf 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -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"); } diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c index 64d3b13516d..4d0e7d4ad3f 100644 --- a/dlls/user32/tests/menu.c +++ b/dlls/user32/tests/menu.c @@ -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(); diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index 944e49b9fb2..daa303585bd 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -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; } diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 957f197ff05..aa32eed66c4 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -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(); diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index 194217fe5de..05f728d0b27 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -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; } diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index b40887a8047..33f140335fb 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -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; } diff --git a/dlls/user32/tests/wsprintf.c b/dlls/user32/tests/wsprintf.c index 29e74cb0df0..bca16bd9f86 100644 --- a/dlls/user32/tests/wsprintf.c +++ b/dlls/user32/tests/wsprintf.c @@ -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());