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
9783f676
Commit
9783f676
authored
Feb 20, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Skip some input tests if we fail to queue keyboard events.
parent
4c65a3c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
input.c
dlls/user32/tests/input.c
+14
-9
No files found.
dlls/user32/tests/input.c
View file @
9783f676
...
...
@@ -203,7 +203,7 @@ static int KbdMessage( KEV kev, WPARAM *pwParam, LPARAM *plParam )
* . retrieve the messages from the input queue
* . verify
*/
static
void
do_test
(
HWND
hwnd
,
int
seqnr
,
const
KEV
td
[]
)
static
BOOL
do_test
(
HWND
hwnd
,
int
seqnr
,
const
KEV
td
[]
)
{
INPUT
inputs
[
MAXKEYEVENTS
];
KMSG
expmsg
[
MAXKEYEVENTS
];
...
...
@@ -238,20 +238,25 @@ static void do_test( HWND hwnd, int seqnr, const KEV td[] )
ok
(
msg
.
message
==
expmsg
[
i
].
message
&&
msg
.
wParam
==
expmsg
[
i
].
wParam
&&
msg
.
lParam
==
expmsg
[
i
].
lParam
,
"wrong message! expected:
\n
"
"message[%d] %-15s wParam %04lx lParam %08lx
\n
"
,
i
,
MSGNAME
[(
expmsg
[
i
]).
message
-
WM_KEYFIRST
],
"%u: wrong message %x expected %s wParam %04lx lParam %08lx
\n
"
,
i
,
msg
.
message
,
MSGNAME
[(
expmsg
[
i
]).
message
-
WM_KEYFIRST
],
expmsg
[
i
].
wParam
,
expmsg
[
i
].
lParam
);
}
i
++
;
}
if
(
winetest_debug
>
1
)
trace
(
"%d messages retrieved
\n
"
,
i
);
if
(
!
i
&&
kmctr
)
{
skip
(
"simulated keyboard input doesn't work
\n
"
);
return
FALSE
;
}
ok
(
i
==
kmctr
,
"message count is wrong: got %d expected: %d
\n
"
,
i
,
kmctr
);
return
TRUE
;
}
/* test all combinations of the specified key events */
static
void
TestASet
(
HWND
hWnd
,
int
nrkev
,
const
KEV
kevdwn
[],
const
KEV
kevup
[]
)
static
BOOL
TestASet
(
HWND
hWnd
,
int
nrkev
,
const
KEV
kevdwn
[],
const
KEV
kevup
[]
)
{
int
i
,
j
,
k
,
l
,
m
,
n
;
static
int
count
=
0
;
...
...
@@ -266,7 +271,7 @@ static void TestASet( HWND hWnd, int nrkev, const KEV kevdwn[], const KEV kevup[
kbuf
[
1
]
=
kevdwn
[
1
-
i
];
kbuf
[
2
]
=
kevup
[
j
];
kbuf
[
3
]
=
kevup
[
1
-
j
];
do_test
(
hWnd
,
count
++
,
kbuf
)
;
if
(
!
do_test
(
hWnd
,
count
++
,
kbuf
))
return
FALSE
;
}
}
}
...
...
@@ -288,7 +293,7 @@ static void TestASet( HWND hWnd, int nrkev, const KEV kevdwn[], const KEV kevup[
kbuf
[
3
]
=
kevup
[
l
];
kbuf
[
4
]
=
kevup
[
m
];
kbuf
[
5
]
=
kevup
[
n
];
do_test
(
hWnd
,
count
++
,
kbuf
)
;
if
(
!
do_test
(
hWnd
,
count
++
,
kbuf
))
return
FALSE
;
}
}
}
...
...
@@ -296,6 +301,7 @@ static void TestASet( HWND hWnd, int nrkev, const KEV kevdwn[], const KEV kevup[
}
}
}
return
TRUE
;
}
/* test each set specified in the global testkeyset array */
...
...
@@ -303,8 +309,7 @@ static void TestSysKeys( HWND hWnd)
{
int
i
;
for
(
i
=
0
;
testkeyset
[
i
].
nrkev
;
i
++
)
TestASet
(
hWnd
,
testkeyset
[
i
].
nrkev
,
testkeyset
[
i
].
keydwn
,
testkeyset
[
i
].
keyup
);
if
(
!
TestASet
(
hWnd
,
testkeyset
[
i
].
nrkev
,
testkeyset
[
i
].
keydwn
,
testkeyset
[
i
].
keyup
))
break
;
}
static
LRESULT
CALLBACK
WndProc
(
HWND
hWnd
,
UINT
msg
,
WPARAM
wParam
,
...
...
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