Qian Hong : imm32/tests: Added more IMC lock count tests.

Alexandre Julliard julliard at winehq.org
Fri Aug 16 14:23:47 CDT 2013


Module: wine
Branch: master
Commit: b5b52371d1776b9fb0b44b7583e65fb0ddfbd757
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b5b52371d1776b9fb0b44b7583e65fb0ddfbd757

Author: Qian Hong <qhong at codeweavers.com>
Date:   Mon Aug 12 22:10:42 2013 +0800

imm32/tests: Added more IMC lock count tests.

---

 dlls/imm32/tests/imm32.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c
index 0a511e6..13b9bc1 100644
--- a/dlls/imm32/tests/imm32.c
+++ b/dlls/imm32/tests/imm32.c
@@ -691,7 +691,7 @@ static void test_ImmDefaultHwnd(void)
 static void test_ImmGetIMCLockCount(void)
 {
     HIMC imc;
-    DWORD count, ret;
+    DWORD count, ret, i;
     INPUTCONTEXT *ic;
 
     imc = ImmCreateContext();
@@ -709,6 +709,23 @@ static void test_ImmGetIMCLockCount(void)
     ok(ret == TRUE, "expect TRUE, ret %d\n", ret);
     count = ImmGetIMCLockCount(imc);
     ok(count == 0, "expect 0, returned %d\n", count);
+
+    for (i = 0; i < GMEM_LOCKCOUNT * 2; i++)
+    {
+        ic = ImmLockIMC(imc);
+        ok(ic != NULL, "ImmLockIMC failed!\n");
+    }
+    count = ImmGetIMCLockCount(imc);
+    todo_wine ok(count == GMEM_LOCKCOUNT, "expect GMEM_LOCKCOUNT, returned %d\n", count);
+
+    for (i = 0; i < GMEM_LOCKCOUNT - 1; i++)
+        ImmUnlockIMC(imc);
+    count = ImmGetIMCLockCount(imc);
+    todo_wine ok(count == 1, "expect 1, returned %d\n", count);
+    ImmUnlockIMC(imc);
+    count = ImmGetIMCLockCount(imc);
+    todo_wine ok(count == 0, "expect 0, returned %d\n", count);
+
     ImmDestroyContext(imc);
 }
 




More information about the wine-cvs mailing list