Author: atsushi
Date: 2006-03-20 20:28:32 -0500 (Mon, 20 Mar 2006)
New Revision: 58210

Modified:
   trunk/mcs/class/corlib/Test/System.Text/UnicodeEncodingTest.cs
Log:
2006-03-21  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * UnicodeEncodingTest.cs : added some zero-length tests.



Modified: trunk/mcs/class/corlib/Test/System.Text/UnicodeEncodingTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Text/UnicodeEncodingTest.cs      
2006-03-21 01:04:35 UTC (rev 58209)
+++ trunk/mcs/class/corlib/Test/System.Text/UnicodeEncodingTest.cs      
2006-03-21 01:28:32 UTC (rev 58210)
@@ -164,6 +164,24 @@
                         Assertion.AssertEquals ("UTF #1", 100, 
UnicodeEnc.GetMaxByteCount(50));
 #endif
                 }
+
+               [Test]
+               public void ZeroLengthArrays ()
+               {
+                       UnicodeEncoding encoding = new UnicodeEncoding ();
+                       encoding.GetCharCount (new byte [0]);
+                       encoding.GetChars (new byte [0]);
+                       encoding.GetCharCount (new byte [0], 0, 0);
+                       encoding.GetChars (new byte [0], 0, 0);
+                       encoding.GetChars (new byte [0], 0, 0, new char [0], 0);
+                       encoding.GetByteCount (new char [0]);
+                       encoding.GetBytes (new char [0]);
+                       encoding.GetByteCount (new char [0], 0, 0);
+                       encoding.GetBytes (new char [0], 0, 0);
+                       encoding.GetBytes (new char [0], 0, 0, new byte [0], 0);
+                       encoding.GetByteCount ("");
+                       encoding.GetBytes ("");
+               }
         }
 }
 

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

Reply via email to