[PATCH 2/2] user32/tests: Add more tests for GetKeyState().

Markus Engel markus_wine at familie-engel.online
Sun May 17 07:19:04 CDT 2020


Signed-off-by: Markus Engel <markus_wine at familie-engel.online>
---
 dlls/user32/tests/input.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 43fdd34191..3daf445c94 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -2759,6 +2759,8 @@ static DWORD WINAPI get_key_state_thread(void *arg)
     ok((result & 0x8000) || broken(!(result & 0x8000)), /* > Win 2003 */
        "expected that highest bit is set, got %x\n", result);
 
+    ok((SHORT)(result & 0x8001) == (SHORT)result, "expected that undefined bits are unset, got %x\n", result);
+
     ReleaseSemaphore(semaphores[0], 1, NULL);
     result = WaitForSingleObject(semaphores[1], 1000);
     ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result);
@@ -2766,6 +2768,8 @@ static DWORD WINAPI get_key_state_thread(void *arg)
     result = GetKeyState('X');
     ok(!(result & 0x8000), "expected that highest bit is unset, got %x\n", result);
 
+    ok((SHORT)(result & 0x0001) == (SHORT)result, "expected that undefined bits are unset, got %x\n", result);
+
     return 0;
 }
 
-- 
2.26.2




More information about the wine-devel mailing list