Commit 16c20d3c authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdi32/tests: Test the return value of GetClipBox before trying to access the rect.

parent 625ec9f0
...@@ -1953,8 +1953,11 @@ static void test_emf_clipping(void) ...@@ -1953,8 +1953,11 @@ static void test_emf_clipping(void)
SetRect(&rc_sclip, 100, 100, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); SetRect(&rc_sclip, 100, 100, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
hrgn = CreateRectRgn(rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom); hrgn = CreateRectRgn(rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom);
SelectClipRgn(hdc, hrgn); SelectClipRgn(hdc, hrgn);
GetClipBox(hdc, &rc_res); ret = GetClipBox(hdc, &rc_res);
todo_wine ok(EqualRect(&rc_res, &rc_sclip), todo_wine
ok(ret == SIMPLEREGION, "got %d\n", ret);
if(ret == SIMPLEREGION)
ok(EqualRect(&rc_res, &rc_sclip),
"expected rc_res (%d, %d) - (%d, %d), got (%d, %d) - (%d, %d)\n", "expected rc_res (%d, %d) - (%d, %d), got (%d, %d) - (%d, %d)\n",
rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom, rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom,
rc_res.left, rc_res.top, rc_res.right, rc_res.bottom); rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
......
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