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
a2695810
Commit
a2695810
authored
Apr 06, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Apr 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add tests for ToUnicodeEx with a NULL pointer as keystate.
parent
1059ee3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
input.c
dlls/user32/tests/input.c
+23
-2
No files found.
dlls/user32/tests/input.c
View file @
a2695810
...
...
@@ -1542,7 +1542,7 @@ static void test_ToUnicode(void)
{
WCHAR
wStr
[
4
];
BYTE
state
[
256
];
const
BYTE
SC_RETURN
=
0x1c
,
SC_TAB
=
0x0f
;
const
BYTE
SC_RETURN
=
0x1c
,
SC_TAB
=
0x0f
,
SC_A
=
0x1e
;
const
BYTE
HIGHEST_BIT
=
0x80
;
int
i
,
ret
;
for
(
i
=
0
;
i
<
256
;
i
++
)
...
...
@@ -1564,9 +1564,13 @@ static void test_ToUnicode(void)
ok
(
wStr
[
1
]
==
0
||
broken
(
wStr
[
1
]
!=
0
)
/* nt4 */
,
"ToUnicode didn't null-terminate the buffer when there was room.
\n
"
);
}
ret
=
ToUnicode
(
'A'
,
SC_A
,
state
,
wStr
,
4
,
0
);
ok
(
ret
==
1
,
"ToUnicode for character A didn't return 1 (was %i)
\n
"
,
ret
);
ok
(
wStr
[
0
]
==
'a'
,
"ToUnicode for character 'A' was %i (expected %i)
\n
"
,
wStr
[
0
],
'a'
);
state
[
VK_CONTROL
]
|=
HIGHEST_BIT
;
state
[
VK_LCONTROL
]
|=
HIGHEST_BIT
;
ret
=
ToUnicode
(
VK_TAB
,
SC_TAB
,
state
,
wStr
,
2
,
0
);
ok
(
ret
==
0
,
"ToUnicode for CTRL + Tab didn't return 0 (was %i)
\n
"
,
ret
);
...
...
@@ -1575,12 +1579,29 @@ static void test_ToUnicode(void)
if
(
ret
==
1
)
ok
(
wStr
[
0
]
==
'\n'
,
"ToUnicode for CTRL + Return was %i (expected 10)
\n
"
,
wStr
[
0
]);
ret
=
ToUnicode
(
'A'
,
SC_A
,
state
,
wStr
,
4
,
0
);
ok
(
ret
==
1
,
"ToUnicode for CTRL + character A didn't return 1 (was %i)
\n
"
,
ret
);
ok
(
wStr
[
0
]
==
1
,
"ToUnicode for CTRL + character 'A' was %i (expected 1)
\n
"
,
wStr
[
0
]);
state
[
VK_SHIFT
]
|=
HIGHEST_BIT
;
state
[
VK_LSHIFT
]
|=
HIGHEST_BIT
;
ret
=
ToUnicode
(
VK_TAB
,
SC_TAB
,
state
,
wStr
,
2
,
0
);
ok
(
ret
==
0
,
"ToUnicode for CTRL + SHIFT + Tab didn't return 0 (was %i)
\n
"
,
ret
);
ret
=
ToUnicode
(
VK_RETURN
,
SC_RETURN
,
state
,
wStr
,
2
,
0
);
todo_wine
ok
(
ret
==
0
,
"ToUnicode for CTRL + SHIFT + Return didn't return 0 (was %i)
\n
"
,
ret
);
ret
=
ToUnicode
(
VK_TAB
,
SC_TAB
,
NULL
,
wStr
,
4
,
0
);
ok
(
ret
==
0
,
"ToUnicode with NULL keystate didn't return 0 (was %i)
\n
"
,
ret
);
ret
=
ToUnicode
(
VK_RETURN
,
SC_RETURN
,
NULL
,
wStr
,
4
,
0
);
ok
(
ret
==
0
,
"ToUnicode with NULL keystate didn't return 0 (was %i)
\n
"
,
ret
);
ret
=
ToUnicode
(
'A'
,
SC_A
,
NULL
,
wStr
,
4
,
0
);
ok
(
ret
==
0
,
"ToUnicode with NULL keystate didn't return 0 (was %i)
\n
"
,
ret
);
ret
=
ToUnicodeEx
(
VK_TAB
,
SC_TAB
,
NULL
,
wStr
,
4
,
0
,
GetKeyboardLayout
(
0
));
ok
(
ret
==
0
,
"ToUnicodeEx with NULL keystate didn't return 0 (was %i)
\n
"
,
ret
);
ret
=
ToUnicodeEx
(
VK_RETURN
,
SC_RETURN
,
NULL
,
wStr
,
4
,
0
,
GetKeyboardLayout
(
0
));
ok
(
ret
==
0
,
"ToUnicodeEx with NULL keystate didn't return 0 (was %i)
\n
"
,
ret
);
ret
=
ToUnicodeEx
(
'A'
,
SC_A
,
NULL
,
wStr
,
4
,
0
,
GetKeyboardLayout
(
0
));
ok
(
ret
==
0
,
"ToUnicodeEx with NULL keystate didn't return 0 (was %i)
\n
"
,
ret
);
}
static
void
test_get_async_key_state
(
void
)
...
...
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