Huw Davies : gdi32/tests: Test the return value of GetClipBox before trying to access the rect.
Alexandre Julliard
julliard at winehq.org
Fri Nov 13 09:37:07 CST 2009
Module: wine
Branch: master
Commit: 16c20d3c7374335f5e34093a8727ec6f3a802ace
URL: http://source.winehq.org/git/wine.git/?a=commit;h=16c20d3c7374335f5e34093a8727ec6f3a802ace
Author: Huw Davies <huw at codeweavers.com>
Date: Fri Nov 13 12:01:23 2009 +0000
gdi32/tests: Test the return value of GetClipBox before trying to access the rect.
---
dlls/gdi32/tests/metafile.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
index a186608..b559901 100644
--- a/dlls/gdi32/tests/metafile.c
+++ b/dlls/gdi32/tests/metafile.c
@@ -1953,8 +1953,11 @@ static void test_emf_clipping(void)
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);
SelectClipRgn(hdc, hrgn);
- GetClipBox(hdc, &rc_res);
- todo_wine ok(EqualRect(&rc_res, &rc_sclip),
+ ret = GetClipBox(hdc, &rc_res);
+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",
rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom,
rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
More information about the wine-cvs
mailing list