Fix the user32/class tests

Francois Gouget fgouget at free.fr
Tue Dec 10 21:31:03 CST 2002


With this patch the user32/class tests should complete successfully on
all Win9x platforms and on NT4.


Changelog:

 * dlls/user/tests/class.c

   Skip the Unicode tests (effectively all tests currently) on Win9x


Index: dlls/user/tests/class.c
===================================================================
RCS file: /home/wine/wine/dlls/user/tests/class.c,v
retrieving revision 1.5
diff -u -r1.5 class.c
--- dlls/user/tests/class.c	4 Oct 2002 00:56:05 -0000	1.5
+++ dlls/user/tests/class.c	11 Dec 2002 02:54:57 -0000
@@ -38,7 +38,7 @@
  *
  *           WinMain
  */
-BOOL ClassTest(HINSTANCE hInstance, BOOL global)
+void ClassTest(HINSTANCE hInstance, BOOL global)
 {
     WNDCLASSW cls, wc;
     WCHAR className[] = {'T','e','s','t','C','l','a','s','s',0};
@@ -46,6 +46,7 @@
     HWND hTestWnd;
     DWORD i;
     WCHAR str[20];
+    ATOM classatom;

     cls.style         = CS_HREDRAW | CS_VREDRAW | (global?CS_GLOBALCLASS:0);
     cls.lpfnWndProc   = ClassTest_WndProc;
@@ -58,8 +59,10 @@
     cls.lpszMenuName  = 0;
     cls.lpszClassName = className;

-    ok(RegisterClassW (&cls) ,
-        "failed to register class");
+    classatom=RegisterClassW(&cls);
+    if (!classatom && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
+        return;
+    ok(classatom, "failed to register class");

     ok(!RegisterClassW (&cls),
         "RegisterClass of the same class should fail for the second time");
@@ -180,7 +183,7 @@
     ok(UnregisterClassW(className, hInstance),
         "UnregisterClass() failed");

-    return TRUE;
+    return;
 }

 START_TEST(class)



-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
 Advice is what we ask for when we already know the answer but wish we didn't
                                 -- Eric Jong




More information about the wine-patches mailing list