From a8a3716fac2d28aeb952352ac2af2c2e0ab16297 Mon Sep 17 00:00:00 2001 From: Andrew Riedi Date: Sun, 23 Nov 2008 21:28:13 -0800 Subject: [PATCH] imm32: Add some really basic tests for ImmSetCompositionString(). --- dlls/imm32/tests/imm32.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index 29ac553..e4fa2d3 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -254,6 +254,53 @@ static int test_ImmGetCompositionString(void) return 0; } +static int test_ImmSetCompositionString(void) +{ + HIMC imc; + BOOL ret; + DWORD error; + + imc = ImmGetContext(hwnd); + + SetLastError(0xdeadbeef); + ret = ImmSetCompositionStringW(imc, SCS_SETSTR, NULL, 0, NULL, 0); + error = GetLastError(); + todo_wine { + ok(!ret, "ImmSetCompositionStringW() failed.\n"); + ok(error == 0xdeadbeef, "Last error: %u\n", error); + } + + SetLastError(0xdeadbeef); + ret = ImmSetCompositionStringW(imc, SCS_SETSTR | SCS_CHANGEATTR, + NULL, 0, NULL, 0); + error = GetLastError(); + todo_wine { + ok(!ret, "ImmSetCompositionStringW() failed.\n"); + ok(error == 0xdeadbeef, "Last error: %u\n", error); + } + + SetLastError(0xdeadbeef); + ret = ImmSetCompositionStringW(imc, SCS_SETSTR | SCS_CHANGECLAUSE, + NULL, 0, NULL, 0); + error = GetLastError(); + todo_wine { + ok(!ret, "ImmSetCompositionStringW() failed.\n"); + ok(error == 0xdeadbeef, "Last error: %u\n", error); + } + + SetLastError(0xdeadbeef); + ret = ImmSetCompositionStringW(imc, SCS_CHANGEATTR | SCS_CHANGECLAUSE, + NULL, 0, NULL, 0); + error = GetLastError(); + todo_wine { + ok(!ret, "ImmSetCompositionStringW() failed.\n"); + ok(error == 0xdeadbeef, "Last error: %u\n", error); + } + + ImmReleaseContext(hwnd, imc); + return 0; +} + static int test_ImmIME(void) { HIMC imc; @@ -276,6 +323,7 @@ START_TEST(imm32) { { test_ImmNotifyIME(); test_ImmGetCompositionString(); + test_ImmSetCompositionString(); test_ImmIME(); } cleanup(); -- 1.5.6.3