Alexandre Julliard wrote:
Paul Vriens paul.vriens.wine@gmail.com writes:
Hans Leidekker wrote:
On Wednesday 01 July 2009 12:12:47 pm Paul Vriens wrote:
Would using IsValidCodePage() be helpful here?
Yep, something like:
hr = IMultiLanguage2_IsCodePageInstallable(ml2, i); if (i == 29001 || /* win2k3 */ i == 50930 || i == 50931 || i == 50933 || i == 50935
|| i == 50937 || i == 50939 /* vista */) { ok(hr == S_FALSE || hr == S_OK || broken(!IsValidCodePage(i)), "%u: expected S_FALSE or S_OK, got 0x%08x\n", i, hr);
IsValidCodePage might be helpful yes, although marking it broken is a bit too strong I think, it's just a difference in codepage databases.
-Hans
Yes, broken() seems strong but it's actually meant as behaviour_we_dont_want_to_replicate() in this case.
I'm not convinced we don't want to replicate it. Using something like IsValidCodePage in the implementation would be better than hardcoding the list.
I was actually pointing only to the failures in the test. These failures (varying number of failures per platform) happen on XP and below.
Unfortunately there isn't a 1 to 1 mapping between !IsValidCodePage() and E_INVALIDARG. (The exceptions are mentioned already in the test).
The ideal tests would then probably be something like:
ret = IsValidCodePage(i); hr = IMultiLanguage2_IsCodePageInstallable(ml2, i); ok((ret && (hr == S_OK)) || (!ret && (hr == E_INVALIDARG)), "Something wrong")
There are however numerous errors when running this on all platforms.