[PATCH 3/7] dinput8/tests: Add window name and window class name test
Rémi Bernon
rbernon at codeweavers.com
Mon Aug 26 09:06:57 CDT 2019
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
Not sure if it is very useful to match native names, or even desirable?
dlls/dinput8/tests/device.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index cd86289dd77..0bf6936812f 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -628,7 +628,20 @@ static void test_mouse_keyboard(void)
ok(raw_devices_count == 0, "Unexpected raw devices registered: %d\n", raw_devices_count);
if (raw_devices[0].hwndTarget != NULL)
+ {
+ WCHAR di_hwnd_class[] = {'D','I','E','m','W','i','n',0};
+ WCHAR str[16];
+ int i;
+
di_hwnd = raw_devices[0].hwndTarget;
+ i = GetClassNameW(di_hwnd, str, ARRAY_SIZE(str));
+ ok(i == lstrlenW(di_hwnd_class), "GetClassName returned incorrect length\n");
+ ok(!lstrcmpW(di_hwnd_class, str), "GetClassName returned incorrect name for this window's class\n");
+
+ i = GetWindowTextW(di_hwnd, str, ARRAY_SIZE(str));
+ ok(i == lstrlenW(di_hwnd_class), "GetClassName returned incorrect length\n");
+ ok(!lstrcmpW(di_hwnd_class, str), "GetClassName returned incorrect name for this window's class\n");
+ }
hr = IDirectInputDevice8_Acquire(di_mouse);
ok(SUCCEEDED(hr), "IDirectInputDevice8_Acquire failed: %08x\n", hr);
--
2.23.0.rc1
More information about the wine-devel
mailing list