Commit c31280d6 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

kernel32/tests: Check that WaitCommEvent() returns immediately in overlapped mode.

parent 7425d2ca
...@@ -855,6 +855,8 @@ static void test_waittxempty(void) ...@@ -855,6 +855,8 @@ static void test_waittxempty(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
res = WaitCommEvent(hcom, &evtmask, &ovl_wait); res = WaitCommEvent(hcom, &evtmask, &ovl_wait);
ok(!res && GetLastError() == ERROR_IO_PENDING, "WaitCommEvent error %d\n", GetLastError()); ok(!res && GetLastError() == ERROR_IO_PENDING, "WaitCommEvent error %d\n", GetLastError());
after = GetTickCount();
ok(after - before < 30, "WaitCommEvent should have returned immediately, took %d ms\n", after - before);
res = WaitForSingleObject(ovl_wait.hEvent, 1500); res = WaitForSingleObject(ovl_wait.hEvent, 1500);
ok(res == WAIT_OBJECT_0, "WaitCommEvent failed with a timeout\n"); ok(res == WAIT_OBJECT_0, "WaitCommEvent failed with a timeout\n");
if (res == WAIT_OBJECT_0) if (res == WAIT_OBJECT_0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment