Alexandre Julliard : gdi32/tests: Fix a test that can fail on multi-monitor setups.

Alexandre Julliard julliard at winehq.org
Tue Apr 17 13:31:49 CDT 2012


Module: wine
Branch: master
Commit: 8b7760292d00e98b4c579d632d8170cb2f89b4c1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8b7760292d00e98b4c579d632d8170cb2f89b4c1

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Apr 17 14:56:10 2012 +0200

gdi32/tests: Fix a test that can fail on multi-monitor setups.

---

 dlls/gdi32/tests/dc.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c
index c935c36..91e06c4 100644
--- a/dlls/gdi32/tests/dc.c
+++ b/dlls/gdi32/tests/dc.c
@@ -403,11 +403,15 @@ static void test_device_caps( HDC hdc, HDC ref_dc, const char *descr )
     }
 
     type = GetClipBox( ref_dc, &rect );
-    ok( type == SIMPLEREGION, "GetClipBox returned %d on %s\n", type, descr );
-    ok( rect.left == 0 && rect.top == 0 &&
-        rect.right == GetDeviceCaps( ref_dc, DESKTOPHORZRES ) &&
-        rect.bottom == GetDeviceCaps( ref_dc, DESKTOPVERTRES ),
-        "GetClipBox returned %d,%d,%d,%d on %s\n", rect.left, rect.top, rect.right, rect.bottom, descr );
+    if (type != COMPLEXREGION)  /* region can be complex on multi-monitor setups */
+    {
+        ok( type == SIMPLEREGION, "GetClipBox returned %d on %s\n", type, descr );
+        ok( rect.left == 0 && rect.top == 0 &&
+            rect.right == GetDeviceCaps( ref_dc, DESKTOPHORZRES ) &&
+            rect.bottom == GetDeviceCaps( ref_dc, DESKTOPVERTRES ),
+            "GetClipBox returned %d,%d,%d,%d on %s\n",
+            rect.left, rect.top, rect.right, rect.bottom, descr );
+    }
 
     SetBoundsRect( ref_dc, NULL, DCB_RESET | DCB_ACCUMULATE );
     SetMapMode( ref_dc, MM_TEXT );




More information about the wine-cvs mailing list