Author: spouliot
Date: 2006-08-08 21:06:30 -0400 (Tue, 08 Aug 2006)
New Revision: 63514

Modified:
   trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
   trunk/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs
Log:
2006-08-08  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * TestRegion.cs: Add test case for excluding a rectangle from an 
        infinite region.



Modified: trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog        
2006-08-09 01:04:17 UTC (rev 63513)
+++ trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog        
2006-08-09 01:06:30 UTC (rev 63514)
@@ -1,3 +1,8 @@
+2006-08-08  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * TestRegion.cs: Add test case for excluding a rectangle from an 
+       infinite region.
+
 2006-08-07  Sebastien Pouliot  <[EMAIL PROTECTED]> 
 
        * GDIPlusTest.cs: Avoid leaking during tests.

Modified: trunk/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs
===================================================================
--- trunk/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs    
2006-08-09 01:04:17 UTC (rev 63513)
+++ trunk/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs    
2006-08-09 01:06:30 UTC (rev 63514)
@@ -1387,6 +1387,20 @@
                        region = new Region (gp);
                        Assert.AreEqual (2, region.GetRegionScans 
(matrix).Length, "2");
                }
+
+               [Test]
+               public void ExcludeFromInfinity ()
+               {
+                       Region r = new Region ();
+                       Assert.IsTrue (r.IsInfinite (graphic), "before");
+                       r.Exclude (new Rectangle (5, 5, 10, 10));
+                       Assert.IsFalse (r.IsInfinite (graphic), "after");
+                       RectangleF bounds = r.GetBounds (graphic);
+                       Assert.AreEqual (-4194304, bounds.X, "X");
+                       Assert.AreEqual (-4194304, bounds.Y, "Y");
+                       Assert.AreEqual (8388608, bounds.Width, "Width");
+                       Assert.AreEqual (8388608, bounds.Height, "Height");
+               }
        }
 
        [TestFixture]

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to