Qian Hong : imm32/tests: Added test for IMCC lock count.

Alexandre Julliard julliard at winehq.org
Thu Aug 1 14:25:45 CDT 2013


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

Author: Qian Hong <qhong at codeweavers.com>
Date:   Thu Aug  1 14:32:45 2013 +0800

imm32/tests: Added test for IMCC lock count.

---

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

diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c
index 0d4cb5c..9d41cc7 100644
--- a/dlls/imm32/tests/imm32.c
+++ b/dlls/imm32/tests/imm32.c
@@ -712,6 +712,28 @@ static void test_ImmGetIMCLockCount(void)
     ImmDestroyContext(imc);
 }
 
+static void test_ImmGetIMCCLockCount(void)
+{
+    HIMCC imcc;
+    DWORD count, ret;
+
+    imcc = ImmCreateIMCC(sizeof(CANDIDATEINFO));
+    count = ImmGetIMCCLockCount(imcc);
+    ok(count == 0, "expect 0, returned %d\n", count);
+    ImmLockIMCC(imcc);
+    count = ImmGetIMCCLockCount(imcc);
+    ok(count == 1, "expect 1, returned %d\n", count);
+    ret = ImmUnlockIMCC(imcc);
+    ok(ret == FALSE, "expect FALSE, ret %d\n", ret);
+    count = ImmGetIMCCLockCount(imcc);
+    ok(count == 0, "expect 0, returned %d\n", count);
+    ret = ImmUnlockIMCC(imcc);
+    todo_wine ok(ret == FALSE, "expect FALSE, ret %d\n", ret);
+    count = ImmGetIMCCLockCount(imcc);
+    todo_wine ok(count == 0, "expect 0, returned %d\n", count);
+    ImmDestroyIMCC(imcc);
+}
+
 static void test_ImmMessages(void)
 {
     CANDIDATEFORM cf;
@@ -872,6 +894,7 @@ START_TEST(imm32) {
         test_ImmGetDescription();
         test_ImmDefaultHwnd();
         test_ImmGetIMCLockCount();
+        test_ImmGetIMCCLockCount();
         msg_spy_cleanup();
         /* Reinitialize the hooks to capture all windows */
         msg_spy_init(NULL);




More information about the wine-cvs mailing list