kernel32/tests: Win9x doesn't change last error.
This commit is contained in:
parent
f9e5296c7d
commit
ad697ecdc4
|
@ -59,22 +59,28 @@ static void test_GetVersionEx(void)
|
||||||
memset(&infoA,0,sizeof infoA);
|
memset(&infoA,0,sizeof infoA);
|
||||||
ret = GetVersionExA(&infoA);
|
ret = GetVersionExA(&infoA);
|
||||||
ok(!ret, "Expected GetVersionExA to fail\n");
|
ok(!ret, "Expected GetVersionExA to fail\n");
|
||||||
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
|
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
|
||||||
"Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
|
GetLastError() == 0xdeadbeef /* Win9x */,
|
||||||
|
"Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n",
|
||||||
|
GetLastError());
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA) / 2;
|
infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA) / 2;
|
||||||
ret = GetVersionExA(&infoA);
|
ret = GetVersionExA(&infoA);
|
||||||
ok(!ret, "Expected GetVersionExA to fail\n");
|
ok(!ret, "Expected GetVersionExA to fail\n");
|
||||||
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
|
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
|
||||||
"Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
|
GetLastError() == 0xdeadbeef /* Win9x */,
|
||||||
|
"Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n",
|
||||||
|
GetLastError());
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA) * 2;
|
infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA) * 2;
|
||||||
ret = GetVersionExA(&infoA);
|
ret = GetVersionExA(&infoA);
|
||||||
ok(!ret, "Expected GetVersionExA to fail\n");
|
ok(!ret, "Expected GetVersionExA to fail\n");
|
||||||
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
|
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
|
||||||
"Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
|
GetLastError() == 0xdeadbeef /* Win9x */,
|
||||||
|
"Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n",
|
||||||
|
GetLastError());
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
|
infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
|
||||||
|
|
Loading…
Reference in New Issue