Commit 96185e23 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

parent 6be3a8fb
......@@ -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)
{
......
......@@ -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");
}
......
......@@ -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));
......
......@@ -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;
......
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment