Author: mhabersack
Date: 2007-09-05 16:44:15 -0400 (Wed, 05 Sep 2007)
New Revision: 85380

Modified:
   trunk/mcs/class/System/System/ChangeLog
   trunk/mcs/class/System/System/UriTypeConverter.cs
   trunk/mcs/class/System/Test/System/ChangeLog
   trunk/mcs/class/System/Test/System/UriTypeConverterTest.cs
Log:
2007-09-05  Marek Habersack  <[EMAIL PROTECTED]>

            * UriTypeConverterTest.cs: added a new test for conversion from
            strings containing relative URIs. Currently marked as NotWorking
            since cases 3 and 4 fail on Mono.
2007-09-05  Marek Habersack  <[EMAIL PROTECTED]>

            * UriTypeConverter.cs: conversion from string should be possible
            for both relative and absolute URIs.


Modified: trunk/mcs/class/System/System/ChangeLog
===================================================================
--- trunk/mcs/class/System/System/ChangeLog     2007-09-05 20:41:11 UTC (rev 
85379)
+++ trunk/mcs/class/System/System/ChangeLog     2007-09-05 20:44:15 UTC (rev 
85380)
@@ -1,3 +1,8 @@
+2007-09-05  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * UriTypeConverter.cs: conversion from string should be possible
+       for both relative and absolute URIs.
+
 2007-08-01  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * Uri.cs, UriParser.cs : implemented InitializeAndValidate() and

Modified: trunk/mcs/class/System/System/UriTypeConverter.cs
===================================================================
--- trunk/mcs/class/System/System/UriTypeConverter.cs   2007-09-05 20:41:11 UTC 
(rev 85379)
+++ trunk/mcs/class/System/System/UriTypeConverter.cs   2007-09-05 20:44:15 UTC 
(rev 85380)
@@ -80,7 +80,7 @@
 
                        string s = (value as string);
                        if (s != null)
-                               return new Uri (s);
+                               return new Uri (s, UriKind.RelativeOrAbsolute);
 
                        InstanceDescriptor id = (value as InstanceDescriptor);
                        if (id != null) {

Modified: trunk/mcs/class/System/Test/System/ChangeLog
===================================================================
--- trunk/mcs/class/System/Test/System/ChangeLog        2007-09-05 20:41:11 UTC 
(rev 85379)
+++ trunk/mcs/class/System/Test/System/ChangeLog        2007-09-05 20:44:15 UTC 
(rev 85380)
@@ -1,3 +1,9 @@
+2007-09-05  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * UriTypeConverterTest.cs: added a new test for conversion from
+       strings containing relative URIs. Currently marked as NotWorking
+       since cases 3 and 4 fail on Mono.
+
 2007-08-01  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * UriParserTest.cs, UriTest3.cs, HttpStyleUriParserTest.cs :

Modified: trunk/mcs/class/System/Test/System/UriTypeConverterTest.cs
===================================================================
--- trunk/mcs/class/System/Test/System/UriTypeConverterTest.cs  2007-09-05 
20:41:11 UTC (rev 85379)
+++ trunk/mcs/class/System/Test/System/UriTypeConverterTest.cs  2007-09-05 
20:44:15 UTC (rev 85380)
@@ -193,6 +193,19 @@
                }
 
                [Test]
+               [NUnit.Framework.Category ("NotWorking")] // bug 82712
+               public void ConvertFromString ()
+               {
+                       object o = converter.ConvertFrom ("~/SomeUri.txt");
+                       Assert.IsFalse ((o as Uri).IsAbsoluteUri, "CFS_01");
+                       Assert.AreEqual ("~/SomeUri.txt", (o as Uri).ToString 
(), "CFS_02");
+                       
+                       o = converter.ConvertFrom ("/SomeUri.txt");
+                       Assert.IsFalse ((o as Uri).IsAbsoluteUri, "CFS_03");
+                       Assert.AreEqual ("/SomeUri.txt", (o as Uri).ToString 
(), "CFS_04");
+               }
+               
+               [Test]
                [ExpectedException (typeof (NotSupportedException))]
                public void ConvertFrom_Bad ()
                {

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

Reply via email to