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
0fd04755
Commit
0fd04755
authored
Mar 01, 2012
by
Bruno Jesus
Committed by
Alexandre Julliard
Mar 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32/tests: Add ImmGetDescription tests.
parent
27adecec
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
imm32.c
dlls/imm32/tests/imm32.c
+46
-0
No files found.
dlls/imm32/tests/imm32.c
View file @
0fd04755
...
...
@@ -573,6 +573,51 @@ static void test_ImmGetContext(void)
ok
(
ImmReleaseContext
(
hwnd
,
himc
),
"ImmReleaseContext failed
\n
"
);
}
static
void
test_ImmGetDescription
(
void
)
{
HKL
hkl
;
WCHAR
japime
[]
=
{
'E'
,
'0'
,
'0'
,
'1'
,
'0'
,
'4'
,
'1'
,
'1'
,
0
};
WCHAR
descW
[
100
];
CHAR
descA
[
100
];
UINT
ret
,
lret
;
/* FIXME: invalid keyboard layouts should not pass */
ret
=
ImmGetDescriptionW
(
NULL
,
NULL
,
0
);
todo_wine
ok
(
!
ret
,
"ImmGetDescriptionW failed, expected 0 received %d.
\n
"
,
ret
);
/* load a language with valid IMM descriptions */
hkl
=
LoadKeyboardLayoutW
(
japime
,
KLF_ACTIVATE
);
todo_wine
ok
(
hkl
!=
0
,
"LoadKeyboardLayoutW failed, expected != 0.
\n
"
);
ret
=
ImmGetDescriptionW
(
hkl
,
NULL
,
0
);
if
(
!
ret
)
{
win_skip
(
"ImmGetDescriptionW is not working for current loaded keyboard.
\n
"
);
return
;
}
ret
=
ImmGetDescriptionW
(
hkl
,
descW
,
0
);
ok
(
ret
,
"ImmGetDescriptionW failed, expected != 0 received 0.
\n
"
);
lret
=
ImmGetDescriptionW
(
hkl
,
descW
,
ret
+
1
);
ok
(
lret
,
"ImmGetDescriptionW failed, expected != 0 received 0.
\n
"
);
ok
(
lret
==
ret
,
"ImmGetDescriptionW failed to return the correct amount of data. Expected %d, got %d.
\n
"
,
ret
,
lret
);
lret
=
ImmGetDescriptionA
(
hkl
,
descA
,
ret
+
1
);
ok
(
lret
,
"ImmGetDescriptionA failed, expected != 0 received 0.
\n
"
);
todo_wine
ok
(
lret
==
ret
,
"ImmGetDescriptionA failed to return the correct amount of data. Expected %d, got %d.
\n
"
,
ret
,
lret
);
ret
/=
2
;
/* try to copy partially */
lret
=
ImmGetDescriptionW
(
hkl
,
descW
,
ret
+
1
);
ok
(
lret
,
"ImmGetDescriptionW failed, expected != 0 received 0.
\n
"
);
ok
(
lret
==
ret
,
"ImmGetDescriptionW failed to return the correct amount of data. Expected %d, got %d.
\n
"
,
ret
,
lret
);
ret
=
ImmGetDescriptionW
(
hkl
,
descW
,
1
);
ok
(
!
ret
,
"ImmGetDescriptionW failed, expected 0 received %d.
\n
"
,
ret
);
UnloadKeyboardLayout
(
hkl
);
}
START_TEST
(
imm32
)
{
if
(
init
())
{
...
...
@@ -584,6 +629,7 @@ START_TEST(imm32) {
test_ImmThreads
();
test_ImmIsUIMessage
();
test_ImmGetContext
();
test_ImmGetDescription
();
}
cleanup
();
}
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