commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r476031 - /jakarta/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java
Date Fri, 17 Nov 2006 02:49:44 GMT
Author: bayard
Date: Thu Nov 16 18:49:44 2006
New Revision: 476031

URL: http://svn.apache.org/viewvc?view=rev&rev=476031
Log:
Modified the test to expect an empty string if the 'fancy' character passed in is not considered
a letter by the JVM. See Issue CODEC-51

Modified:
    jakarta/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java

Modified: jakarta/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java?view=diff&rev=476031&r1=476030&r2=476031
==============================================================================
--- jakarta/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java
(original)
+++ jakarta/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/SoundexTest.java
Thu Nov 16 18:49:44 2006
@@ -345,11 +345,15 @@
      */
     public void testUsMappingOWithDiaeresis() {
         assertEquals("O000", this.getEncoder().encode("o"));
-        try {
-            assertEquals("Ö000", this.getEncoder().encode("ö"));
-            fail("Expected IllegalArgumentException not thrown");
-        } catch (IllegalArgumentException e) {
-            // expected
+        if ( Character.isLetter('ö') ) {
+            try {
+                assertEquals("Ö000", this.getEncoder().encode("ö"));
+                fail("Expected IllegalArgumentException not thrown");
+            } catch (IllegalArgumentException e) {
+                // expected
+            }
+        } else {
+            assertEquals("", this.getEncoder().encode("ö"));
         }
     }
 
@@ -360,11 +364,15 @@
      */
     public void testUsMappingEWithAcute() {
         assertEquals("E000", this.getEncoder().encode("e"));
-        try {
-            assertEquals("É000", this.getEncoder().encode("é"));
-            fail("Expected IllegalArgumentException not thrown");
-        } catch (IllegalArgumentException e) {
-            // expected
+        if ( Character.isLetter('é') ) {
+            try {
+                assertEquals("É000", this.getEncoder().encode("é"));
+                fail("Expected IllegalArgumentException not thrown");
+            } catch (IllegalArgumentException e) {
+                // expected
+            }
+        } else {
+            assertEquals("", this.getEncoder().encode("é"));
         }
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message