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
e4538d9a
Commit
e4538d9a
authored
Nov 16, 2020
by
Jeff Smith
Committed by
Alexandre Julliard
Nov 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Simplification of some message broadcast tests.
Signed-off-by:
Jeff Smith
<
whydoubt@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e92cc29d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
36 deletions
+11
-36
msg.c
dlls/user32/tests/msg.c
+11
-36
No files found.
dlls/user32/tests/msg.c
View file @
e4538d9a
...
...
@@ -16001,6 +16001,7 @@ static void test_broadcast(void)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
messages
);
i
++
)
{
BOOL
ret
;
BOOL
msg_expected
=
(
messages
[
i
]
<
WM_USER
||
messages
[
i
]
>=
0xc000
);
MSG
msg
;
flush_events
();
...
...
@@ -16013,15 +16014,9 @@ static void test_broadcast(void)
memset
(
&
msg
,
0xab
,
sizeof
(
msg
));
ret
=
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
);
if
(
messages
[
i
]
<
WM_USER
||
messages
[
i
]
>=
0xc000
)
{
ok
(
ret
,
"%d: message %04x, got %d, error %d
\n
"
,
i
,
messages
[
i
],
ret
,
GetLastError
());
ok
(
ret
==
msg_expected
,
"%d: message %04x, got %d, error %d
\n
"
,
i
,
messages
[
i
],
ret
,
GetLastError
());
if
(
msg_expected
)
ok
(
msg
.
hwnd
==
hwnd
,
"%d: got %p
\n
"
,
i
,
msg
.
hwnd
);
}
else
{
ok
(
!
ret
,
"%d: message %04x, got %d, error %d
\n
"
,
i
,
messages
[
i
],
ret
,
GetLastError
());
}
/* post, topmost */
ret
=
PostMessageA
(
HWND_TOPMOST
,
messages
[
i
],
0
,
0
);
...
...
@@ -16029,15 +16024,9 @@ static void test_broadcast(void)
memset
(
&
msg
,
0xab
,
sizeof
(
msg
));
ret
=
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
);
if
(
messages
[
i
]
<
WM_USER
||
messages
[
i
]
>=
0xc000
)
{
ok
(
ret
,
"%d: message %04x, got %d, error %d
\n
"
,
i
,
messages
[
i
],
ret
,
GetLastError
());
ok
(
ret
==
msg_expected
,
"%d: message %04x, got %d, error %d
\n
"
,
i
,
messages
[
i
],
ret
,
GetLastError
());
if
(
msg_expected
)
ok
(
msg
.
hwnd
==
hwnd
,
"%d: got %p
\n
"
,
i
,
msg
.
hwnd
);
}
else
{
ok
(
!
ret
,
"%d: got %d, error %d
\n
"
,
i
,
ret
,
GetLastError
());
}
/* send, broadcast */
g_broadcast_wparam
=
0xdead
;
...
...
@@ -16046,16 +16035,9 @@ static void test_broadcast(void)
win_skip
(
"broadcasting test %d, timeout
\n
"
,
i
);
else
{
if
(
messages
[
i
]
<
WM_USER
||
messages
[
i
]
>=
0xc000
)
{
ok
(
g_broadcast_wparam
==
0xbaadbeef
,
"%d: message %04x, got %#lx, error %d
\n
"
,
i
,
messages
[
i
],
g_broadcast_wparam
,
GetLastError
());
}
else
{
ok
(
g_broadcast_wparam
==
0xdead
,
"%d: message %04x, got %#lx, error %d
\n
"
,
i
,
messages
[
i
],
g_broadcast_wparam
,
GetLastError
());
}
WPARAM
wparam_expected
=
msg_expected
?
0xbaadbeef
:
0xdead
;
ok
(
g_broadcast_wparam
==
wparam_expected
,
"%d: message %04x, got %#lx, error %d
\n
"
,
i
,
messages
[
i
],
g_broadcast_wparam
,
GetLastError
());
}
/* send, topmost */
...
...
@@ -16065,16 +16047,9 @@ static void test_broadcast(void)
win_skip
(
"broadcasting test %d, timeout
\n
"
,
i
);
else
{
if
(
messages
[
i
]
<
WM_USER
||
messages
[
i
]
>=
0xc000
)
{
ok
(
g_broadcast_wparam
==
0xbaadbeef
,
"%d: message %04x, got %#lx, error %d
\n
"
,
i
,
messages
[
i
],
g_broadcast_wparam
,
GetLastError
());
}
else
{
ok
(
g_broadcast_wparam
==
0xdead
,
"%d: message %04x, got %#lx, error %d
\n
"
,
i
,
messages
[
i
],
g_broadcast_wparam
,
GetLastError
());
}
WPARAM
wparam_expected
=
msg_expected
?
0xbaadbeef
:
0xdead
;
ok
(
g_broadcast_wparam
==
wparam_expected
,
"%d: message %04x, got %#lx, error %d
\n
"
,
i
,
messages
[
i
],
g_broadcast_wparam
,
GetLastError
());
}
}
...
...
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