W->A calls

Joris Huizer jorishuizer at planet.nl
Fri Sep 3 03:15:07 CDT 2004


James Hawkins wrote:
>>However, I don't know how to make simple tests.. as I'd really need to
>>test wether the code I write works, and works properly :p
> 
> 
> The best way to test the functionality of a certain api function
> against windows is to read the msdn docs on that function.  There are
> certain easy things to check like the error codes that are either
> returned or set using SetLastError (and are read using GetLastError.) 
> The docs will also tell you pretty precisely what the function should
> and should not do, and you write the tests to make sure that the
> functions do what they're supposed to do.  A lot of the times, msdn
> docs will have example code and will usually show the expected output
> (when necessary.)  You can test against this output to see if the
> results are the same.  Some api's cant really be tested with wine's
> testing system because the effects may be visual etc, so the way to
> test that is to run the program and see if the visual change coincides
> with the way the program runs in windows.  If you dont have a windows
> install to run the program from, I'm sure that someone on wine-devel
> can run the program for you.
> 

That wasn't really my question;
I'd want to do W->A cleanup work; but I never did so before; I am not 
used to work on a big project; So I better know what I'm doing before 
breaking code instead of fixing it;

So -- is there a unit testing or so or do all people just make a bunch 
of extra files to make the function calls and make what they need compile?
If I change, say , dlls/winmm/mci.c: winmm: mciSendStringW , how will I 
be able to verify the change didn't change the behavior of the function? 
(rather than just trusting I am sort-of sure my hacks are working??)

(So I'm talking about developers testing functions, not really about 
tests to run for windows or so)
So, how do you handle that?

thanks,

Joris



More information about the wine-devel mailing list