Michael Stefaniuc : shell32/tests: Use wine_dbgstr_rect() to print RECTs.

Alexandre Julliard julliard at winehq.org
Tue Jun 7 11:08:16 CDT 2016


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Tue Jun  7 09:46:50 2016 +0200

shell32/tests: Use wine_dbgstr_rect() to print RECTs.

Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/tests/appbar.c   |  5 ++---
 dlls/shell32/tests/ebrowser.c | 12 ++++--------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/dlls/shell32/tests/appbar.c b/dlls/shell32/tests/appbar.c
index ca72f3f..dbac4e6 100644
--- a/dlls/shell32/tests/appbar.c
+++ b/dlls/shell32/tests/appbar.c
@@ -196,9 +196,8 @@ static void register_testwindow_class(void)
 
 #define test_window_rects(a, b) \
     ok(!IntersectRect(&rc, &windows[a].allocated_rect, &windows[b].allocated_rect), \
-        "rectangles intersect (%i,%i,%i,%i)/(%i,%i,%i,%i)\n", \
-        windows[a].allocated_rect.left, windows[a].allocated_rect.top, windows[a].allocated_rect.right, windows[a].allocated_rect.bottom, \
-        windows[b].allocated_rect.left, windows[b].allocated_rect.top, windows[b].allocated_rect.right, windows[b].allocated_rect.bottom)
+        "rectangles intersect %s / %s\n", wine_dbgstr_rect(&windows[a].allocated_rect), \
+        wine_dbgstr_rect(&windows[b].allocated_rect))
 
 static void test_setpos(void)
 {
diff --git a/dlls/shell32/tests/ebrowser.c b/dlls/shell32/tests/ebrowser.c
index 57f52c9..56d20dc 100644
--- a/dlls/shell32/tests/ebrowser.c
+++ b/dlls/shell32/tests/ebrowser.c
@@ -818,8 +818,7 @@ static void test_initialization(void)
         ok(hr == S_OK, "Got 0x%08x\n", hr);
 
         GetClientRect(eb_hwnd, &eb_rc);
-        ok(EqualRect(&eb_rc, &exp_rc), "Got client rect (%d, %d)-(%d, %d)\n",
-           eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom);
+        ok(EqualRect(&eb_rc, &exp_rc), "Got client rect %s\n", wine_dbgstr_rect(&eb_rc));
 
         GetWindowRect(eb_hwnd, &eb_rc);
         ok(eb_rc.right - eb_rc.left == 50, "Got window width %d\n", eb_rc.right - eb_rc.left);
@@ -1142,8 +1141,7 @@ static void test_basics(void)
 
         GetClientRect(eb_hwnd, &eb_rc);
         MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2);
-        ok(EqualRect(&eb_rc, &exp_rc), "Got rect (%d, %d) - (%d, %d)\n",
-           eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom);
+        ok(EqualRect(&eb_rc, &exp_rc), "Got rect %s\n", wine_dbgstr_rect(&eb_rc));
 
         /* Try resizing with invalid hdwp */
         rc.bottom = 25;
@@ -1152,16 +1150,14 @@ static void test_basics(void)
         ok(hr == E_FAIL, "Got 0x%08x\n", hr);
         GetClientRect(eb_hwnd, &eb_rc);
         MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2);
-        ok(EqualRect(&eb_rc, &exp_rc), "Got rect (%d, %d) - (%d, %d)\n",
-           eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom);
+        ok(EqualRect(&eb_rc, &exp_rc), "Got rect %s\n", wine_dbgstr_rect(&eb_rc));
 
         hdwp = NULL;
         hr = IExplorerBrowser_SetRect(peb, &hdwp, rc);
         ok(hr == S_OK, "Got 0x%08x\n", hr);
         GetClientRect(eb_hwnd, &eb_rc);
         MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2);
-        ok(EqualRect(&eb_rc, &exp_rc2), "Got rect (%d, %d) - (%d, %d)\n",
-           eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom);
+        ok(EqualRect(&eb_rc, &exp_rc2), "Got rect %s\n", wine_dbgstr_rect(&eb_rc));
 
         IShellBrowser_Release(psb);
     }




More information about the wine-cvs mailing list