advapi32: Correct tests under WOW64
Alexandre Julliard
julliard at winehq.org
Wed Feb 15 13:13:40 CST 2012
Alistair Leslie-Hughes <leslie_alistair at hotmail.com> writes:
> @@ -1455,9 +1455,11 @@ static void test_token_attr(void)
> Size = 0;
> ret = GetTokenInformation(Token, TokenGroups, Groups, Size2, &Size);
> ok(Size > 1, "got %d\n", Size);
> - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
> - "%d with error %d\n", ret, GetLastError());
> - ok(*((BYTE*)Groups) == 0xcc, "buffer altered\n");
> + /* WoW64 return TRUE with the LastError set */
> + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "%d with error %d\n", ret, GetLastError());
> + if(!ret)
> + ok(*((BYTE*)Groups) == 0xcc, "buffer altered\n");
Testing last error on success is in general not useful.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list