Author: atsushi
Date: 2007-08-08 08:56:29 -0400 (Wed, 08 Aug 2007)
New Revision: 83665

Modified:
   trunk/mcs/class/corlib/System/ChangeLog
   trunk/mcs/class/corlib/System/IntPtr.cs
   trunk/mcs/class/corlib/Test/System/ChangeLog
   trunk/mcs/class/corlib/Test/System/IntPtrTest.cs
Log:
2007-08-08  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * IntPtr.cs : oops, do not ignore format in ToString(string).

        * IntPtrTest.cs : added test for ToString(string).



Modified: trunk/mcs/class/corlib/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System/ChangeLog     2007-08-08 12:50:35 UTC (rev 
83664)
+++ trunk/mcs/class/corlib/System/ChangeLog     2007-08-08 12:56:29 UTC (rev 
83665)
@@ -1,5 +1,9 @@
 2007-08-08  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
+       * IntPtr.cs : oops, do not ignore format in ToString(string).
+
+2007-08-08  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
        * GC.cs, Exception.cs, IntPtr.cs, Enum.cs, DateTime.cs, Convert.cs
          ConsoleKeyInfo.cs, String.cs, Object.cs, Attribute.cs,
          Version.cs : couple of cosmetic 2.0 API fixes.

Modified: trunk/mcs/class/corlib/System/IntPtr.cs
===================================================================
--- trunk/mcs/class/corlib/System/IntPtr.cs     2007-08-08 12:50:35 UTC (rev 
83664)
+++ trunk/mcs/class/corlib/System/IntPtr.cs     2007-08-08 12:56:29 UTC (rev 
83665)
@@ -163,9 +163,9 @@
                string ToString (string format)
                {
                        if (Size == 4)
-                               return ((int) value).ToString ();
+                               return ((int) value).ToString (format);
                        else
-                               return ((long) value).ToString ();
+                               return ((long) value).ToString (format);
                }
 
 #if NET_2_0

Modified: trunk/mcs/class/corlib/Test/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System/ChangeLog        2007-08-08 12:50:35 UTC 
(rev 83664)
+++ trunk/mcs/class/corlib/Test/System/ChangeLog        2007-08-08 12:56:29 UTC 
(rev 83665)
@@ -1,3 +1,7 @@
+2007-08-08  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+       * IntPtrTest.cs : added test for ToString(string).
+
 2007-08-07  Gert Driesen  <[EMAIL PROTECTED]>
 
        * TypeTest.cs: Uncomment test for bug #82211.

Modified: trunk/mcs/class/corlib/Test/System/IntPtrTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System/IntPtrTest.cs    2007-08-08 12:50:35 UTC 
(rev 83664)
+++ trunk/mcs/class/corlib/Test/System/IntPtrTest.cs    2007-08-08 12:56:29 UTC 
(rev 83665)
@@ -49,5 +49,14 @@
                                AssertEquals ("Min", Int64.MinValue, (long) 
pmin);
                        }
                }
+
+#if NET_2_0
+               [Test]
+               public void ToStringWithFormat ()
+               {
+                       AssertEquals ("#1", "0", IntPtr.Zero.ToString ("x"));
+                       AssertEquals ("#2", "3b9aca00", new IntPtr 
(1000000000).ToString ("x"));
+               }
+#endif
        }
 }
\ No newline at end of file

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

Reply via email to