[WIN32KNT_APITEST]: Make a test for NtUserGetClassInfo more strict to test its exact...
[reactos.git] / rostests / apitests / win32nt / ntuser / NtUserCreateWindowEx.c
index bb09621..45d9ea6 100644 (file)
@@ -61,6 +61,7 @@ START_TEST(NtUserCreateWindowEx)
 
     /* LARGE_STRING for NtUserCreateWindowEx */
     LARGE_STRING l_dummy = {14, 32, 0, L"DummyMe"};
+    LARGE_STRING l_empty = {0, 0, 0, L""};
     LARGE_STRING l_wndName = {32, 32, 0, L""};
     LARGE_STRING l_cls = {cls.Length, 32, 0, cls.Buffer};
     LARGE_STRING l_ver_cls = {ver_cls.Length, 32, 0, ver_cls.Buffer};
@@ -182,6 +183,8 @@ START_TEST(NtUserCreateWindowEx)
         /* Check what return GetClassLong */
         TEST(GetClassLong(hwnd, GCW_ATOM) == atom);
 
+        TEST(NtUserFindWindowEx(NULL, NULL, &cls, (UNICODE_STRING*)&l_empty, 0) == hwnd);
+
         /* Finally destroy it */
         DestroyWindow(hwnd);
     }
@@ -210,7 +213,7 @@ START_TEST(NtUserCreateWindowEx)
     TEST(res.hIconSm == wclex.hIconSm);
 
     /* Get versioned class info */
-    TEST(NtUserGetClassInfo(hinst, &ver_cls, &res, &pwstr, 0) != 0);
+    TEST(NtUserGetClassInfo(hinst, &ver_cls, &res, &pwstr, 0) == atom2);
     TEST(GetLastError() == 0);
     TEST(res.cbSize == wclex2.cbSize);
     TEST(res.style == wclex2.style);
@@ -245,4 +248,8 @@ START_TEST(NtUserCreateWindowEx)
     TEST(NtUserUnregisterClass(&another_cls, hinst, &outClsMnu) != 0);
     TEST(NtUserUnregisterClass(&menu, hinst, &outClsMnu) == 0);
 
+    /* Make sure that the classes got destroyed */
+    TEST(NtUserGetWOWClass(hinst, &cls) == 0);
+    TEST(NtUserGetWOWClass(hinst, &ver_cls) == 0);
+    TEST(NtUserGetWOWClass(hinst, &another_cls) == 0);
 }