Author: kornelpal
Date: 2006-07-18 10:44:07 -0400 (Tue, 18 Jul 2006)
New Revision: 62704

Modified:
   trunk/mcs/class/corlib/Test/System.Text/ASCIIEncodingTest.cs
   trunk/mcs/class/corlib/Test/System.Text/ChangeLog
Log:
ASCIIEncodingTest.cs: Added TestGetString3 test.

Modified: trunk/mcs/class/corlib/Test/System.Text/ASCIIEncodingTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Text/ASCIIEncodingTest.cs        
2006-07-18 14:30:38 UTC (rev 62703)
+++ trunk/mcs/class/corlib/Test/System.Text/ASCIIEncodingTest.cs        
2006-07-18 14:44:07 UTC (rev 62704)
@@ -144,6 +144,19 @@
                        AssertEquals ("es", str);
                }
 
+               // Test invalid byte handling
+               public void TestGetString3 () 
+               {
+                       Encoding encoding = Encoding.ASCII;
+                       byte [] bytes = new byte [] {0x61, 0xE1, 0xE2};
+                       string s = encoding.GetString (bytes, 0, 3);
+#if NET_2_0
+                       AssertEquals ("a??", s);
+#else
+                       AssertEquals ("aab", s);
+#endif
+               }
+
                // Test Decoder
                public void TestDecoder ()
                {

Modified: trunk/mcs/class/corlib/Test/System.Text/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Text/ChangeLog   2006-07-18 14:30:38 UTC 
(rev 62703)
+++ trunk/mcs/class/corlib/Test/System.Text/ChangeLog   2006-07-18 14:44:07 UTC 
(rev 62704)
@@ -1,3 +1,7 @@
+2006-07-18  Kornél Pál  <[EMAIL PROTECTED]>
+
+       * ASCIIEncodingTest.cs: Added TestGetString3 test.
+
 2006-07-11  Kornél Pál  <[EMAIL PROTECTED]>
 
        * StringBuilderTest.cs: Added SetLength test.

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

Reply via email to