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

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Michael Stefaniuc 2016-06-08 12:28:46 +02:00 committed by Alexandre Julliard
parent 6be3a8fb75
commit 96185e23b4
5 changed files with 14 additions and 20 deletions

View File

@ -1350,8 +1350,8 @@ static void test_hds_nosizing(HWND hParent)
ok(nm->lItemlParam == lparam, "Invalid lItemlParam %d vs %ld\n", lparam, nm->lItemlParam); \
ok((nm->rc.top == _top && nm->rc.bottom == _bottom && nm->rc.left == _left && nm->rc.right == _right) || \
broken(draw_stage != CDDS_ITEMPREPAINT), /* comctl32 < 5.80 */ \
"Invalid rect (%d,%d) (%d,%d) vs (%d,%d) (%d,%d)\n", _left, _top, _right, _bottom, \
nm->rc.left, nm->rc.top, nm->rc.right, nm->rc.bottom);
"Invalid rect (%d,%d)-(%d,%d) vs %s\n", _left, _top, _right, _bottom, \
wine_dbgstr_rect(&nm->rc));
static LRESULT customdraw_1(int n, NMCUSTOMDRAW *nm)
{

View File

@ -206,10 +206,8 @@ static void test_redraw(void)
SetRectEmpty(&last_paint_rect);
SendMessageA(hProgressWnd, PBM_SETPOS, 10, 0);
GetClientRect(hProgressWnd, &client_rect);
ok(EqualRect(&last_paint_rect, &client_rect),
"last_paint_rect was { %d, %d, %d, %d } instead of { %d, %d, %d, %d }\n",
last_paint_rect.left, last_paint_rect.top, last_paint_rect.right, last_paint_rect.bottom,
client_rect.left, client_rect.top, client_rect.right, client_rect.bottom);
ok(EqualRect(&last_paint_rect, &client_rect), "last_paint_rect was %s instead of %s\n",
wine_dbgstr_rect(&last_paint_rect), wine_dbgstr_rect(&client_rect));
update_window(hProgressWnd);
ok(!erased, "Progress bar shouldn't have erased the background\n");
@ -218,10 +216,8 @@ static void test_redraw(void)
SetRectEmpty(&last_paint_rect);
SendMessageA(hProgressWnd, PBM_SETPOS, 0, 0);
GetClientRect(hProgressWnd, &client_rect);
ok(EqualRect(&last_paint_rect, &client_rect),
"last_paint_rect was { %d, %d, %d, %d } instead of { %d, %d, %d, %d }\n",
last_paint_rect.left, last_paint_rect.top, last_paint_rect.right, last_paint_rect.bottom,
client_rect.left, client_rect.top, client_rect.right, client_rect.bottom);
ok(EqualRect(&last_paint_rect, &client_rect), "last_paint_rect was %s instead of %s\n",
wine_dbgstr_rect(&last_paint_rect), wine_dbgstr_rect(&client_rect));
update_window(hProgressWnd);
ok(erased, "Progress bar should have erased the background\n");
}

View File

@ -36,14 +36,13 @@ static int system_font_height;
#define check_rect(name, val, exp) ok(EqualRect(&val, &exp), \
"invalid rect (" name ") (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d)\n", \
val.left, val.top, val.right, val.bottom, exp.left, exp.top, exp.right, exp.bottom);
"invalid rect (" name ") %s - expected %s\n", wine_dbgstr_rect(&val), wine_dbgstr_rect(&exp));
#define check_rect_no_top(name, val, exp) { \
ok((val.bottom - val.top == exp.bottom - exp.top) && \
val.left == exp.left && val.right == exp.right, "invalid rect (" name ") (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d), ignoring top\n", \
val.left, val.top, val.right, val.bottom, exp.left, exp.top, exp.right, exp.bottom); \
}
val.left == exp.left && val.right == exp.right, \
"invalid rect (" name ") %s - expected %s, ignoring top\n", \
wine_dbgstr_rect(&val), wine_dbgstr_rect(&exp)); }
#define compare(val, exp, format) ok((val) == (exp), #val " value " format " expected " format "\n", (val), (exp));

View File

@ -30,9 +30,8 @@
RECT exp = {abs(got.left - _left), abs(got.top - _top), \
abs(got.right - _right), abs(got.bottom - _bottom)}; \
ok(exp.left <= 2 && exp.top <= 2 && exp.right <= 2 && exp.bottom <= 2, \
"Expected rect {%d,%d, %d,%d}, got {%d,%d, %d,%d}\n", \
_left, _top, _right, _bottom, \
(got).left, (got).top, (got).right, (got).bottom); } while (0)
"Expected rect (%d,%d)-(%d,%d), got %s\n", _left, _top, _right, _bottom, \
wine_dbgstr_rect(&(got))); } while (0)
static HINSTANCE hinst;
static WNDPROC g_status_wndproc;

View File

@ -109,8 +109,8 @@ static const struct message restore_parent_seq[] = {
#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT))
#define check_rect(name, val, exp, ...) ok(EqualRect(&val, &exp), \
"invalid rect (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d) - (" name ")\n", \
val.left, val.top, val.right, val.bottom, exp.left, exp.top, exp.right, exp.bottom, __VA_ARGS__);
"invalid rect %s - expected %s - (" name ")\n", \
wine_dbgstr_rect(&val), wine_dbgstr_rect(&exp), __VA_ARGS__);
#define compare(val, exp, format) ok((val) == (exp), #val " value " format " expected " format "\n", (val), (exp));