2008/7/23 Markus Hitter mah@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.
From http://www.winehq.org/site/docs/winedev-guide/testing-platforms:
"If an API is only present on some Windows platforms, then use LoadLibrary and GetProcAddress to check if it is implemented and invoke it. Remember, tests must run on all Windows platforms. Similarly, conformance tests should nor try to correlate the Windows version returned by GetVersion with whether given APIs are implemented or not. Again, the goal of Wine is to run Windows applications (which do not do such checks), and not be a clone of a specific Windows version. "
- Reece