prevent peekmessage from crashing when msg == NULL
juan_lang at yahoo.com
Thu Nov 18 12:34:36 CST 2004
--- Eric Frias <efrias at syncad.com> wrote:
> I must admit I've never looked at the test suite. What kinds of things
> should have tests? Are they intended to verify implementations of the
> undocumented or poorly-documented parts of the windows API?
That, as well as correct and documented behavior. The more the merrier.
> I guess by that standard, the other patch I posted which fixed the
> behavior of two consecutive calls to OpenClipboard() would be another
> good candidate for a test case.
I think so.
The test code is pretty straightforward: you use the ok macro to check a
condition. Something like, ok(GetLastError() == ERROR_NO_MORE_DATA,
"Expected ERROR_NO_MORE_DATA, got %d\n", GetLastError());
If you write a test that fails under wine, and you don't have a chance to
fix it, you can still submit the test with a todo_wine, like:
You can run the tests with make test. I try to do a make test before
sending in a patch to make sure I didn't regress anything (fortunately
Alexandre seems to as well).
In some areas, particularly new areas of code, having no tests is
acceptable. In existing code, having a test case will go a long way to
getting a patch accepted.
> It might take me a while to get around to it, right now I'm under
> pressure to get winelib working on HPUX.
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
More information about the wine-devel