[1/2] imm32: Initial ImmIsUIMessage tests
André Hentschel
nerv at dawncrow.de
Thu Jun 16 16:15:21 CDT 2011
got the same results for the W function, but testing that twice looks ugly
tests will be extended to catch messages later in a wndproc, there is still a bug in ImmIsUIMessage, but first wanted to make sure we use the right messages
---
dlls/imm32/tests/imm32.c | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c
index 9f40953..7184b22 100644
--- a/dlls/imm32/tests/imm32.c
+++ b/dlls/imm32/tests/imm32.c
@@ -507,6 +507,46 @@ static void test_ImmThreads(void)
todo_wine ok(himc == NULL, "Should not be able to get himc from other process window\n");
}
+static void test_ImmIsUIMessage(void)
+{
+ struct test
+ {
+ UINT msg;
+ BOOL ret;
+ BOOL todo;
+ };
+
+ static const struct test tests[] =
+ {
+ { WM_IME_STARTCOMPOSITION, TRUE, FALSE },
+ { WM_IME_ENDCOMPOSITION, TRUE, FALSE },
+ { WM_IME_COMPOSITION, TRUE, FALSE },
+ { WM_IME_SETCONTEXT, TRUE, FALSE },
+ { WM_IME_NOTIFY, TRUE, FALSE },
+ { WM_IME_CONTROL, FALSE, TRUE },
+ { WM_IME_COMPOSITIONFULL, TRUE, FALSE },
+ { WM_IME_SELECT, TRUE, FALSE },
+ { WM_IME_CHAR, FALSE, TRUE },
+ { 0x287 /* FIXME */, TRUE, FALSE },
+ { WM_IME_REQUEST, FALSE, TRUE },
+ { WM_IME_KEYDOWN, FALSE, TRUE },
+ { WM_IME_KEYUP, FALSE, TRUE },
+ { 0, FALSE, FALSE } /* mark the end */
+ };
+
+ const struct test *test;
+ BOOL ret;
+
+ for (test = tests; test->msg; test++)
+ {
+ ret = ImmIsUIMessageA(NULL, test->msg, 0, 0);
+ if (test->todo)
+ todo_wine ok(ret == test->ret, "ImmIsUIMessageA returned %x for %x\n", ret, test->msg);
+ else
+ ok(ret == test->ret, "ImmIsUIMessageA returned %x for %x\n", ret, test->msg);
+ }
+}
+
START_TEST(imm32) {
if (init())
{
@@ -516,6 +556,7 @@ START_TEST(imm32) {
test_ImmIME();
test_ImmAssociateContextEx();
test_ImmThreads();
+ test_ImmIsUIMessage();
}
cleanup();
}
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list