How do I actually write a testcase for a 16-bit API ?

Alex Villací­s Lasso a_villacis at palosanto.com
Mon Jun 8 15:09:18 CDT 2009


Austin English escribió:
> On Mon, Jun 8, 2009 at 2:46 PM, Alex Villací­s
> Lasso<a_villacis at palosanto.com> wrote:
>   
>> I recently filed http://bugs.winehq.org/show_bug.cgi?id=18734 in which I
>> showed that DlgDirList is behaving incorrectly for 16-bit apps. I also
>> included a test program compiled with the Watcom C compiler, as well as a
>> patch. Then a comment appeared saying that it should be possible to create a
>> testcase for this API. So I tried. At first, I thought that since this was a
>> 16-bit API, I should be adding -Wb,--subsystem,win16 to the Makefile.
>> However, this results in the linker complaining that it cannot find
>> WinMain16. So I removed it. Also, I had undefined link-time references to
>> SendMessage16 and similar (because I want everything to go through the
>> 16-bit APIs, else the whole point of the test is lost), so I had to manually
>> add them to the spec files for kernel32 and user32. But after doing this and
>> getting a test program, an attempt to create the window out of the
>> registered class fails and triggers an assertion.
>>
>> I have no examples of previous 16-bit tests (as opposed to 16-bit Wine dlls)
>> to draw upon, so I don't know how to proceed correctly to test a 16-bit API
>> in a way that convinces everyone that the patch is correct. What do you
>> think of this?
>>     
>
> http://www.winehq.org/pipermail/wine-devel/2007-July/058084.html
> http://www.winehq.org/pipermail/wine-devel/2007-July/057917.html
> http://win16test.googlecode.com/
>
>   
I downloaded the tests from  win16test.googlecode.com , but the tarball 
already has a small backlog of patches that have not yet been integrated 
into Wine (checked with patch --dry-run). Why? I could make a patch to 
the testsuite from win16test.googlecode.com, but will this help at all 
on getting the fix integrated into Wine?

-- 
perl -e '$x=2.3;printf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'




More information about the wine-devel mailing list