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
929dcfaa
Commit
929dcfaa
authored
Oct 29, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add a bunch of tests for GetQueueStatus and GetMessage combinations.
parent
7804129e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
0 deletions
+76
-0
msg.c
dlls/user32/tests/msg.c
+76
-0
No files found.
dlls/user32/tests/msg.c
View file @
929dcfaa
...
...
@@ -9212,6 +9212,82 @@ todo_wine {
ok
(
qstatus
==
0
,
"wrong qstatus %08x
\n
"
,
qstatus
);
/* some GetMessage tests */
keybd_event
(
'N'
,
0
,
0
,
0
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
QS_KEY
,
QS_KEY
),
"wrong qstatus %08x
\n
"
,
qstatus
);
PostMessageA
(
info
.
hwnd
,
WM_CHAR
,
'z'
,
0
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
QS_POSTMESSAGE
,
QS_POSTMESSAGE
|
QS_KEY
),
"wrong qstatus %08x
\n
"
,
qstatus
);
ret
=
GetMessageA
(
&
msg
,
0
,
0
,
0
);
ok
(
ret
&&
msg
.
message
==
WM_CHAR
&&
msg
.
wParam
==
'z'
,
"got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'
\n
"
,
ret
,
msg
.
message
,
msg
.
wParam
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
0
,
QS_KEY
),
"wrong qstatus %08x
\n
"
,
qstatus
);
ret
=
GetMessageA
(
&
msg
,
0
,
0
,
0
);
ok
(
ret
&&
msg
.
message
==
WM_KEYDOWN
&&
msg
.
wParam
==
'N'
,
"got %d and %04x wParam %08lx instead of TRUE and WM_KEYDOWN wParam 'N'
\n
"
,
ret
,
msg
.
message
,
msg
.
wParam
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
0
,
"wrong qstatus %08x
\n
"
,
qstatus
);
keybd_event
(
'N'
,
0
,
0
,
0
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
QS_KEY
,
QS_KEY
),
"wrong qstatus %08x
\n
"
,
qstatus
);
PostMessageA
(
info
.
hwnd
,
WM_CHAR
,
'z'
,
0
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
QS_POSTMESSAGE
,
QS_POSTMESSAGE
|
QS_KEY
),
"wrong qstatus %08x
\n
"
,
qstatus
);
ret
=
GetMessageA
(
&
msg
,
0
,
WM_KEYDOWN
,
WM_KEYUP
);
ok
(
ret
&&
msg
.
message
==
WM_KEYDOWN
&&
msg
.
wParam
==
'N'
,
"got %d and %04x wParam %08lx instead of TRUE and WM_KEYDOWN wParam 'N'
\n
"
,
ret
,
msg
.
message
,
msg
.
wParam
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
0
,
QS_POSTMESSAGE
),
"wrong qstatus %08x
\n
"
,
qstatus
);
ret
=
GetMessageA
(
&
msg
,
0
,
WM_CHAR
,
WM_CHAR
);
ok
(
ret
&&
msg
.
message
==
WM_CHAR
&&
msg
.
wParam
==
'z'
,
"got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'
\n
"
,
ret
,
msg
.
message
,
msg
.
wParam
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
0
,
"wrong qstatus %08x
\n
"
,
qstatus
);
keybd_event
(
'N'
,
0
,
KEYEVENTF_KEYUP
,
0
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
QS_KEY
,
QS_KEY
),
"wrong qstatus %08x
\n
"
,
qstatus
);
PostMessageA
(
info
.
hwnd
,
WM_CHAR
,
'z'
,
0
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
QS_POSTMESSAGE
,
QS_POSTMESSAGE
|
QS_KEY
),
"wrong qstatus %08x
\n
"
,
qstatus
);
trace
(
"signalling to send message
\n
"
);
SetEvent
(
info
.
hevent
[
EV_SENDMSG
]);
WaitForSingleObject
(
info
.
hevent
[
EV_ACK
],
INFINITE
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
QS_SENDMESSAGE
,
QS_SENDMESSAGE
|
QS_POSTMESSAGE
|
QS_KEY
),
"wrong qstatus %08x
\n
"
,
qstatus
);
ret
=
GetMessageA
(
&
msg
,
0
,
WM_KEYDOWN
,
WM_KEYUP
);
ok
(
ret
&&
msg
.
message
==
WM_KEYUP
&&
msg
.
wParam
==
'N'
,
"got %d and %04x wParam %08lx instead of TRUE and WM_KEYDOWN wParam 'N'
\n
"
,
ret
,
msg
.
message
,
msg
.
wParam
);
ok_sequence
(
WmUser
,
"WmUser"
,
FALSE
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
0
,
QS_POSTMESSAGE
),
"wrong qstatus %08x
\n
"
,
qstatus
);
ret
=
GetMessageA
(
&
msg
,
0
,
WM_CHAR
,
WM_CHAR
);
ok
(
ret
&&
msg
.
message
==
WM_CHAR
&&
msg
.
wParam
==
'z'
,
"got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'
\n
"
,
ret
,
msg
.
message
,
msg
.
wParam
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
0
,
"wrong qstatus %08x
\n
"
,
qstatus
);
done:
trace
(
"signalling to exit
\n
"
);
SetEvent
(
info
.
hevent
[
EV_STOP
]);
...
...
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