user32/tests: Print line numbers of callers in check_wnd_state to help debugging.

This commit is contained in:
Vitaliy Margolen 2008-11-12 08:40:27 -07:00 committed by Alexandre Julliard
parent 5922150e2f
commit a4b62b1781
1 changed files with 7 additions and 5 deletions

View File

@ -2258,13 +2258,15 @@ todo_wine
DestroyWindow( child ); DestroyWindow( child );
} }
static void check_wnd_state(HWND active, HWND foreground, HWND focus, HWND capture) #define check_wnd_state(a,b,c,d) check_wnd_state_(__FILE__,__LINE__,a,b,c,d)
static void check_wnd_state_(const char *file, int line,
HWND active, HWND foreground, HWND focus, HWND capture)
{ {
ok(active == GetActiveWindow(), "GetActiveWindow() = %p\n", GetActiveWindow()); ok_(file, line)(active == GetActiveWindow(), "GetActiveWindow() = %p\n", GetActiveWindow());
if (foreground) if (foreground)
ok(foreground == GetForegroundWindow(), "GetForegroundWindow() = %p\n", GetForegroundWindow()); ok_(file, line)(foreground == GetForegroundWindow(), "GetForegroundWindow() = %p\n", GetForegroundWindow());
ok(focus == GetFocus(), "GetFocus() = %p\n", GetFocus()); ok_(file, line)(focus == GetFocus(), "GetFocus() = %p\n", GetFocus());
ok(capture == GetCapture(), "GetCapture() = %p\n", GetCapture()); ok_(file, line)(capture == GetCapture(), "GetCapture() = %p\n", GetCapture());
} }
static void test_SetActiveWindow(HWND hwnd) static void test_SetActiveWindow(HWND hwnd)