2005-01-08 Nick Drochak <ndrochak@ieee.org>
authorNick Drochak <nickd@mono-cvs.ximian.com>
Fri, 7 Jan 2005 15:42:31 +0000 (15:42 -0000)
committerNick Drochak <nickd@mono-cvs.ximian.com>
Fri, 7 Jan 2005 15:42:31 +0000 (15:42 -0000)
* TypeDescriptorTests.cs:
* System.ComponentModel/ChangeLog
* System.ComponentModel/TypeDescriptorTests.cs
* System.Net.Sockets/ChangeLog
* System.Net.Sockets/SocketTest.cs
* System.Text.RegularExpressions/ChangeLog
* System.Text.RegularExpressions/RegexTest.cs
* System/ChangeLog
* System/UriTest.cs
* System/UriTest2.cs: Fix/Ignore tests for MS.NET

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

mcs/class/System/Test/System.ComponentModel/ChangeLog
mcs/class/System/Test/System.ComponentModel/TypeDescriptorTests.cs
mcs/class/System/Test/System.Net.Sockets/ChangeLog
mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
mcs/class/System/Test/System.Text.RegularExpressions/ChangeLog
mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs
mcs/class/System/Test/System/ChangeLog
mcs/class/System/Test/System/UriTest.cs
mcs/class/System/Test/System/UriTest2.cs

index f9a52da99cb1a7c7261c0292e6844bdd7d8ba8c0..f16e656db314ca96af351c00b35e5191a9dc8e3a 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-08  Nick Drochak  <ndrochak@ieee.org>
+
+       * TypeDescriptorTests.cs: Fix/Ignore tests for MS.NET
+
 2004-04-16  Lluis Sanchez Gual <lluis@ximian.com>
 
        * TypeDescriptorTests.cs: Added new tests for TypeDescriptor.
index e350797129903466242b0e7d6297859d56725274..bf360d58b80007229c4f6e076ccaf7f8baf3df87 100644 (file)
@@ -176,7 +176,7 @@ namespace MonoTests.System.ComponentModel
                [Test]
                public void TestGetComponentName ()
                {
-                       AssertNull ("t1", TypeDescriptor.GetComponentName (com));
+                       AssertNotNull ("t1", TypeDescriptor.GetComponentName (com));
                        AssertEquals ("t1", "TestName", TypeDescriptor.GetComponentName (sitedcom));
                }
                
@@ -216,7 +216,7 @@ namespace MonoTests.System.ComponentModel
                        
                        des = TypeDescriptor.GetDefaultEvent (sitedcom);
                        AssertNotNull ("t3", des);
-                       AssertEquals ("t4", "AnEvent", des.Name);
+                       AssertEquals ("t4", "AnotherEvent", des.Name);
                }
                
                [Test]
@@ -228,7 +228,13 @@ namespace MonoTests.System.ComponentModel
                        des = TypeDescriptor.GetDefaultProperty (com);
                        AssertNull ("t2", des);
                        
-                       des = TypeDescriptor.GetDefaultProperty (sitedcom);
+               }
+               
+               [Test]
+               [Ignore("Fails on .NET")]
+               public void TestGetDefaultProperty2 ()
+               {
+                       PropertyDescriptor des = TypeDescriptor.GetDefaultProperty (sitedcom);
                        AssertNotNull ("t3", des);
                        AssertEquals ("t4", "TestProperty", des.Name);
                }
@@ -279,10 +285,6 @@ namespace MonoTests.System.ComponentModel
                        Assert ("t2.1", col.Find ("TestProperty", true) != null);
                        Assert ("t2.2", col.Find ("AnotherProperty", true) != null);
                        
-                       col = TypeDescriptor.GetProperties (sitedcom);
-                       Assert ("t3.1", col.Find ("TestProperty", true) == null);
-                       Assert ("t3.2", col.Find ("AnotherProperty", true) != null);
-                       
                        Attribute[] filter = new Attribute[] { new DescriptionAttribute ("test") };
                        
                        col = TypeDescriptor.GetProperties (typeof(MyComponent), filter);
@@ -293,10 +295,22 @@ namespace MonoTests.System.ComponentModel
                        Assert ("t5.1", col.Find ("TestProperty", true) != null);
                        Assert ("t5.2", col.Find ("AnotherProperty", true) == null);
                        
+               }
+
+               [Test]
+               [Ignore("Fails on .NET")]
+               public void TestGetProperties2 ()
+               {
+                       PropertyDescriptorCollection col = TypeDescriptor.GetProperties (sitedcom);
+                       Assert ("t3.1", col.Find ("TestProperty", true) == null);
+                       Assert ("t3.2", col.Find ("AnotherProperty", true) != null);
+
+                       Attribute[] filter = new Attribute[] { new DescriptionAttribute ("test") };
                        col = TypeDescriptor.GetProperties (sitedcom, filter);
                        Assert ("t6.1", col.Find ("TestProperty", true) == null);
                        Assert ("t6.2", col.Find ("AnotherProperty", true) == null);
                }
+
        }
 }
 
index a726ad1413faa2360bfd0187097288f3ec3de71f..e1c097c1026b2ff35b94a9387bc780aab81e7e04 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-08  Nick Drochak  <ndrochak@ieee.org>
+
+       * SocketTest.cs: Ignore test on MS.NET
+
 2004-10-14  Dick Porter  <dick@ximian.com>
 
        * SocketTest.cs: Test the blocking status of accepted sockets
index 32048e1401488e568b5ad999806050acc8533fcc..f01a12410b4799b9bfc276b2970bb91ff4cb9119 100644 (file)
@@ -70,6 +70,7 @@ namespace MonoTests.System.Net.Sockets
                }
 
                [Test]
+               [Category("NotDotNet")]
                public void AcceptBlockingStatus()
                {
                        bool block;
index 08278754f7679d4a105ad36e522925049cd19425..a11557809ecc195d60f7e87888b60222e86ee023 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-08  Nick Drochak  <ndrochak@ieee.org>
+
+       * RegexTest.cs: Make pass on MS.NET
+
 2004-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * System.Text.RegularExpressions/RegexBugs.cs: test case for bug #57274.
index 1b222fb9161e73ed7199405f0efa22b8da037711..392bec991179a5ba65860860533fc8112e0b0aec 100644 (file)
@@ -29,8 +29,8 @@ namespace MonoTests.System.Text.RegularExpressions {
                public void Unescape () {
                        string inString = @"\a\b\t\r\v\f\n\e\02400\x231\cC\ufffff\*";
                        char [] c = { (char)7, (char)8, (char)9, (char)13, 
-                                     (char)11, (char)12, (char)10, (char)27, 
-                                     (char)160, (char)48, (char)35, (char)49, 
+                                     (char)11, (char)12, (char)10, (char)27, (char) 20,
+                                     (char)48, (char)48, (char)35, (char)49, 
                                      (char)3, (char)65535, (char)102, (char)42
                        };
                        string expectedString = new String(c);
index 988448e3d4f72e04449fb0777ceb43b608527af3..e54cdf9152114d1ba7715129b39c0308577bd9ca 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-08  Nick Drochak  <ndrochak@ieee.org>
+
+       * UriTest.cs
+       * UriTest2.cs: Make pass on MS.NET
+
 2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
 
        * UriTest.cs : As Unix paths, //foo/bar never means host == foo,
index 05af3dfbbfdf64732ef7d312579c5961d4fb6892..1765f94e21406d4e6b36b2a1b6091099a0e41712 100644 (file)
@@ -309,7 +309,7 @@ namespace MonoTests.System
                }
 
                [Test]
-//             [ExpectedException (typeof (UriFormatException))]
+               [Category("NotDotNet")]
                public void UncFail ()
                {
                        Uri uri = new Uri ("/home/user/dir/filename.ext");
@@ -485,7 +485,16 @@ namespace MonoTests.System
                }
 
                [Test]
-               public void CheckHostName ()
+               [Category("NotDotNet")]
+               public void CheckHostName1 ()
+               {
+                       AssertEquals ("#11: known to fail with ms.net: this is not a valid domain address", UriHostNameType.Unknown, Uri.CheckHostName ("www.contoso.com."));   
+                       AssertEquals ("#33 known to fail with ms.net: this is not a valid IPv6 address.", UriHostNameType.Unknown, Uri.CheckHostName ("2001::03A0:1.2.3.4"));
+                       AssertEquals ("#36 known to fail with ms.net: this is not a valid IPv6 address.", UriHostNameType.Unknown, Uri.CheckHostName (":11:22:33:44:55:66:77:88"));
+               }
+
+               [Test]
+               public void CheckHostName2 ()
                {
                        AssertEquals ("#1", UriHostNameType.Unknown, Uri.CheckHostName (null));
                        AssertEquals ("#2", UriHostNameType.Unknown, Uri.CheckHostName (""));
@@ -497,7 +506,6 @@ namespace MonoTests.System
                        AssertEquals ("#8", UriHostNameType.Dns, Uri.CheckHostName ("9001.002.03.4"));
                        AssertEquals ("#9", UriHostNameType.Dns, Uri.CheckHostName ("www.contoso.com"));
                        AssertEquals ("#10", UriHostNameType.Unknown, Uri.CheckHostName (".www.contoso.com"));
-                       AssertEquals ("#11: known to fail with ms.net: this is not a valid domain address", UriHostNameType.Unknown, Uri.CheckHostName ("www.contoso.com."));   
                        AssertEquals ("#12", UriHostNameType.Dns, Uri.CheckHostName ("www.con-toso.com"));      
                        AssertEquals ("#13", UriHostNameType.Dns, Uri.CheckHostName ("www.con_toso.com"));      
                        AssertEquals ("#14", UriHostNameType.Unknown, Uri.CheckHostName ("www.con,toso.com"));  
@@ -522,10 +530,8 @@ namespace MonoTests.System
 
                        AssertEquals ("#31", UriHostNameType.Unknown, Uri.CheckHostName ("2001::03A0::/35"));
                        AssertEquals ("#32", UriHostNameType.Unknown, Uri.CheckHostName ("2001:03A0::/35a"));
-                       AssertEquals ("#33 known to fail with ms.net: this is not a valid IPv6 address.", UriHostNameType.Unknown, Uri.CheckHostName ("2001::03A0:1.2.3.4"));
                        AssertEquals ("#34", UriHostNameType.Unknown, Uri.CheckHostName ("::ffff:123.256.155.43"));
                        AssertEquals ("#35", UriHostNameType.Unknown, Uri.CheckHostName (":127.0.0.1"));
-                       AssertEquals ("#36 known to fail with ms.net: this is not a valid IPv6 address.", UriHostNameType.Unknown, Uri.CheckHostName (":11:22:33:44:55:66:77:88"));
                        AssertEquals ("#37", UriHostNameType.Unknown, Uri.CheckHostName ("::11:22:33:44:55:66:77:88"));
                        AssertEquals ("#38", UriHostNameType.Unknown, Uri.CheckHostName ("11:22:33:44:55:66:77:88::"));
                        AssertEquals ("#39", UriHostNameType.Unknown, Uri.CheckHostName ("11:22:33:44:55:66:77:88:"));
@@ -537,7 +543,17 @@ namespace MonoTests.System
                }
                
                [Test]
-               public void IsLoopback ()
+               [Category("NotDotNet")]
+               public void IsLoopback1 ()
+               {
+                       Uri uri = new Uri("http://[0:0:0:0::127.11.22.33]:8080");
+                       Assert ("#10: known to fail with ms.net", uri.IsLoopback);
+                       uri = new Uri("http://[::ffff:127.11.22.33]:8080");
+                       Assert ("#11: known to fail with ms.net", uri.IsLoopback);
+               }
+
+               [Test]
+               public void IsLoopback2 ()
                {
                        Uri uri = new Uri("http://loopback:8080");
                        AssertEquals ("#1", true, uri.IsLoopback);
@@ -557,10 +573,6 @@ namespace MonoTests.System
                        AssertEquals ("#8", true, uri.IsLoopback);
                        uri = new Uri("http://[0:0:0:0::127.0.0.1]:8080");
                        AssertEquals ("#9", true, uri.IsLoopback);
-                       uri = new Uri("http://[0:0:0:0::127.11.22.33]:8080");
-                       AssertEquals ("#10: known to fail with ms.net", true, uri.IsLoopback);
-                       uri = new Uri("http://[::ffff:127.11.22.33]:8080");
-                       AssertEquals ("#11: known to fail with ms.net", true, uri.IsLoopback);
                        uri = new Uri("http://[::ff00:7f11:2233]:8080");
                        AssertEquals ("#12", false, uri.IsLoopback);
                        uri = new Uri("http://[1:0:0:0::1]:8080");
@@ -568,15 +580,22 @@ namespace MonoTests.System
                }
                
                [Test]
-               public void Equals ()
+               [Category("NotDotNet")]
+               public void Equals1 ()
+               {
+                       Uri uri1 = new Uri ("http://www.contoso.com/index.htm#main");
+                       Uri uri2 = new Uri ("http://www.contoso.com/index.htm?x=1");
+                       Assert ("#2 known to fail with ms.net", !uri1.Equals (uri2));
+                       Assert ("#4: known to fail with ms.net", !uri1.Equals ("http://www.contoso.com:8080/index.htm?x=1"));
+               }
+
+               [Test]
+               public void Equals2 ()
                {
                        Uri uri1 = new Uri ("http://www.contoso.com/index.htm#main");
                        Uri uri2 = new Uri ("http://www.contoso.com/index.htm#fragment");
                        Assert ("#1", uri1.Equals (uri2));
-                       uri2 = new Uri ("http://www.contoso.com/index.htm?x=1");
-                       Assert ("#2 known to fail with ms.net", !uri1.Equals (uri2));
                        Assert ("#3", !uri2.Equals ("http://www.contoso.com/index.html?x=1"));
-                       Assert ("#4: known to fail with ms.net", !uri1.Equals ("http://www.contoso.com:8080/index.htm?x=1"));
                }
 
                [Test]
@@ -799,7 +818,7 @@ namespace MonoTests.System
                        // Empty path == localhost, in theory
                        path = "file:///tmp/foo/bar";
                        fileUri = new Uri( path );
-                       AssertEquals (path, "/tmp/foo/bar", fileUri.AbsolutePath);
+                       AssertEquals (path, "/foo/bar", fileUri.AbsolutePath);
 
                        // Empty path == localhost, in theory
                        path = "file:///c:/tmp/foo/bar";
index 9b1e526d04df127543f0a7705860fd905be0f2e7..fed00c4da2d0f7855cf30ffb068d25a942d69927 100755 (executable)
@@ -56,6 +56,7 @@ namespace MonoTests.System
                }\r
                \r
                [Test]\r
+               [Category("NotDotNet")]\r
                public void AbsoluteUriFromFileManual ()\r
                {\r
                        FromFile ("Test/System/test-uri-props-manual.txt", null);\r