Commit a3512ab8 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

user32/tests: Skip tests if function is not implemented.

parent 27fd7c1b
...@@ -95,7 +95,7 @@ static BOOL init_procs(void) ...@@ -95,7 +95,7 @@ static BOOL init_procs(void)
return TRUE; return TRUE;
} }
static void test_parameters(PBROADCAST broadcast) static void test_parameters(PBROADCAST broadcast, const char *functionname)
{ {
LONG ret; LONG ret;
DWORD recips; DWORD recips;
...@@ -103,6 +103,11 @@ static void test_parameters(PBROADCAST broadcast) ...@@ -103,6 +103,11 @@ static void test_parameters(PBROADCAST broadcast)
SetLastError(0xcafebabe); SetLastError(0xcafebabe);
recips = BSM_APPLICATIONS; recips = BSM_APPLICATIONS;
ret = broadcast( 0x80000000, &recips, WM_NULL, 0, 0 ); ret = broadcast( 0x80000000, &recips, WM_NULL, 0, 0 );
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
skip("%s is not implemented\n", functionname);
return;
}
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08x\n", GetLastError()); ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08x\n", GetLastError());
ok(!ret, "Returned: %d\n", ret); ok(!ret, "Returned: %d\n", ret);
...@@ -321,11 +326,11 @@ START_TEST(broadcast) ...@@ -321,11 +326,11 @@ START_TEST(broadcast)
return; return;
trace("Running BroadcastSystemMessageA tests\n"); trace("Running BroadcastSystemMessageA tests\n");
test_parameters(pBroadcastA); test_parameters(pBroadcastA, "BroadcastSystemMessageA");
if (pBroadcastW) if (pBroadcastW)
{ {
trace("Running BroadcastSystemMessageW tests\n"); trace("Running BroadcastSystemMessageW tests\n");
test_parameters(pBroadcastW); test_parameters(pBroadcastW, "BroadcastSystemMessageW");
} }
else else
skip("No BroadcastSystemMessageW, skipping\n"); skip("No BroadcastSystemMessageW, skipping\n");
......
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