Author: atsushi
Date: 2006-01-20 05:22:57 -0500 (Fri, 20 Jan 2006)
New Revision: 55828
Modified:
trunk/mcs/class/I18N/CJK/Test/ChangeLog
trunk/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs
Log:
2006-01-20 Atsushi Enomoto <[EMAIL PROTECTED]>
* I18N.CJK.Test.cs : Actually some of new tests fail under .NET 1.x.
Added Encoder54936Refresh() which tests Encoder.GetBytes() where
refresh==true.
Modified: trunk/mcs/class/I18N/CJK/Test/ChangeLog
===================================================================
--- trunk/mcs/class/I18N/CJK/Test/ChangeLog 2006-01-20 10:14:26 UTC (rev
55827)
+++ trunk/mcs/class/I18N/CJK/Test/ChangeLog 2006-01-20 10:22:57 UTC (rev
55828)
@@ -1,5 +1,11 @@
2006-01-20 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * I18N.CJK.Test.cs : Actually some of new tests fail under .NET 1.x.
+ Added Encoder54936Refresh() which tests Encoder.GetBytes() where
+ refresh==true.
+
+2006-01-20 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* I18N.CJK.Test.cs : Added test for #77307. Unify those "get bytes
for all of chars" tests.
Modified: trunk/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs
===================================================================
--- trunk/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs 2006-01-20 10:14:26 UTC
(rev 55827)
+++ trunk/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs 2006-01-20 10:22:57 UTC
(rev 55828)
@@ -193,6 +193,9 @@
}
[Test]
+#if !NET_2_0
+ [Category ("NotDotNet")] // MS bug
+#endif
public void Bug77723 ()
{
GetBytesAllSingleChars (51932);
@@ -260,6 +263,32 @@
GetCharsAllBytePairs (950);
}
+ [Test]
+#if !NET_2_0
+ [Category ("NotDotNet")] // MS bug
+#endif
+ public void Encoder54936Refresh ()
+ {
+ Encoding e = Encoding.GetEncoding ("gb18030");
+ Encoder d = e.GetEncoder ();
+ byte [] bytes;
+
+ bytes = new byte [4];
+ Assert.AreEqual (0, d.GetBytes (new char [] {'\uD800'},
0, 1, bytes, 0, false), "#1");
+ Assert.AreEqual (new byte [] {00, 00, 00, 00},
+ bytes, "#2");
+
+ bytes = new byte [4];
+ Assert.AreEqual (4, d.GetBytes (new char [] {'\uDC00'},
0, 1, bytes, 0, true), "#3");
+ Assert.AreEqual (new byte [] {0x90, 0x30, 0x81, 0x30},
+ bytes, "#4");
+
+ bytes = new byte [4];
+ Assert.AreEqual (1, d.GetBytes (new char [] {'\uD800'},
0, 1, bytes, 0, true), "#5");
+ Assert.AreEqual (new byte [] {0x3F, 00, 00, 00},
+ bytes, "#6");
+ }
+
#endregion
#region Korean
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches