Excluded the tests, which are not working under Grasshopper (all changes under 'TARGE...
authorIlya Kharmatsky <ilya@mono-cvs.ximian.com>
Wed, 31 Jan 2007 15:20:18 +0000 (15:20 -0000)
committerIlya Kharmatsky <ilya@mono-cvs.ximian.com>
Wed, 31 Jan 2007 15:20:18 +0000 (15:20 -0000)
svn path=/trunk/mcs/; revision=72030

12 files changed:
mcs/class/System/Test/System.Net/ChangeLog
mcs/class/System/Test/System.Net/FileWebRequestTest.cs
mcs/class/System/Test/System.Net/FileWebResponseTest.cs
mcs/class/System/Test/System.Net/HttpListener2Test.cs
mcs/class/System/Test/System.Net/HttpListenerBasicIdentityTest.cs
mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs
mcs/class/System/Test/System.Net/HttpListenerTest.cs
mcs/class/System/Test/System.Net/IPAddressTest.cs
mcs/class/System/Test/System.Net/ServicePointManagerTest.cs
mcs/class/System/Test/System.Net/ServicePointTest.cs
mcs/class/System/Test/System.Net/WebHeaderCollectionTest.cs
mcs/class/System/Test/System.Net/WebProxyTest.cs

index 780f2b2d9ba345339bbe86afa972634afe092742..3658e46952d3f44c169dcd76fc09f2343ae2c94d 100644 (file)
@@ -1,3 +1,17 @@
+2007-01-31  Ilya Kharmatsky  <ilyak -at- mainsoft.com>
+
+       * IPAddressTest.cs, WebProxyTest.cs, WebHeaderCollectionTest.cs,
+         ServicePointManagerTest.cs, ServicePointTest.cs:
+         Excluded not working in Grasshopper tests, under 'TARGET_JVM'
+         directive
+       * HttpListenerPrefixCollectionTest.cs, HttpListenerTest.cs,
+         HttpListenerBasicIdentityTest.cs, HttpListener2Test.cs:
+         Excluded entire test fixture, since HttpListener still not 
+         implemented in Grasshopper.
+       * FileWebRequestTest.cs, FileWebResponseTest.cs:
+         Excluded not working in Grasshopper tests and provided different
+         implementation of helper methods - under 'TARGET_JVM'
+
 2007-01-30  Atsushi Enomoto  <atsushi@ximian.com>
 
        * HttpWebRequestTest.cs : use correct attribute.
index 21c2c4d28e59c8afbfc300c0ad031d8585271fd5..ff231e18f280f42ccd5ab6d22ded7ac593dc6fe9 100644 (file)
@@ -21,6 +21,11 @@ using System.Security.Permissions;
 
 using NUnit.Framework;
 
+#if TARGET_JVM
+using System.Globalization;
+using System.Reflection;
+#endif
+
 namespace MonoTests.System.Net
 {
        [TestFixture]
@@ -58,6 +63,9 @@ namespace MonoTests.System.Net
                }
 
                [Test]
+#if TARGET_JVM
+               [Ignore ("Bug in resource releasing - cannot delete file")]
+#endif
                public void Async ()
                {
                        WebResponse res = null;
@@ -184,10 +192,6 @@ namespace MonoTests.System.Net
                }
 
                [Test]
-#if TARGET_JVM
-       [Ignore ("TD BUG ID: 7205")]
-       [Category ("NotWorking")]
-#endif 
                public void Sync ()
                {
                        WebResponse res = null;
@@ -676,6 +680,10 @@ namespace MonoTests.System.Net
                }
 
                [Test]
+#if TARGET_JVM
+               //FIXME: include Java serialization compliant tests
+               [Ignore ("The MS compliant binary serialization is not supported")]
+#endif                 
                public void GetObjectData ()
                {
                        FileWebRequest fwr = (FileWebRequest) WebRequest.Create ("file:///test.txt");
@@ -779,6 +787,9 @@ namespace MonoTests.System.Net
                }
 
                [Test]
+#if TARGET_JVM
+               [Ignore ("The MS compliant binary serialization is not supported")]
+#endif         
                public void Deserialize ()
                {
                        MemoryStream ms = new MemoryStream ();
@@ -831,6 +842,23 @@ namespace MonoTests.System.Net
                        return new Uri ("file:///" + tempFile);
                }
 
+#if TARGET_JVM
+        
+        private bool RunningOnUnix {
+                       get {
+                Type t = Type.GetType("java.lang.System");
+                MethodInfo mi = t.GetMethod("getProperty", new Type[] { typeof(string) });
+                string osName = (string) mi.Invoke(null, new object[] { "os.name" });
+                               
+                               if(osName == null) {
+                                       return false;
+                               }
+                               
+                               return !osName.StartsWith("win", true, CultureInfo.InvariantCulture);
+                       }
+               }
+                               
+#else
                private bool RunningOnUnix {
                        get {
                                // check for Unix platforms - see FAQ for more details
@@ -839,6 +867,7 @@ namespace MonoTests.System.Net
                                return ((platform == 4) || (platform == 128));
                        }
                }
+#endif         
 
                private static readonly byte [] _serialized = new byte [] {
 #if NET_2_0
index 4dc99df157b3769dd982ff2f7697f1ba08cea6b2..2a6b7379cb2e8b6397ac42a214cb5955d98ebd0e 100644 (file)
@@ -13,6 +13,12 @@ using System.Net;
 
 using NUnit.Framework;
 
+#if TARGET_JVM
+using System.Globalization;
+using System.Reflection;
+#endif
+
+
 namespace MonoTests.System.Net
 {
        [TestFixture]
@@ -219,7 +225,23 @@ namespace MonoTests.System.Net
                        }
                        return new Uri ("file:///" + tempFile);
                }
-
+#if TARGET_JVM
+        
+        private bool RunningOnUnix {
+                       get {
+                               Type t = Type.GetType("java.lang.System");
+                               MethodInfo mi = t.GetMethod("getProperty", new Type[] { typeof(string) });
+                               string osName = (string) mi.Invoke(null, new object[] { "os.name" });
+                               
+                               if(osName == null) {
+                                       return false;
+                               }
+                               
+                               return !osName.StartsWith("win", true, CultureInfo.InvariantCulture);
+                       }
+               }
+                               
+#else
                private bool RunningOnUnix {
                        get {
                                // check for Unix platforms - see FAQ for more details
@@ -228,5 +250,6 @@ namespace MonoTests.System.Net
                                return ((platform == 4) || (platform == 128));
                        }
                }
+#endif         
        }
 }
index 523d6db600a398b650d39489bd392427db9b08ab..9678e6ba7ed5c525d787d8bf1cb05b335551799f 100644 (file)
@@ -41,6 +41,9 @@ using NUnit.Framework;
 // ***************************************************************************************
 namespace MonoTests.System.Net {
        [TestFixture]
+#if TARGET_JVM 
+       [Ignore ("The class HttpListener is not supported")]
+#endif
        public class HttpListener2Test {
                public class MyNetworkStream : NetworkStream {
                        public MyNetworkStream (Socket sock) : base (sock, true)
index d1de09391e8f097b76394663323aff58e1107f04..82f3c046825d2586c01b5a7501bcd2b296daaca4 100644 (file)
@@ -33,6 +33,9 @@ using NUnit.Framework;
 
 namespace MonoTests.System.Net {
        [TestFixture]
+#if TARGET_JVM
+       [Ignore ("The class HttpListenerBasicIdentity - is not supported")]
+#endif
        public class HttpListenerBasicIdentityTest {
                [Test]
                [ExpectedException (typeof (ArgumentNullException))]
index b099f07d75ebc9f2aece60592551b7ae33d8e77f..8448d566dd920289e931493770142595bdd70edb 100644 (file)
@@ -34,6 +34,9 @@ using HLPC=System.Net.HttpListenerPrefixCollection;
 
 namespace MonoTests.System.Net {
        [TestFixture]
+#if TARGET_JVM
+       [Ignore ("The class System.Net.HttpListenerPrefixCollection - is not supported")]
+#endif
        public class HttpListenerPrefixCollectionTest {
                // NL -> Not listening -> tests when listener.IsListening == false
                [Test]
index f541d01eead6e8df72997d06b1364a71a5297308..104e4ccefc71a1303581c14ed2eb63d7f61f50ea 100644 (file)
@@ -34,6 +34,9 @@ using NUnit.Framework;
 
 namespace MonoTests.System.Net {
        [TestFixture]
+#if TARGET_JVM
+       [Ignore ("The class HttpListener is not implemented")]
+#endif
        public class HttpListenerTest {
                [Test]
                public void DefaultProperties ()
index d11e23d3aa14f347ba68417d87a79359bf1b3373..05ff22bfba36c74546ab80a9bd112b6e6ac30d50 100644 (file)
@@ -412,6 +412,9 @@ public class IPAddressTest
        }
 
        [Test]
+#if TARGET_JVM
+       [Ignore ("TD BUG ID: 7213")]
+#endif
        public void Constructor1_Address_4Byte ()
        {
                byte [] bytes = new byte [4] { 192, 202, 112, 37 };
index 58d12cc6d22c1fb1cba73e68ec48a0b74c4f2f26..a866fb5d41b5809de2aff7ee415e09886f68995d 100644 (file)
@@ -44,6 +44,9 @@ public class ServicePointManagerTest : Assertion
 \r
         [Test, ExpectedException (typeof (InvalidOperationException))]\r
                [Category ("InetAccess")]\r
+#if TARGET_JVM\r
+       [Ignore ("Unsupported property - ServicePointManager.MaxServicePoints")]\r
+#endif\r
         public void MaxServicePointManagers ()\r
         {\r
                AssertEquals ("#1", 0, ServicePointManager.MaxServicePoints);\r
index 16666cc6d8581632d9c0b2908be682481e1fb584..6779bea7a5c3589d2119daae6f78b868a934870c 100644 (file)
@@ -35,6 +35,9 @@ public class ServicePointTest
 \r
         [Test]\r
                [Category ("InetAccess")]\r
+#if TARGET_JVM\r
+       [Ignore ("Unsupported - ServicePointManager.FindServicePoint")]\r
+#endif\r
         public void All ()\r
         {\r
                ServicePoint p = ServicePointManager.FindServicePoint (new Uri ("mailto:xx@yyy.com"));\r
@@ -116,6 +119,9 @@ public class ServicePointTest
 \r
        [Test]\r
        [Category ("InetAccess")]\r
+#if TARGET_JVM\r
+       [Ignore ("The System.Net.ServicePointManager.FindServicePoint(Uri) is not supported")]\r
+#endif \r
        public void ConnectionLimit ()\r
        {               \r
                // the default is already 2, just in case it isn't..\r
index 0e47acf0a5115ac4a9ea23261343ccb182a65012..8d335903796e9725dfb555cf8d014169a5296086 100644 (file)
@@ -219,6 +219,11 @@ namespace MonoTests.System.Net
                }
 
                [Test]
+#if TARGET_JVM
+               //FIXME: include Java serialization compliant tests - the order of object
+               // in SerializationInfo should stay same to MS format...
+               [Ignore ("The MS compliant binary serialization is not supported")]
+#endif                 
                public void GetObjectData ()
                {
                        SerializationInfo si = new SerializationInfo (typeof (WebHeaderCollection),
@@ -279,6 +284,10 @@ namespace MonoTests.System.Net
                }
 
                [Test]
+#if TARGET_JVM
+               //FIXME: include Java serialization compliant tests
+               [Ignore ("The MS compliant binary serialization is not supported")]
+#endif         
                public void Serialize ()
                {
                        WebHeaderCollection headers = new WebHeaderCollection ();
@@ -299,6 +308,10 @@ namespace MonoTests.System.Net
                }
 
                [Test]
+#if TARGET_JVM
+               //FIXME: include Java serialization compliant tests
+               [Ignore ("The MS compliant binary serialization format is not supported")]
+#endif                         
                public void Deserialize ()
                {
                        MemoryStream ms = new MemoryStream ();
index 664892a4f6dafab142148718e167ecddcfa89aeb..750b45992ff0774621eaf429c407a63e7c4ca233 100644 (file)
@@ -173,6 +173,9 @@ namespace MonoTests.System.Net
                }
 
                [Test]
+#if TARGET_JVM
+               [Ignore ("TD BUG ID: 7213")]
+#endif         
                public void IsByPassed_Host_Null ()
                {
                        WebProxy p = new WebProxy ("http://proxy.contoso.com", true);
@@ -212,6 +215,9 @@ namespace MonoTests.System.Net
 
 
                [Test]
+#if TARGET_JVM
+               [Ignore ("The MS compliant binary serialization is not supported")]
+#endif         
                public void GetObjectData ()
                {
                        SerializationInfo si = new SerializationInfo (typeof (WebHeaderCollection),