Paul Gofman (@gofman) commented about dlls/ntdll/tests/sync.c:
{
int k;
for (k = 0; k < 8; k++)
ok( QueueUserAPC( apc_proc, GetCurrentThread(), (ULONG_PTR)&apc_count ),
"%s: failed to queue APC %d.\n", test->desc, k );
}
SetLastError( 0xdeadbeef );
ret = SleepEx( timeout.QuadPart ? (-timeout.QuadPart / 10000) : 0, test->alertable );
ok( GetLastError() == 0xdeadbeef, "%s: LastError unexpectedly changed to %lu.\n", test->desc, GetLastError() );
if (!test->alertable)
ok( !ret, "%s: SleepEx returned %lu.\n", test->desc, ret );
else
ok( !ret || ret == WAIT_IO_COMPLETION,
"%s: SleepEx returned %lu.\n", test->desc, ret );
like above, ``` ok( !ret || (test->alertable && ret == WAIT_IO_COMPLETION), "got %lu.\n", ret ); ``` is probably cleaner.