user32: Add a test for ToUnicode - Win9x behaviour
Paul Vriens
paul.vriens.wine at gmail.com
Wed Jul 30 04:31:57 CDT 2008
Andre Wisplinghoff wrote:
> Hello,
>
> I think my patch [1] shouldn't be applied, because I didn't think about
> older versions of Windows. According to MSDN, ToUnicode has NT 3.1 as a
> minimum, meaning we should test if the function is unimplemented and
> skip the test in this case (Win9x Systems). Unfortunately I don't have a
> Win9x system ready for testing at the moment. Is adding the following
> after the first call to ToUnicode enough to handle this issue?
>
> if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
> {
> trace("Skipping the ToUnicode test on a Win9x platform\n");
> return;
> }
>
> Best Regards
> -- Andre Wisplinghoff
>
> [1] http://www.winehq.org/pipermail/wine-patches/2008-July/058745.html
>
>
>
I ran your tests on win95 and win98 and both have at least the function
available but as you've stated it's not implemented.
Current approach for dealing with this is for example:
SetLastError(0xdeadbeef);
ret = ToUnicode(...);
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
skip("ToUnicode is not implemented\n");
return;
}
or something along those lines. Notice the handy skip() function we have for
skipping tests. This will make sure that skipped tests will be marked as such in
the test reports.
--
Cheers,
Paul.
More information about the wine-devel
mailing list