Hello Dmitry Timoshkov,
I noticed a small issue in your patch:
- ret = DestroyWindow(parent); - ok( ret, "DestroyWindow() error %d\n", GetLastError()); + ok(DestroyWindow(parent), "DestroyWindow() error %d\n", GetLastError());
Please don't merge the call with the ok() statement; the GetLastError() call might be executed before the function to be tested, thus giving the old value. (There has been some cleaning up for this issue recently)
The same goes for a few tests you added:
+ SetLastError(0xdeadbeef); + ok(SetForegroundWindow(popup), "SetForegroundWindow() error %d\n", GetLastError());
+ SetLastError(0xdeadbeef); +todo_wine + ok(SetForegroundWindow(popup), "SetForegroundWindow() error %d\n", GetLastError());
+ SetLastError(0xdeadbeef); + ok(DestroyWindow(parent), "DestroyWindow() error %d\n", GetLastError());
HTH, Joris
Joris Huizer joris_huizer@yahoo.com wrote:
- ret = DestroyWindow(parent); - ok( ret, "DestroyWindow() error %d\n", GetLastError()); + ok(DestroyWindow(parent), "DestroyWindow() error %d\n", GetLastError());
Please don't merge the call with the ok() statement; the GetLastError() call might be executed before the function to be tested, thus giving the old value. (There has been some cleaning up for this issue recently)
The same goes for a few tests you added:
That's no the point of the test, and actually ok() calls are just a sinity check in this case, GetLastError() results are not interesting, since the previous calls should never fail. There are many other places which do that already, feel free to send patches to correct them.