directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r226616 - /directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/util/MutableStringTest.java
Date Sun, 31 Jul 2005 08:05:07 GMT
Author: elecharny
Date: Sun Jul 31 01:05:05 2005
New Revision: 226616

URL: http://svn.apache.org/viewcvs?rev=226616&view=rev
Log:
Added a test with a non-ASCII string

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/util/MutableStringTest.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/util/MutableStringTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/util/MutableStringTest.java?rev=226616&r1=226615&r2=226616&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/util/MutableStringTest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/util/MutableStringTest.java
Sun Jul 31 01:05:05 2005
@@ -36,4 +36,20 @@
         
         Assert.assertEquals("abcdef", s);   
     }
+
+    /**
+     * Test a string with non ASCII chars
+     *
+     */
+    public void testNonASCIIString()
+    {
+        MutableString ms = new MutableString("Emmanuel Lécharny".getBytes());
+        String s = ms.toString();
+        
+        int msLength = ms.getLength();
+        int sLength = s.getBytes().length;
+        
+        Assert.assertEquals("Emmanuel Lécharny", s);   
+        Assert.assertEquals( sLength, msLength);
+    }
 }



Mime
View raw message