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
6345c938
Commit
6345c938
authored
Sep 24, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix some input test failures.
parent
7e1bc58d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
input.c
dlls/user32/tests/input.c
+15
-13
No files found.
dlls/user32/tests/input.c
View file @
6345c938
...
@@ -371,6 +371,7 @@ static void empty_message_queue(void) {
...
@@ -371,6 +371,7 @@ static void empty_message_queue(void) {
struct
transition_s
{
struct
transition_s
{
WORD
wVk
;
WORD
wVk
;
BYTE
before_state
;
BYTE
before_state
;
BYTE
optional
;
};
};
typedef
enum
{
typedef
enum
{
...
@@ -448,11 +449,12 @@ struct sendinput_test_s {
...
@@ -448,11 +449,12 @@ struct sendinput_test_s {
/* test L-SHIFT & R-SHIFT: */
/* test L-SHIFT & R-SHIFT: */
/* RSHIFT == LSHIFT */
/* RSHIFT == LSHIFT */
{
VK_RSHIFT
,
0
,
0
,
{
VK_RSHIFT
,
0
,
0
,
{{
VK_SHIFT
,
0x00
},
{
VK_LSHIFT
,
0x00
},
{
0
}},
/* recent windows versions (>= w2k3) correctly report an RSHIFT transition */
{{
VK_SHIFT
,
0x00
},
{
VK_LSHIFT
,
0x00
,
TRUE
},
{
VK_RSHIFT
,
0x00
,
TRUE
},
{
0
}},
{{
WM_KEYDOWN
,
hook
|
wparam
,
VK_RSHIFT
},
{{
WM_KEYDOWN
,
hook
|
wparam
,
VK_RSHIFT
},
{
WM_KEYDOWN
},
{
0
}}},
{
WM_KEYDOWN
},
{
0
}}},
{
VK_RSHIFT
,
KEYEVENTF_KEYUP
,
0
,
{
VK_RSHIFT
,
KEYEVENTF_KEYUP
,
0
,
{{
VK_SHIFT
,
0x80
},
{
VK_LSHIFT
,
0x80
},
{
0
}},
{{
VK_SHIFT
,
0x80
},
{
VK_LSHIFT
,
0x80
,
TRUE
},
{
VK_RSHIFT
,
0x80
,
TRUE
},
{
0
}},
{{
WM_KEYUP
,
hook
,
hook
|
wparam
,
VK_RSHIFT
},
{{
WM_KEYUP
,
hook
,
hook
|
wparam
,
VK_RSHIFT
},
{
WM_KEYUP
},
{
0
}}},
{
WM_KEYUP
},
{
0
}}},
...
@@ -643,7 +645,7 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, struct sendinput_tes
...
@@ -643,7 +645,7 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, struct sendinput_tes
~
t
->
before_state
&
0x80
);
~
t
->
before_state
&
0x80
);
}
}
}
else
{
}
else
{
ok
(
matched
,
"%02d: %02x from %02x -> %02x "
ok
(
matched
||
t
->
optional
,
"%02d: %02x from %02x -> %02x "
"instead of %02x -> %02x
\n
"
,
id
,
t
->
wVk
,
"instead of %02x -> %02x
\n
"
,
id
,
t
->
wVk
,
ks1
[
t
->
wVk
]
&
0x80
,
ks2
[
t
->
wVk
]
&
0x80
,
t
->
before_state
,
ks1
[
t
->
wVk
]
&
0x80
,
ks2
[
t
->
wVk
]
&
0x80
,
t
->
before_state
,
~
t
->
before_state
&
0x80
);
~
t
->
before_state
&
0x80
);
...
@@ -1008,19 +1010,19 @@ static void test_GetMouseMovePointsEx(void)
...
@@ -1008,19 +1010,19 @@ static void test_GetMouseMovePointsEx(void)
SetLastError
(
MYERROR
);
SetLastError
(
MYERROR
);
retval
=
pGetMouseMovePointsEx
(
0
,
&
in
,
out
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
retval
=
pGetMouseMovePointsEx
(
0
,
&
in
,
out
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
()
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
MYERROR
,
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
SetLastError
(
MYERROR
);
SetLastError
(
MYERROR
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
)
-
1
,
&
in
,
out
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
)
-
1
,
&
in
,
out
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
()
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
MYERROR
,
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
SetLastError
(
MYERROR
);
SetLastError
(
MYERROR
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
)
+
1
,
&
in
,
out
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
)
+
1
,
&
in
,
out
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
()
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
MYERROR
,
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
/* test second and third parameter
/* test second and third parameter
...
@@ -1028,7 +1030,7 @@ static void test_GetMouseMovePointsEx(void)
...
@@ -1028,7 +1030,7 @@ static void test_GetMouseMovePointsEx(void)
SetLastError
(
MYERROR
);
SetLastError
(
MYERROR
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
),
NULL
,
out
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
),
NULL
,
out
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
ERROR_NOACCESS
==
GetLastError
()
,
ok
(
GetLastError
()
==
ERROR_NOACCESS
||
GetLastError
()
==
MYERROR
,
"expected error ERROR_NOACCESS, got %u
\n
"
,
GetLastError
());
"expected error ERROR_NOACCESS, got %u
\n
"
,
GetLastError
());
SetLastError
(
MYERROR
);
SetLastError
(
MYERROR
);
...
@@ -1059,7 +1061,7 @@ static void test_GetMouseMovePointsEx(void)
...
@@ -1059,7 +1061,7 @@ static void test_GetMouseMovePointsEx(void)
count
=
-
1
;
count
=
-
1
;
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
),
&
in
,
out
,
count
,
GMMP_USE_DISPLAY_POINTS
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
),
&
in
,
out
,
count
,
GMMP_USE_DISPLAY_POINTS
);
ok
(
retval
==
count
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
retval
==
count
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
()
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
MYERROR
,
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
SetLastError
(
MYERROR
);
SetLastError
(
MYERROR
);
...
@@ -1083,7 +1085,7 @@ static void test_GetMouseMovePointsEx(void)
...
@@ -1083,7 +1085,7 @@ static void test_GetMouseMovePointsEx(void)
SetLastError
(
MYERROR
);
SetLastError
(
MYERROR
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
),
&
in
,
out
,
BUFLIM
+
1
,
GMMP_USE_DISPLAY_POINTS
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
),
&
in
,
out
,
BUFLIM
+
1
,
GMMP_USE_DISPLAY_POINTS
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
()
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
MYERROR
,
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
/* it was not possible to force an error with the fifth parameter on win2k */
/* it was not possible to force an error with the fifth parameter on win2k */
...
@@ -1092,25 +1094,25 @@ static void test_GetMouseMovePointsEx(void)
...
@@ -1092,25 +1094,25 @@ static void test_GetMouseMovePointsEx(void)
SetLastError
(
MYERROR
);
SetLastError
(
MYERROR
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
)
-
1
,
NULL
,
out
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
)
-
1
,
NULL
,
out
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
()
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
MYERROR
,
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
SetLastError
(
MYERROR
);
SetLastError
(
MYERROR
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
)
-
1
,
&
in
,
NULL
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
)
-
1
,
&
in
,
NULL
,
BUFLIM
,
GMMP_USE_DISPLAY_POINTS
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
()
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
MYERROR
,
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
SetLastError
(
MYERROR
);
SetLastError
(
MYERROR
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
),
NULL
,
out
,
BUFLIM
+
1
,
GMMP_USE_DISPLAY_POINTS
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
),
NULL
,
out
,
BUFLIM
+
1
,
GMMP_USE_DISPLAY_POINTS
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
()
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
MYERROR
,
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
SetLastError
(
MYERROR
);
SetLastError
(
MYERROR
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
),
&
in
,
NULL
,
BUFLIM
+
1
,
GMMP_USE_DISPLAY_POINTS
);
retval
=
pGetMouseMovePointsEx
(
sizeof
(
MOUSEMOVEPOINT
),
&
in
,
NULL
,
BUFLIM
+
1
,
GMMP_USE_DISPLAY_POINTS
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
retval
==
-
1
,
"expected GetMouseMovePointsEx to fail, got %d
\n
"
,
retval
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
()
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
MYERROR
,
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
"expected error ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
#undef BUFLIM
#undef BUFLIM
...
...
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