crypt32/tests: check Vista error codes for the msg tests. [resend]
Alexandre Julliard
julliard at winehq.org
Fri Jul 25 04:20:22 CDT 2008
"Reece Dunn" <msclrhd at googlemail.com> writes:
> @@ -383,9 +383,10 @@ static void test_data_msg_update(void)
> /* Can't update a message with no data */
> SetLastError(0xdeadbeef);
> ret = CryptMsgUpdate(msg, NULL, 0, TRUE);
> - /* NT: E_INVALIDARG, 9x: unchanged */
> - ok(!ret && (GetLastError() == E_INVALIDARG || GetLastError() == 0xdeadbeef),
> - "Expected E_INVALIDARG or 0xdeadbeef, got 0x%x\n", GetLastError());
> + /* last error -- NT: E_INVALIDARG, 9x/Vista: unchanged */
> + /* ret is FALSE on XP and earlier but TRUE on Vista, therefore it cannot be tested for */
> + ok((GetLastError() == E_INVALIDARG || GetLastError() == 0xdeadbeef),
> + "Expected E_INVALIDARG or 0xdeadbeef, 0x%x\n", GetLastError());
It doesn't make sense to test last error if the function succeeds. Also
if it sometimes succeeds and sometimes fails the whole test is useless.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list