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

Alexandre Julliard julliard at winehq.org
Thu Nov 13 08:51:35 CST 2008


Module: wine
Branch: master
Commit: a4b62b17814ea43d6b5a9ad659bee29ebc6fa08f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a4b62b17814ea43d6b5a9ad659bee29ebc6fa08f

Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date:   Wed Nov 12 08:40:27 2008 -0700

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

---

 dlls/user32/tests/win.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 84a2780..827d0e3 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -2258,13 +2258,15 @@ todo_wine
     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)
-	ok(foreground == GetForegroundWindow(), "GetForegroundWindow() = %p\n", GetForegroundWindow());
-    ok(focus == GetFocus(), "GetFocus() = %p\n", GetFocus());
-    ok(capture == GetCapture(), "GetCapture() = %p\n", GetCapture());
+        ok_(file, line)(foreground == GetForegroundWindow(), "GetForegroundWindow() = %p\n", GetForegroundWindow());
+    ok_(file, line)(focus == GetFocus(), "GetFocus() = %p\n", GetFocus());
+    ok_(file, line)(capture == GetCapture(), "GetCapture() = %p\n", GetCapture());
 }
 
 static void test_SetActiveWindow(HWND hwnd)




More information about the wine-cvs mailing list