I just cant think of any regression test for that patch. It should test if the notification is really being forwarded?
Yes, that's what I mean. You're right, that might be hard, since you have to simulate a mouse click.
Now I don't get it. Looked through listview tests and there are not even one mouse-related test. And my patch could be tested by just sending HDN_ITEMCLICKW to listview control. And capturing the response notifications.
But the code is:
static LRESULT LISTVIEW_HeaderNotification(LISTVIEW_INFO *infoPtr, const NMHEADERW *lpnmh) { ... switch (lpnmh->hdr.code) { ... case HDN_ITEMCLICKW: case HDN_ITEMCLICKA: { ... notify_forward_header(infoPtr, lpnmh); } break;
Is that really should be tested for being executed, by simulating mouse click? Or I just don't understand something?
And does that mean that tests for the second patch are also required?
Required? Not necessarily, but they always help. Obviously correct patches tend to get applied even without regression tests, but even they would benefit from them.
Okay, gonna try.