winspool/tests: Test LastError on success of AddMonitor.

Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Detlef Riekenberg 2017-02-08 09:03:45 +00:00 committed by Alexandre Julliard
parent 54e52897f8
commit 72ca331431

View file

@ -434,7 +434,9 @@ static void test_AddMonitor(void)
mi2a.pDLLName = entry->dllname;
SetLastError(MAGIC_DEAD);
res = AddMonitorA(NULL, 2, (LPBYTE) &mi2a);
ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError());
/* Some apps depend on the result of GetLastError() also on success of AddMonitor */
ok(res && (GetLastError() == ERROR_SUCCESS),
"returned %d with %d (expected '!= 0' with ERROR_SUCCESS)\n", res, GetLastError());
/* add a monitor twice */
SetLastError(MAGIC_DEAD);