How do I actually write a testcase for a 16-bit API ?
Alex Villacís Lasso
a_villacis at palosanto.com
Mon Jun 8 14:46:45 CDT 2009
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?
--
perl -e '$x=2.3;printf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'
More information about the wine-devel
mailing list