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

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2016-07-06 08:57:04 +02:00 committed by Alexandre Julliard
parent af91122caf
commit a1f0d09ab3
2 changed files with 7 additions and 17 deletions

View File

@ -222,11 +222,8 @@ static void test_GetScrollBarInfo(void)
ok( ret, "The GetWindowRect() call should not fail.\n" ); ok( ret, "The GetWindowRect() call should not fail.\n" );
ok( !(sbi.rgstate[0] & (STATE_SYSTEM_INVISIBLE|STATE_SYSTEM_OFFSCREEN)), ok( !(sbi.rgstate[0] & (STATE_SYSTEM_INVISIBLE|STATE_SYSTEM_OFFSCREEN)),
"unexpected rgstate(0x%x)\n", sbi.rgstate[0]); "unexpected rgstate(0x%x)\n", sbi.rgstate[0]);
ok( EqualRect(&rect, &sbi.rcScrollBar), ok(EqualRect(&rect, &sbi.rcScrollBar), "WindowRect %s != rcScrollBar %s\n",
"WindowRect(%d, %d, %d, %d) != rcScrollBar(%d, %d, %d, %d)\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&sbi.rcScrollBar));
rect.top, rect.left, rect.bottom, rect.right,
sbi.rcScrollBar.top, sbi.rcScrollBar.left,
sbi.rcScrollBar.bottom, sbi.rcScrollBar.right );
/* Test windows horizontal and vertical scrollbar to make sure rcScrollBar /* Test windows horizontal and vertical scrollbar to make sure rcScrollBar
* is still returned in screen coordinates by moving the window, and * is still returned in screen coordinates by moving the window, and
@ -243,11 +240,8 @@ static void test_GetScrollBarInfo(void)
OffsetRect(&rect, 5, 5); OffsetRect(&rect, 5, 5);
ret = pGetScrollBarInfo( hMainWnd, OBJID_HSCROLL, &sbi); ret = pGetScrollBarInfo( hMainWnd, OBJID_HSCROLL, &sbi);
ok( ret, "The GetScrollBarInfo() call should not fail.\n" ); ok( ret, "The GetScrollBarInfo() call should not fail.\n" );
ok( EqualRect(&rect, &sbi.rcScrollBar), ok(EqualRect(&rect, &sbi.rcScrollBar), "PreviousRect %s != CurrentRect %s\n",
"PreviousRect(%d, %d, %d, %d) != CurrentRect(%d, %d, %d, %d)\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&sbi.rcScrollBar));
rect.top, rect.left, rect.bottom, rect.right,
sbi.rcScrollBar.top, sbi.rcScrollBar.left,
sbi.rcScrollBar.bottom, sbi.rcScrollBar.right );
sbi.cbSize = sizeof(sbi); sbi.cbSize = sizeof(sbi);
ret = pGetScrollBarInfo( hMainWnd, OBJID_VSCROLL, &sbi); ret = pGetScrollBarInfo( hMainWnd, OBJID_VSCROLL, &sbi);
@ -260,11 +254,8 @@ static void test_GetScrollBarInfo(void)
OffsetRect(&rect, 5, 5); OffsetRect(&rect, 5, 5);
ret = pGetScrollBarInfo( hMainWnd, OBJID_VSCROLL, &sbi); ret = pGetScrollBarInfo( hMainWnd, OBJID_VSCROLL, &sbi);
ok( ret, "The GetScrollBarInfo() call should not fail.\n" ); ok( ret, "The GetScrollBarInfo() call should not fail.\n" );
ok( EqualRect(&rect, &sbi.rcScrollBar), ok(EqualRect(&rect, &sbi.rcScrollBar), "PreviousRect %s != CurrentRect %s\n",
"PreviousRect(%d, %d, %d, %d) != CurrentRect(%d, %d, %d, %d)\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&sbi.rcScrollBar));
rect.top, rect.left, rect.bottom, rect.right,
sbi.rcScrollBar.top, sbi.rcScrollBar.left,
sbi.rcScrollBar.bottom, sbi.rcScrollBar.right );
DestroyWindow(hScroll); DestroyWindow(hScroll);
DestroyWindow(hMainWnd); DestroyWindow(hMainWnd);

View File

@ -2504,8 +2504,7 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2)
ret = SetWindowPos(hwnd_child, hwnd_desktop, 0, 0, 0, 0, 0); ret = SetWindowPos(hwnd_child, hwnd_desktop, 0, 0, 0, 0, 0);
ok(!ret, "Got %d\n", ret); ok(!ret, "Got %d\n", ret);
GetWindowRect(hwnd_child, &rc2); GetWindowRect(hwnd_child, &rc2);
ok(EqualRect(&rc1, &rc2), "(%d, %d, %d, %d) != (%d, %d, %d, %d)\n", ok(EqualRect(&rc1, &rc2), "%s != %s\n", wine_dbgstr_rect(&rc1), wine_dbgstr_rect(&rc2));
rc1.top, rc1.left, rc1.bottom, rc1.right, rc2.top, rc2.left, rc2.bottom, rc2.right);
check_active_state(hwnd2, hwnd2, hwnd2); check_active_state(hwnd2, hwnd2, hwnd2);
ret = SetWindowPos(hwnd_desktop, hwnd_child, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); ret = SetWindowPos(hwnd_desktop, hwnd_child, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);