2006-08-07 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Mon, 7 Aug 2006 17:33:21 +0000 (17:33 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Mon, 7 Aug 2006 17:33:21 +0000 (17:33 -0000)
* GDIPlusTest.cs: Avoid leaking during tests.

svn path=/trunk/mcs/; revision=63442

mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
mcs/class/System.Drawing/Test/System.Drawing/GDIPlusTest.cs

index 674ec3f634c47a8d707650bd39629b59e4ccacd4..45329e5ebc6978b7057dc9b6acdac76a040c0715 100644 (file)
@@ -1,3 +1,7 @@
+2006-08-07  Sebastien Pouliot  <sebastien@ximian.com> 
+
+       * GDIPlusTest.cs: Avoid leaking during tests.
+
 2006-08-05  Sebastien Pouliot  <sebastien@ximian.com> 
 
        * GDIPlusTest.cs: Some test cases for Graphics and Font related GDI+ 
index afa3222370731de1b293be1ac74206c6e8e48f85..d53813b3de0b2c908b12b749d296a6a68f1f0d7c 100644 (file)
@@ -246,6 +246,9 @@ namespace MonoTests.System.Drawing {
                [DllImport ("gdiplus.dll")]
                internal static extern Status GdipGetPathTypes (IntPtr path, [Out] byte[] types, int count);
 
+               [DllImport ("gdiplus.dll")]                
+               internal static extern Status GdipDeletePath (IntPtr path);
+
                [Test]
                public void GetPointCount_Zero ()
                {
@@ -264,6 +267,9 @@ namespace MonoTests.System.Drawing {
                        byte[] types = new byte[count];
                        Assert.AreEqual (Status.InvalidParameter, GdipGetPathTypes (path, types, count), "GdipGetPathTypes");
                        // can't get the types if the count is zero!
+
+                       Assert.AreEqual (Status.Ok, GdipDeletePath (path), "GdipDeletePath");
+                       Assert.AreEqual (Status.InvalidParameter, GdipDeletePath (IntPtr.Zero), "GdipDeletePath-null");
                }
 
                // Image