Set/WindowLong problem in user/win test

Francois Gouget fgouget at free.fr
Tue Dec 24 20:23:46 CST 2002


On Tue, 24 Dec 2002, Greg Turner wrote:

> On Tuesday 24 December 2002 03:23 pm, Francois Gouget wrote:
> > This test uses {Get,Set}WindowLongW which of course does not work on
> > Win9x, thus causing the test to fail.
>
> This type of scenario seems to come up a lot lately... perhaps there
> should be a standard way to detect windows 95 (or another platform)
> during a test and skip things as may be appropriate on that platform?
> What do you think?

Tests should *not* check whether they are running on Windows 95, 98 or
other. Just like individual autoconf-like functionality tests are better
than relying on __LINUX__ or other macros, tests should check for the
existence of the functions they want to test.

So the best way to handle A/W issues is to just call the function and
check for failure with the ERROR_CALL_NOT_IMPLEMENTED error. If that
happens then the check(s) should be skipped. Similarly, the way to deal
with APIs that only exist on some platforms is to use LoadLibrary and
GetProcAddress. If the resulting pointer is NULL, then skip the test(s).
It may even make sense to do so in cases where the whole library may be
missing (kind of depends on the impact of missing libraries on automated
runs: does it stop the batch file with a messagebox?).

The real issue is that up until now all tests have been written using
Wine and never tested in Windows. Or if they were actually tested in
Windows they were only tested with one version of Windows and one
quickly finds whether that was Win9x or an NT-something.

But now that it's easy to compile and run these tests on Windows this
problem should pretty much disappear (or rather tests will be fixed as
they come rather than accumulate).

It has been some time since I last updated the zip file that contains
the windows test executables as I tried to focus on actually fixing the
tests. Now that some progress has been made I'll try to put something
together in the comming days.


-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
May your Tongue stick to the Roof of your Mouth with the Force of a Thousand Caramels.




More information about the wine-devel mailing list