mirror of
https://github.com/reactos/wine.git
synced 2025-02-13 08:44:54 +00:00
Add a MsgWaitForMultipleObjects test.
This commit is contained in:
parent
257c337c19
commit
ede2c34343
@ -2904,6 +2904,7 @@ static void test_messages(void)
|
||||
HWND hchild2, hbutton;
|
||||
HMENU hmenu;
|
||||
MSG msg;
|
||||
DWORD ret;
|
||||
|
||||
flush_sequence();
|
||||
|
||||
@ -3202,6 +3203,22 @@ static void test_messages(void)
|
||||
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
|
||||
flush_sequence();
|
||||
|
||||
/* MsgWaitForMultipleObjects test */
|
||||
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
|
||||
ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %lx\n", ret);
|
||||
|
||||
PostMessageA(hparent, WM_USER, 0, 0);
|
||||
|
||||
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
|
||||
ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %lx\n", ret);
|
||||
|
||||
ok(PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n");
|
||||
ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message);
|
||||
|
||||
ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
|
||||
ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %lx\n", ret);
|
||||
/* end of MsgWaitForMultipleObjects test */
|
||||
|
||||
/* the following test causes an exception in user.exe under win9x */
|
||||
if (!PostMessageW( hparent, WM_USER, 0, 0 )) return;
|
||||
PostMessageW( hparent, WM_USER+1, 0, 0 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user