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?
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