kernel32/tests: Check that WaitCommEvent() returns immediately in overlapped mode.
Francois Gouget
fgouget at free.fr
Fri Nov 1 04:37:41 CDT 2013
---
WaitCommEvent() this is based on a similar check a few lines up. I hope
it makes sense.
dlls/kernel32/tests/comm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/kernel32/tests/comm.c b/dlls/kernel32/tests/comm.c
index 8305550..99b4c98 100644
--- a/dlls/kernel32/tests/comm.c
+++ b/dlls/kernel32/tests/comm.c
@@ -853,6 +853,8 @@ static void test_waittxempty(void)
SetLastError(0xdeadbeef);
res = WaitCommEvent(hcom, &evtmask, &ovl_wait);
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);
ok(res == WAIT_OBJECT_0, "WaitCommEvent failed with a timeout\n");
if (res == WAIT_OBJECT_0)
--
1.8.4.rc3
More information about the wine-patches
mailing list