Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
af058929
Commit
af058929
authored
Aug 12, 2013
by
Qian Hong
Committed by
Alexandre Julliard
Aug 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32/tests: Added tests for ImmDestroyContext.
parent
b5b52371
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
imm32.c
dlls/imm32/tests/imm32.c
+29
-0
No files found.
dlls/imm32/tests/imm32.c
View file @
af058929
...
...
@@ -774,6 +774,34 @@ static void test_ImmGetIMCCLockCount(void)
ImmDestroyIMCC
(
imcc
);
}
static
void
test_ImmDestroyContext
(
void
)
{
HIMC
imc
;
DWORD
ret
,
count
;
INPUTCONTEXT
*
ic
;
imc
=
ImmCreateContext
();
count
=
ImmGetIMCLockCount
(
imc
);
ok
(
count
==
0
,
"expect 0, returned %d
\n
"
,
count
);
ic
=
ImmLockIMC
(
imc
);
ok
(
ic
!=
NULL
,
"ImmLockIMC failed!
\n
"
);
count
=
ImmGetIMCLockCount
(
imc
);
ok
(
count
==
1
,
"expect 1, returned %d
\n
"
,
count
);
ret
=
ImmDestroyContext
(
imc
);
ok
(
ret
==
TRUE
,
"Destroy a locked IMC should success!
\n
"
);
ic
=
ImmLockIMC
(
imc
);
todo_wine
ok
(
ic
==
NULL
,
"Lock a destroyed IMC should fail!
\n
"
);
ret
=
ImmUnlockIMC
(
imc
);
todo_wine
ok
(
ret
==
FALSE
,
"Unlock a destroyed IMC should fail!
\n
"
);
count
=
ImmGetIMCLockCount
(
imc
);
todo_wine
ok
(
count
==
0
,
"Get lock count of a destroyed IMC should return 0!
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
ImmDestroyContext
(
imc
);
todo_wine
ok
(
ret
==
FALSE
,
"Destroy a destroyed IMC should fail!
\n
"
);
ret
=
GetLastError
();
todo_wine
ok
(
ret
==
ERROR_INVALID_HANDLE
,
"wrong last error %08x!
\n
"
,
ret
);
}
static
void
test_ImmDestroyIMCC
(
void
)
{
HIMCC
imcc
;
...
...
@@ -967,6 +995,7 @@ START_TEST(imm32) {
test_ImmDefaultHwnd
();
test_ImmGetIMCLockCount
();
test_ImmGetIMCCLockCount
();
test_ImmDestroyContext
();
test_ImmDestroyIMCC
();
msg_spy_cleanup
();
/* Reinitialize the hooks to capture all windows */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment