Re: [PATCH 2/2] user32/tests: Test exception handling for timer callbacks.
Qian Hong <qhong(a)codeweavers.com> writes:
+static void test_timers_exception(DWORD code) +{ + UINT_PTR id; + MSG msg; + + exception = code; + count = 0; + id = SetTimer(NULL, 0, 300, callback_exception); + ok(id != 0, "did not get id from SetTimer.\n"); + + Sleep(150); + while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); + ok(count == 0, "did not get zero count as expected (%i).\n", count); + Sleep(200); + while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); + ok(count == 1, "did not get one count as expected (%i).\n", count); + KillTimer(NULL, id); + Sleep(350); + while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); + ok(count == 1, "killing timer did not work (%i).\n", count); +}
You should find a way to test this without all these sleeps, the user32 tests already take a long time as it is. -- Alexandre Julliard julliard(a)winehq.org
On Mon, Nov 3, 2014 at 7:38 PM, Alexandre Julliard <julliard(a)winehq.org> wrote:
You should find a way to test this without all these sleeps, the user32 tests already take a long time as it is.
Thanks for feedback! I have a plan to do that, will try later. -- Regards, Qian Hong - http://www.codeweavers.com
participants (2)
-
Alexandre Julliard -
Qian Hong