commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1062493 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTrimEmptyTest.java
Date Sun, 23 Jan 2011 18:41:46 GMT
Author: bayard
Date: Sun Jan 23 18:41:46 2011
New Revision: 1062493

URL: http://svn.apache.org/viewvc?rev=1062493&view=rev
Log:
Removing the 'will fail on JDK 1.6' as we now have a pre 1.6 implementation

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTrimEmptyTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTrimEmptyTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTrimEmptyTest.java?rev=1062493&r1=1062492&r2=1062493&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTrimEmptyTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTrimEmptyTest.java
Sun Jan 23 18:41:46 2011
@@ -242,29 +242,20 @@ public class StringUtilsTrimEmptyTest ex
     }
 
     public void testStripAccents() {
-        if(SystemUtils.isJavaVersionAtLeast(1.6f)) {
-            String cue = "\u00C7\u00FA\u00EA";
-            assertEquals( "Failed to strip accents from " + cue, "Cue", StringUtils.stripAccents(cue));
-
-            String lots = "\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5\u00C7\u00C8\u00C9" + 
-                          "\u00CA\u00CB\u00CC\u00CD\u00CE\u00CF\u00D1\u00D2\u00D3" + 
-                          "\u00D4\u00D5\u00D6\u00D9\u00DA\u00DB\u00DC\u00DD";
-            assertEquals( "Failed to strip accents from " + lots, 
-                          "AAAAAACEEEEIIIINOOOOOUUUUY", 
-                          StringUtils.stripAccents(lots));
-
-            assertNull( "Failed null safety", StringUtils.stripAccents(null) );
-            assertEquals( "Failed empty String", "", StringUtils.stripAccents("") );
-            assertEquals( "Failed to handle non-accented text", "control", StringUtils.stripAccents("control")
);
-            assertEquals( "Failed to handle easy example", "eclair", StringUtils.stripAccents("\u00E9clair")
);
-        } else {
-            try {
-                StringUtils.stripAccents("string");
-                fail("Before JDK 1.6, stripAccents is not expected to work");
-            } catch(UnsupportedOperationException uoe) {
-                assertEquals("The stripAccents(String) method is not supported until Java
1.6", uoe.getMessage());
-            }
-        }
+        String cue = "\u00C7\u00FA\u00EA";
+        assertEquals( "Failed to strip accents from " + cue, "Cue", StringUtils.stripAccents(cue));
+
+        String lots = "\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5\u00C7\u00C8\u00C9" + 
+                      "\u00CA\u00CB\u00CC\u00CD\u00CE\u00CF\u00D1\u00D2\u00D3" + 
+                      "\u00D4\u00D5\u00D6\u00D9\u00DA\u00DB\u00DC\u00DD";
+        assertEquals( "Failed to strip accents from " + lots, 
+                      "AAAAAACEEEEIIIINOOOOOUUUUY", 
+                      StringUtils.stripAccents(lots));
+
+        assertNull( "Failed null safety", StringUtils.stripAccents(null) );
+        assertEquals( "Failed empty String", "", StringUtils.stripAccents("") );
+        assertEquals( "Failed to handle non-accented text", "control", StringUtils.stripAccents("control")
);
+        assertEquals( "Failed to handle easy example", "eclair", StringUtils.stripAccents("\u00E9clair")
);
     }
 
     //-----------------------------------------------------------------------



Mime
View raw message