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:
parent
40fdd83489
commit
3589cd921d
|
@ -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_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 && \
|
#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.bottom == _bottom && r.right == _right, "Invalid rect %s vs (%d,%d)-(%d,%d)\n", \
|
||||||
r.left, r.top, r.right, r.bottom, _left, _top, _right, _bottom);
|
wine_dbgstr_rect(&r), _left, _top, _right, _bottom);
|
||||||
|
|
||||||
static HWND build_combo(DWORD style)
|
static HWND build_combo(DWORD style)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6463,7 +6463,7 @@ void dump_region(HRGN hrgn)
|
||||||
GetRegionData( hrgn, size, data );
|
GetRegionData( hrgn, size, data );
|
||||||
printf("%d rects:", data->rdh.nCount );
|
printf("%d rects:", data->rdh.nCount );
|
||||||
for (i = 0, rect = (RECT *)data->Buffer; i < data->rdh.nCount; i++, rect++)
|
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");
|
printf("\n");
|
||||||
HeapFree( GetProcessHeap(), 0, data );
|
HeapFree( GetProcessHeap(), 0, data );
|
||||||
}
|
}
|
||||||
|
@ -12067,9 +12067,8 @@ static void test_ShowWindow(void)
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = pGetMonitorInfoA(hmon, &mi);
|
ret = pGetMonitorInfoA(hmon, &mi);
|
||||||
ok(ret, "GetMonitorInfo error %u\n", GetLastError());
|
ok(ret, "GetMonitorInfo error %u\n", GetLastError());
|
||||||
trace("monitor (%d,%d-%d,%d), work (%d,%d-%d,%d)\n",
|
trace("monitor %s, work %s\n", wine_dbgstr_rect(&mi.rcMonitor),
|
||||||
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
|
wine_dbgstr_rect(&mi.rcWork));
|
||||||
mi.rcWork.left, mi.rcWork.top, mi.rcWork.right, mi.rcWork.bottom);
|
|
||||||
work_rc = mi.rcWork;
|
work_rc = mi.rcWork;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12087,11 +12086,8 @@ static void test_ShowWindow(void)
|
||||||
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
|
ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1,
|
||||||
"expected -1,-1 got %d,%d\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y);
|
"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 */
|
todo_wine_if (work_rc.left || work_rc.top) /* FIXME: remove once Wine is fixed */
|
||||||
ok(EqualRect(&win_rc, &wp.rcNormalPosition),
|
ok(EqualRect(&win_rc, &wp.rcNormalPosition), "expected %s got %s\n", wine_dbgstr_rect(&win_rc),
|
||||||
"expected %d,%d-%d,%d got %d,%d-%d,%d\n",
|
wine_dbgstr_rect(&wp.rcNormalPosition));
|
||||||
win_rc.left, win_rc.top, win_rc.right, win_rc.bottom,
|
|
||||||
wp.rcNormalPosition.left, wp.rcNormalPosition.top,
|
|
||||||
wp.rcNormalPosition.right, wp.rcNormalPosition.bottom);
|
|
||||||
|
|
||||||
for (i = 0; i < sizeof(sw)/sizeof(sw[0]); i++)
|
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);
|
"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 */
|
if (0) /* FIXME: Wine behaves completely different here */
|
||||||
ok(EqualRect(&win_rc, &wp.rcNormalPosition),
|
ok(EqualRect(&win_rc, &wp.rcNormalPosition), "expected %s got %s\n",
|
||||||
"expected %d,%d-%d,%d got %d,%d-%d,%d\n",
|
wine_dbgstr_rect(&win_rc), wine_dbgstr_rect(&wp.rcNormalPosition));
|
||||||
win_rc.left, win_rc.top, win_rc.right, win_rc.bottom,
|
|
||||||
wp.rcNormalPosition.left, wp.rcNormalPosition.top,
|
|
||||||
wp.rcNormalPosition.right, wp.rcNormalPosition.bottom);
|
|
||||||
}
|
}
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
flush_events();
|
flush_events();
|
||||||
|
|
Loading…
Reference in New Issue