Module: wine Branch: master Commit: 6eef44ed9ac2dd667f5f2160676faa0df91495ce URL: http://source.winehq.org/git/wine.git/?a=commit;h=6eef44ed9ac2dd667f5f216067...
Author: Michael Stefaniuc mstefani@redhat.de Date: Sat Jul 9 13:50:02 2016 +0200
riched20/tests: Use InflateRect() too when expanding in just one axis.
Signed-off-by: Michael Stefaniuc mstefani@redhat.de Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/riched20/tests/editor.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 76e2c97..218e20e 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -7047,8 +7047,7 @@ static void test_format_rect(void) GetClientRect(hwnd, &clientRect);
expected = clientRect; - expected.left += 1; - expected.right -= 1; + InflateRect(&expected, -1, 0); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(&expected)); @@ -7143,8 +7142,7 @@ static void test_format_rect(void) GetClientRect(hwnd, &clientRect);
expected = clientRect; - expected.left += 1; - expected.right -= 1; + InflateRect(&expected, -1, 0); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(&expected)); @@ -7153,8 +7151,7 @@ static void test_format_rect(void) GetClientRect(hwnd, &clientRect);
expected = clientRect; - expected.left += 1; - expected.right -= 1; + InflateRect(&expected, -1, 0); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(&expected)); @@ -7163,8 +7160,7 @@ static void test_format_rect(void) GetClientRect(hwnd, &clientRect);
expected = clientRect; - expected.left += 1; - expected.right -= 1; + InflateRect(&expected, -1, 0); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(&expected)); @@ -7180,9 +7176,8 @@ static void test_format_rect(void) GetClientRect(hwnd, &clientRect);
expected = clientRect; - expected.left += 1; expected.top += 1; - expected.right -= 1; + InflateRect(&expected, -1, 0); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(&expected)); @@ -7191,8 +7186,7 @@ static void test_format_rect(void) InflateRect(&rc, -5, -5); expected = rc; expected.top -= 1; - expected.left -= 1; - expected.right += 1; + InflateRect(&expected, 1, 0); SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)&rc); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc),