Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
196295db
Commit
196295db
authored
Mar 09, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32/tests: Test basic ImmEnumInputContext usage.
parent
195879ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
imm32.c
dlls/imm32/tests/imm32.c
+42
-0
No files found.
dlls/imm32/tests/imm32.c
View file @
196295db
...
@@ -55,6 +55,12 @@ static const char *debugstr_ok( const char *cond )
...
@@ -55,6 +55,12 @@ static const char *debugstr_ok( const char *cond )
t v = (r); \
t v = (r); \
ok( v == (e), "%s " f "\n", debugstr_ok( #r ), v, ##__VA_ARGS__ ); \
ok( v == (e), "%s " f "\n", debugstr_ok( #r ), v, ##__VA_ARGS__ ); \
} while (0)
} while (0)
#define ok_ne( e, r, t, f, ... ) \
do \
{ \
t v = (r); \
ok( v != (e), "%s " f "\n", debugstr_ok( #r ), v, ##__VA_ARGS__ ); \
} while (0)
#define ok_wcs( e, r ) \
#define ok_wcs( e, r ) \
do \
do \
{ \
{ \
...
@@ -2787,6 +2793,7 @@ static struct ime_functions ime_functions =
...
@@ -2787,6 +2793,7 @@ static struct ime_functions ime_functions =
static
UINT
ime_count
;
static
UINT
ime_count
;
static
WCHAR
ime_path
[
MAX_PATH
];
static
WCHAR
ime_path
[
MAX_PATH
];
static
HIMC
default_himc
;
static
HKL
ime_install
(
void
)
static
HKL
ime_install
(
void
)
{
{
...
@@ -2905,6 +2912,39 @@ static void ime_cleanup( HKL hkl )
...
@@ -2905,6 +2912,39 @@ static void ime_cleanup( HKL hkl )
ok
(
ret
,
"DeleteFileW failed, error %lu
\n
"
,
GetLastError
()
);
ok
(
ret
,
"DeleteFileW failed, error %lu
\n
"
,
GetLastError
()
);
}
}
static
BOOL
CALLBACK
enum_get_context
(
HIMC
himc
,
LPARAM
lparam
)
{
ime_trace
(
"himc %p
\n
"
,
himc
);
*
(
HIMC
*
)
lparam
=
himc
;
return
TRUE
;
}
static
BOOL
CALLBACK
enum_find_context
(
HIMC
himc
,
LPARAM
lparam
)
{
ime_trace
(
"himc %p
\n
"
,
himc
);
if
(
lparam
&&
lparam
==
(
LPARAM
)
himc
)
return
FALSE
;
return
TRUE
;
}
static
void
test_ImmEnumInputContext
(
void
)
{
HIMC
himc
;
todo_wine
ok_ret
(
1
,
ImmEnumInputContext
(
0
,
enum_get_context
,
(
LPARAM
)
&
default_himc
)
);
ok_ret
(
0
,
ImmEnumInputContext
(
1
,
enum_find_context
,
0
)
);
todo_wine
ok_ret
(
1
,
ImmEnumInputContext
(
GetCurrentThreadId
(),
enum_find_context
,
0
)
);
ok_ret
(
0
,
ImmEnumInputContext
(
GetCurrentProcessId
(),
enum_find_context
,
0
)
);
himc
=
ImmCreateContext
();
ok_ne
(
NULL
,
himc
,
HIMC
,
"%p"
);
ok_ret
(
0
,
ImmEnumInputContext
(
GetCurrentThreadId
(),
enum_find_context
,
(
LPARAM
)
himc
)
);
ok_ret
(
1
,
ImmDestroyContext
(
himc
)
);
todo_wine
ok_ret
(
1
,
ImmEnumInputContext
(
GetCurrentThreadId
(),
enum_find_context
,
(
LPARAM
)
himc
)
);
}
static
void
test_ImmInstallIME
(
void
)
static
void
test_ImmInstallIME
(
void
)
{
{
UINT
ret
;
UINT
ret
;
...
@@ -3653,6 +3693,8 @@ START_TEST(imm32)
...
@@ -3653,6 +3693,8 @@ START_TEST(imm32)
test_com_initialization
();
test_com_initialization
();
test_ImmEnumInputContext
();
test_ImmInstallIME
();
test_ImmInstallIME
();
test_ImmGetDescription
();
test_ImmGetDescription
();
test_ImmGetIMEFileName
();
test_ImmGetIMEFileName
();
...
...
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