[PATCH 1/2] user32/tests: Add FindWindow() test for versioned class.

Nikolay Sivov nsivov at codeweavers.com
Mon Nov 19 07:08:46 CST 2018


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/user32/tests/class.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c
index 5db37d4a9a..6c5850f141 100644
--- a/dlls/user32/tests/class.c
+++ b/dlls/user32/tests/class.c
@@ -1319,7 +1319,7 @@ static void test_actctx_classes(void)
     ATOM class;
     HINSTANCE hinst;
     char buff[64];
-    HWND hwnd;
+    HWND hwnd, hwnd2;
     char path[MAX_PATH];
 
     GetTempPathA(ARRAY_SIZE(path), path);
@@ -1353,6 +1353,14 @@ static void test_actctx_classes(void)
     hwnd = CreateWindowExA(0, testclass, "test", 0, 0, 0, 0, 0, 0, 0, hinst, 0);
     ok(hwnd != NULL, "Failed to create a window.\n");
 
+    hwnd2 = FindWindowExA(NULL, NULL, "MyTestClass", NULL);
+todo_wine
+    ok(hwnd2 == hwnd, "Failed to find test window.\n");
+
+    hwnd2 = FindWindowExA(NULL, NULL, "4.3.2.1!MyTestClass", NULL);
+todo_wine
+    ok(hwnd2 == NULL, "Unexpected find result %p.\n", hwnd2);
+
     ret = GetClassNameA(hwnd, buff, sizeof(buff));
     ok(ret, "Failed to get class name.\n");
     ok(!strcmp(buff, testclass), "Unexpected class name.\n");
@@ -1378,6 +1386,19 @@ static void test_actctx_classes(void)
 
     DestroyWindow(hwnd);
 
+    hwnd = CreateWindowExA(0, "4.3.2.1!MyTestClass", "test", 0, 0, 0, 0, 0, 0, 0, hinst, 0);
+    ok(hwnd != NULL, "Failed to create a window.\n");
+
+    hwnd2 = FindWindowExA(NULL, NULL, "MyTestClass", NULL);
+todo_wine
+    ok(hwnd2 == hwnd, "Failed to find test window.\n");
+
+    hwnd2 = FindWindowExA(NULL, NULL, "4.3.2.1!MyTestClass", NULL);
+todo_wine
+    ok(hwnd2 == NULL, "Unexpected find result %p.\n", hwnd2);
+
+    DestroyWindow(hwnd);
+
     ret = UnregisterClassA("MyTestClass", hinst);
     ok(!ret, "Unexpected ret value %d.\n", ret);
 
-- 
2.19.1




More information about the wine-devel mailing list