From ec8a1271dce8498e4beef676f1e016462d4da9f7 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Mon, 7 Aug 2006 17:33:21 +0000 Subject: [PATCH] 2006-08-07 Sebastien Pouliot * GDIPlusTest.cs: Avoid leaking during tests. svn path=/trunk/mcs/; revision=63442 --- mcs/class/System.Drawing/Test/System.Drawing/ChangeLog | 4 ++++ mcs/class/System.Drawing/Test/System.Drawing/GDIPlusTest.cs | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog b/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog index 674ec3f634c..45329e5ebc6 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog +++ b/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog @@ -1,3 +1,7 @@ +2006-08-07 Sebastien Pouliot + + * GDIPlusTest.cs: Avoid leaking during tests. + 2006-08-05 Sebastien Pouliot * GDIPlusTest.cs: Some test cases for Graphics and Font related GDI+ diff --git a/mcs/class/System.Drawing/Test/System.Drawing/GDIPlusTest.cs b/mcs/class/System.Drawing/Test/System.Drawing/GDIPlusTest.cs index afa32223707..d53813b3de0 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/GDIPlusTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/GDIPlusTest.cs @@ -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 -- 2.25.1