From ede2c343438ec379ec73f21ccf6c8746bbe9b6ad Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 7 Jul 2005 17:20:44 +0000 Subject: [PATCH] Add a MsgWaitForMultipleObjects test. --- dlls/user/tests/msg.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dlls/user/tests/msg.c b/dlls/user/tests/msg.c index 268e508a547..f467e6960b5 100644 --- a/dlls/user/tests/msg.c +++ b/dlls/user/tests/msg.c @@ -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 ); -- 2.11.4.GIT