directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r326538 - in /directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name: DnParserTest.java LdapNameTest.java
Date Wed, 19 Oct 2005 12:40:35 GMT
Author: ersiner
Date: Wed Oct 19 05:40:27 2005
New Revision: 326538

URL: http://svn.apache.org/viewcvs?rev=326538&view=rev
Log:
Fixed some issues (failing tests) which are caused by host specific locale/char encoding settings.
Replaced string literals with their counterparts got by code at runtime, as Emmanuel pointed
out.

Modified:
    directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java
    directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/LdapNameTest.java

Modified: directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java?rev=326538&r1=326537&r2=326538&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java
(original)
+++ directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java
Wed Oct 19 05:40:27 2005
@@ -272,7 +272,8 @@
         DnParser parser = new DnParser();
         String result = parser.parse( cn ).toString();
         
-        assertEquals( "cn=Jérôme", result );
+        assertEquals( cn, result.toString() );
+
     }
 
     public void testNameGermanChars() throws Exception
@@ -284,7 +285,7 @@
         DnParser parser = new DnParser();
         String result = parser.parse( cn ).toString();
         
-        assertEquals( "cn=ÄÖÜßäöü", result );
+        assertEquals( cn, result.toString() );
     }
 
     public void testNameTurkishChars() throws Exception
@@ -298,6 +299,7 @@
         DnParser parser = new DnParser();
         String result = parser.parse( cn ).toString();
         
-        assertEquals( "cn=İıŞşÖöÜüĞğ", result );
+        assertEquals( cn, result.toString() );
+
     }
 }  // end class DnParserTest

Modified: directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/LdapNameTest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/LdapNameTest.java?rev=326538&r1=326537&r2=326538&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/LdapNameTest.java
(original)
+++ directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/LdapNameTest.java
Wed Oct 19 05:40:27 2005
@@ -1042,18 +1042,17 @@
 
         Name name = new LdapName( cn);
         
-        assertEquals( "cn=Jérôme", name.toString() );
+        assertEquals( cn, name.toString() );
     }
 
     public void testNameGermanChars() throws Exception
     {
         String cn = new String(new byte[]{'c', 'n', '=', (byte)0xC3, (byte)0x84, (byte)0xC3,
(byte)0x96, (byte)0xC3, 
                     (byte)0x9C, (byte)0xC3, (byte)0x9F, (byte)0xC3, (byte)0xA4, (byte)0xC3,
(byte)0xB6, (byte)0xC3, (byte)0xBC}, "UTF-8");
-        
 
         Name name = new LdapName( cn );
         
-        assertEquals( "cn=ÄÖÜßäöü", name.toString() );
+        assertEquals( cn, name.toString() );
     }
 
     public void testNameTurkishChars() throws Exception
@@ -1066,6 +1065,6 @@
 
         Name name = new LdapName( cn);
         
-        assertEquals( "cn=İıŞşÖöÜüĞğ", name.toString() );
+        assertEquals( cn, name.toString() );
     }
 }



Mime
View raw message