crypt32/tests: check Vista error codes for the msg tests.

Reece Dunn msclrhd at googlemail.com
Wed Jul 23 05:48:47 CDT 2008


2008/7/23 Markus Hitter <mah at jump-ing.de>:
>
> Am 23.07.2008 um 02:25 schrieb Reece Dunn:
>>
>> +    /* 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
>> ());
>
> A more general question: Is it Wine's policy to just ignore
> differences in behaviour between different Windows versions? From my
> own (naive) standpoint I'd say something like this would be better
> (pseudo-code):

The tests should not rely on detecting the running platform version.

> if (WinVer <= XP) {
>     ok((!ret && [...]),
>        "Expected [...]);
> } else {
>     ok((ret && [...]),
>        "Expected [...]);
> }

This gets messy when testing something like urlmon, shlwapi and others
that get updated with IE. You then have to check IE version as well,
or more specifically the DLL version.

This would then make it difficult for the tests to pass on Wine that
is essentially a hybrid of all the current Windows versions.

> Likely a often asked question, but I couldn't find hints about the
> answer yet.



More information about the wine-devel mailing list