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-09-27 09:57:04 +02:00 committed by Alexandre Julliard
parent 40fdd83489
commit 3589cd921d
2 changed files with 9 additions and 16 deletions

View File

@ -33,8 +33,8 @@ static HWND hMainWnd;
#define expect_eq(expr, value, type, fmt); { type val = expr; ok(val == (value), #expr " expected " #fmt " got " #fmt "\n", (value), val); }
#define expect_rect(r, _left, _top, _right, _bottom) ok(r.left == _left && r.top == _top && \
r.bottom == _bottom && r.right == _right, "Invalid rect (%d,%d) (%d,%d) vs (%d,%d) (%d,%d)\n", \
r.left, r.top, r.right, r.bottom, _left, _top, _right, _bottom);
r.bottom == _bottom && r.right == _right, "Invalid rect %s vs (%d,%d)-(%d,%d)\n", \
wine_dbgstr_rect(&r), _left, _top, _right, _bottom);
static HWND build_combo(DWORD style)
{

View File

@ -6463,7 +6463,7 @@ void dump_region(HRGN hrgn)
GetRegionData( hrgn, size, data );
printf("%d rects:", data->rdh.nCount );
for (i = 0, rect = (RECT *)data->Buffer; i < data->rdh.nCount; i++, rect++)
printf( " (%d,%d)-(%d,%d)", rect->left, rect->top, rect->right, rect->bottom );
printf( " %s", wine_dbgstr_rect( rect ));
printf("\n");
HeapFree( GetProcessHeap(), 0, data );
}
@ -12067,9 +12067,8 @@ static void test_ShowWindow(void)
SetLastError(0xdeadbeef);
ret = pGetMonitorInfoA(hmon, &mi);
ok(ret, "GetMonitorInfo error %u\n", GetLastError());
trace("monitor (%d,%d-%d,%d), work (%d,%d-%d,%d)\n",
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
mi.rcWork.left, mi.rcWork.top, mi.rcWork.right, mi.rcWork.bottom);
trace("monitor %s, work %s\n", wine_dbgstr_rect(&mi.rcMonitor),
wine_dbgstr_rect(&mi.rcWork));
work_rc = mi.rcWork;
}
@ -12087,11 +12086,8 @@ static void test_ShowWindow(void)
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
"expected -1,-1 got %d,%d\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
todo_wine_if (work_rc.left || work_rc.top) /* FIXME: remove once Wine is fixed */
ok(EqualRect(&win_rc, &wp.rcNormalPosition),
"expected %d,%d-%d,%d got %d,%d-%d,%d\n",
win_rc.left, win_rc.top, win_rc.right, win_rc.bottom,
wp.rcNormalPosition.left, wp.rcNormalPosition.top,
wp.rcNormalPosition.right, wp.rcNormalPosition.bottom);
ok(EqualRect(&win_rc, &wp.rcNormalPosition), "expected %s got %s\n", wine_dbgstr_rect(&win_rc),
wine_dbgstr_rect(&wp.rcNormalPosition));
for (i = 0; i < sizeof(sw)/sizeof(sw[0]); i++)
{
@ -12143,11 +12139,8 @@ static void test_ShowWindow(void)
"expected %d,%d got %d,%d\n", sw[i].wp_max.x, sw[i].wp_max.y, wp.ptMaxPosition.x, wp.ptMaxPosition.y);
if (0) /* FIXME: Wine behaves completely different here */
ok(EqualRect(&win_rc, &wp.rcNormalPosition),
"expected %d,%d-%d,%d got %d,%d-%d,%d\n",
win_rc.left, win_rc.top, win_rc.right, win_rc.bottom,
wp.rcNormalPosition.left, wp.rcNormalPosition.top,
wp.rcNormalPosition.right, wp.rcNormalPosition.bottom);
ok(EqualRect(&win_rc, &wp.rcNormalPosition), "expected %s got %s\n",
wine_dbgstr_rect(&win_rc), wine_dbgstr_rect(&wp.rcNormalPosition));
}
DestroyWindow(hwnd);
flush_events();