Author: krasnov
Date: 2007-03-07 09:51:22 -0500 (Wed, 07 Mar 2007)
New Revision: 73887

Modified:
   trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
   trunk/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs
   trunk/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
   trunk/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs
   trunk/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs
Log:
* TestBitmap.cs, TestFont.cs, TestIcon.cs, TestRegion.cs: removed tests for 
TARGET_JVM with not supported method calls

Modified: trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog        
2007-03-07 13:45:42 UTC (rev 73886)
+++ trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog        
2007-03-07 14:51:22 UTC (rev 73887)
@@ -1,3 +1,8 @@
+2007-03-07  Vladimir Krasnov  <[EMAIL PROTECTED]>
+
+       * TestBitmap.cs, TestFont.cs, TestIcon.cs, TestRegion.cs: removed tests
+       for TARGET_JVM with not supported method calls
+
 2007-02-28  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * SystemFontsTest.cs: Add more tests cases including disposing the

Modified: trunk/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs
===================================================================
--- trunk/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs    
2007-03-07 13:45:42 UTC (rev 73886)
+++ trunk/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs    
2007-03-07 14:51:22 UTC (rev 73887)
@@ -191,17 +191,26 @@
 #if NET_2_0
                [Test]
                [ExpectedException (typeof (ArgumentException))]
+#if TARGET_JVM
+               [Ignore ("Bitmap.LockBits is not implemented")]
+#endif
                public void LockBits_BitmapData_Null ()
                {
+#if !TARGET_JVM
                        using (Bitmap bmp = new Bitmap (100, 100, 
PixelFormat.Format32bppRgb)) {
                                Rectangle rect = new Rectangle (0, 0, 
bmp.Width, bmp.Height);
                                bmp.LockBits (rect, ImageLockMode.ReadWrite, 
PixelFormat.Format24bppRgb, null);
                        }
+#endif
                }
 
                [Test]
+#if TARGET_JVM
+               [Ignore ("Bitmap.LockBits is not implemented")]
+#endif
                public void LockBits_32_32_BitmapData ()
                {
+#if !TARGET_JVM
                        BitmapData data = new BitmapData ();
                        using (Bitmap bmp = new Bitmap (100, 100, 
PixelFormat.Format32bppRgb)) {
                                Rectangle rect = new Rectangle (0, 0, 
bmp.Width, bmp.Height);
@@ -212,12 +221,16 @@
                                Assert.AreEqual (100, data.Width, "Width");
                                bmp.UnlockBits (data);
                        }
+#endif
                }
 
                [Test]
-               [Category ("NotWorking")]
+#if TARGET_JVM
+               [Ignore ("Bitmap.LockBits is not implemented")]
+#endif
                public void LockBits_32_24_BitmapData ()
                {
+#if !TARGET_JVM
                        BitmapData data = new BitmapData ();
                        using (Bitmap bmp = new Bitmap (100, 100, 
PixelFormat.Format32bppRgb)) {
                                Rectangle rect = new Rectangle (0, 0, 
bmp.Width, bmp.Height);
@@ -228,12 +241,16 @@
                                Assert.AreEqual (100, data.Width, "Width");
                                bmp.UnlockBits (data);
                        }
+#endif
                }
 
                [Test]
-               [Category ("NotWorking")]
+#if TARGET_JVM
+               [Ignore ("Bitmap.LockBits is not implemented")]
+#endif
                public void LockBits_24_24_BitmapData ()
                {
+#if !TARGET_JVM
                        BitmapData data = new BitmapData ();
                        using (Bitmap bmp = new Bitmap (100, 100, 
PixelFormat.Format24bppRgb)) {
                                Rectangle rect = new Rectangle (0, 0, 
bmp.Width, bmp.Height);
@@ -244,11 +261,16 @@
                                Assert.AreEqual (100, data.Width, "Width");
                                bmp.UnlockBits (data);
                        }
+#endif
                }
 
                [Test]
+#if TARGET_JVM
+               [Ignore ("Bitmap.LockBits is not implemented")]
+#endif
                public void LockBits_24_32_BitmapData ()
                {
+#if !TARGET_JVM
                        BitmapData data = new BitmapData ();
                        using (Bitmap bmp = new Bitmap (100, 100, 
PixelFormat.Format24bppRgb)) {
                                Rectangle rect = new Rectangle (0, 0, 
bmp.Width, bmp.Height);
@@ -259,6 +281,7 @@
                                Assert.AreEqual (100, data.Width, "Width");
                                bmp.UnlockBits (data);
                        }
+#endif
                }
 #endif
 
@@ -1226,7 +1249,7 @@
        [Ignore ("Unsafe code is not supported")]
 #endif
        public class BitmapFullTrustTest {
-
+#if !TARGET_JVM
                // BitmapFromHicon## is *almost* the same as 
IconTest.Icon##ToBitmap except
                // for the Flags property
 
@@ -1381,6 +1404,7 @@
                                Assert.IsTrue (image2.RawFormat.Equals 
(ImageFormat.MemoryBmp), "2.RawFormat");
                        }
                }
+#endif
        }
 }
 

Modified: trunk/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
===================================================================
--- trunk/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs      
2007-03-07 13:45:42 UTC (rev 73886)
+++ trunk/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs      
2007-03-07 14:51:22 UTC (rev 73887)
@@ -492,10 +492,12 @@
 #endif
                public void Dispose_ToLogFont ()
                {
+#if !TARGET_JVM
                        Font f = new Font (name, 12.5f);
                        f.Dispose ();
                        LOGFONT lf = new LOGFONT();
                        f.ToLogFont (lf);
+#endif
                }
 
                [Test]
@@ -504,6 +506,7 @@
 #endif
                public void Dispose_ToLogFont_LoopCharSet ()
                {
+#if !TARGET_JVM
                        Font f = new Font (name, 12.5f);
                        f.Dispose ();
                        LOGFONT lf = new LOGFONT ();
@@ -548,6 +551,7 @@
                                        Assert.Fail ("Unexcepted exception {0} 
at iteration {1}", e, i);
                                }
                        }
+#endif
                }
 
                [Test]
@@ -557,9 +561,11 @@
 #endif
                public void Dispose_ToHFont ()
                {
+#if !TARGET_JVM
                        Font f = new Font (name, 12.5f);
                        f.Dispose ();
                        f.ToHfont ();
+#endif
                }
        }
 }

Modified: trunk/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs
===================================================================
--- trunk/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs      
2007-03-07 13:45:42 UTC (rev 73886)
+++ trunk/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs      
2007-03-07 14:51:22 UTC (rev 73887)
@@ -189,7 +189,9 @@
 #endif
                public void Constructor_StreamNull_Size ()
                {
+#if !TARGET_JVM
                        new Icon ((Stream) null, new Size (32, 32));
+#endif
                }
 
                [Test]
@@ -199,7 +201,9 @@
 #endif
                public void Constructor_StringNull_Size ()
                {
+#if !TARGET_JVM
                        new Icon ((string) null, new Size (32, 32));
+#endif
                }
 
                [Test]
@@ -209,7 +213,9 @@
 #endif
                public void Constructor_StringNull_Int_Int ()
                {
+#if !TARGET_JVM
                        new Icon ((string) null, 32, 32);
+#endif
                }
 #endif
 
@@ -443,7 +449,9 @@
 #endif
                public void ExtractAssociatedIcon_Null ()
                {
+#if !TARGET_JVM
                        Icon.ExtractAssociatedIcon (null);
+#endif
                }
 
                [Test]
@@ -453,7 +461,9 @@
 #endif
                public void ExtractAssociatedIcon_Empty ()
                {
+#if !TARGET_JVM
                        Icon.ExtractAssociatedIcon (String.Empty);
+#endif
                }
 
                [Test]
@@ -463,7 +473,9 @@
 #endif
                public void ExtractAssociatedIcon_DoesNotExists ()
                {
+#if !TARGET_JVM
                        Icon.ExtractAssociatedIcon ("does-not-exists.png");
+#endif
                }
 #endif
        }
@@ -473,6 +485,7 @@
        [Ignore ("Unsafe code is not supported")]
 #endif 
        public class IconFullTrustTest {
+#if !TARGET_JVM
 #if NET_2_0
                [Test]
                public void ExtractAssociatedIcon ()
@@ -572,5 +585,6 @@
                                IconTest.SaveAndCompare ("HICON", icon3, false);
                        }
                }
+#endif
        }
 }

Modified: trunk/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs
===================================================================
--- trunk/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs    
2007-03-07 13:45:42 UTC (rev 73886)
+++ trunk/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs    
2007-03-07 14:51:22 UTC (rev 73887)
@@ -1527,11 +1527,11 @@
 
        [TestFixture]
 #if TARGET_JVM
-       [Category ("NotWorking")]
+       [Ignore ("Unsafe code is not supported")]
 #endif
        // the test cases in this fixture aren't restricted wrt running 
unmanaged code
        public class RegionTestUnmanaged {
-
+#if !TARGET_JVM
                private Bitmap bitmap;
                private Graphics graphic;
 
@@ -1635,5 +1635,6 @@
                        r.ReleaseHrgn (ptr);
                }
 #endif
+#endif
        }
 }

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

Reply via email to