mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-14 20:05:41 +00:00
kernel32/tests: Don't test last error on success.
This commit is contained in:
parent
460991a8e9
commit
1c61a53ef6
|
@ -1152,22 +1152,13 @@ static void test_OpenConsoleW(void)
|
||||||
CloseHandle(ret);
|
CloseHandle(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* OpenConsoleW should not touch the last error on success. */
|
|
||||||
SetLastError(0xdeadbeef);
|
|
||||||
ret = pOpenConsoleW(coninW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_EXISTING);
|
ret = pOpenConsoleW(coninW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_EXISTING);
|
||||||
ok(ret != INVALID_HANDLE_VALUE,
|
ok(ret != INVALID_HANDLE_VALUE, "Expected OpenConsoleW to return a valid handle\n");
|
||||||
"Expected OpenConsoleW to return a valid handle\n");
|
|
||||||
ok(GetLastError() == 0xdeadbeef,
|
|
||||||
"Expected the last error to be untouched, got %u\n", GetLastError());
|
|
||||||
if (ret != INVALID_HANDLE_VALUE)
|
if (ret != INVALID_HANDLE_VALUE)
|
||||||
CloseHandle(ret);
|
CloseHandle(ret);
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
|
||||||
ret = pOpenConsoleW(conoutW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_EXISTING);
|
ret = pOpenConsoleW(conoutW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_EXISTING);
|
||||||
ok(ret != INVALID_HANDLE_VALUE,
|
ok(ret != INVALID_HANDLE_VALUE, "Expected OpenConsoleW to return a valid handle\n");
|
||||||
"Expected OpenConsoleW to return a valid handle\n");
|
|
||||||
ok(GetLastError() == 0xdeadbeef,
|
|
||||||
"Expected the last error to be untouched, got %u\n", GetLastError());
|
|
||||||
if (ret != INVALID_HANDLE_VALUE)
|
if (ret != INVALID_HANDLE_VALUE)
|
||||||
CloseHandle(ret);
|
CloseHandle(ret);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue