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

Alexandre Julliard julliard at winehq.org
Thu Apr 24 06:24:13 CDT 2008


Module: wine
Branch: master
Commit: a3512ab8aba9c2d8b6bc39c22342c14c63322ceb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a3512ab8aba9c2d8b6bc39c22342c14c63322ceb

Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date:   Thu Apr 24 13:07:57 2008 +0200

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

---

 dlls/user32/tests/broadcast.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/tests/broadcast.c b/dlls/user32/tests/broadcast.c
index 67e767e..786df7d 100644
--- a/dlls/user32/tests/broadcast.c
+++ b/dlls/user32/tests/broadcast.c
@@ -95,7 +95,7 @@ static BOOL init_procs(void)
     return TRUE;
 }
 
-static void test_parameters(PBROADCAST broadcast)
+static void test_parameters(PBROADCAST broadcast, const char *functionname)
 {
     LONG ret;
     DWORD recips;
@@ -103,6 +103,11 @@ static void test_parameters(PBROADCAST broadcast)
     SetLastError(0xcafebabe);
     recips = BSM_APPLICATIONS;
     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(!ret, "Returned: %d\n", ret);
 
@@ -321,11 +326,11 @@ START_TEST(broadcast)
         return;
 
     trace("Running BroadcastSystemMessageA tests\n");
-    test_parameters(pBroadcastA);
+    test_parameters(pBroadcastA, "BroadcastSystemMessageA");
     if (pBroadcastW)
     {
         trace("Running BroadcastSystemMessageW tests\n");
-        test_parameters(pBroadcastW);
+        test_parameters(pBroadcastW, "BroadcastSystemMessageW");
     }
     else
         skip("No BroadcastSystemMessageW, skipping\n");




More information about the wine-cvs mailing list