commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1560759 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
Date Thu, 23 Jan 2014 17:10:59 GMT
Author: britter
Date: Thu Jan 23 17:10:58 2014
New Revision: 1560759

URL: http://svn.apache.org/r1560759
Log:
Keep tests for Levenshtein Distance together

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

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java?rev=1560759&r1=1560758&r2=1560759&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
Thu Jan 23 17:10:58 2014
@@ -1916,39 +1916,6 @@ public class StringUtilsTest {
     }
     
     @Test
-    public void testGetJaroWinklerDistance_StringString() {
-      
-      assertEquals(0.93d, StringUtils.getJaroWinklerDistance("frog", "fog"), 0.0d);
-      assertEquals(0.0d, StringUtils.getJaroWinklerDistance("fly", "ant"), 0.0d);
-      assertEquals(0.44d, StringUtils.getJaroWinklerDistance("elephant", "hippo"), 0.0d);
-      assertEquals(0.91d, StringUtils.getJaroWinklerDistance("ABC Corporation", "ABC Corp"),
0.0d);
-      assertEquals(0.93d, StringUtils.getJaroWinklerDistance("D N H Enterprises Inc", "D
& H Enterprises, Inc."), 0.0d);
-      assertEquals(0.94d, StringUtils.getJaroWinklerDistance("My Gym Children's Fitness Center",
"My Gym. Childrens Fitness"), 0.0d);
-      assertEquals(0.9d, StringUtils.getJaroWinklerDistance("PENNSYLVANIA", "PENNCISYLVNIA"),
0.0d);
-      // exceptions
-      try {
-          StringUtils.getJaroWinklerDistance(null, null);
-          fail("expecting IllegalArgumentException");
-      } catch (final IllegalArgumentException ex) {
-          // empty
-      }
-      
-      try {
-        StringUtils.getJaroWinklerDistance(" ", null);
-        fail("expecting IllegalArgumentException");
-      } catch (final IllegalArgumentException ex) {
-        // empty
-      }
-      try {
-        StringUtils.getJaroWinklerDistance(null, "clear");
-        fail("expecting IllegalArgumentException");
-      } catch (final IllegalArgumentException ex) {
-        // empty
-      }
- 
-    }
-
-    @Test
     public void testGetLevenshteinDistance_StringStringInt() {
         // empty strings
         assertEquals(0, StringUtils.getLevenshteinDistance("", "", 0));
@@ -2033,6 +2000,38 @@ public class StringUtilsTest {
         }
     }
 
+    @Test
+    public void testGetJaroWinklerDistance_StringString() {
+
+        assertEquals(0.93d, StringUtils.getJaroWinklerDistance("frog", "fog"), 0.0d);
+        assertEquals(0.0d, StringUtils.getJaroWinklerDistance("fly", "ant"), 0.0d);
+        assertEquals(0.44d, StringUtils.getJaroWinklerDistance("elephant", "hippo"), 0.0d);
+        assertEquals(0.91d, StringUtils.getJaroWinklerDistance("ABC Corporation", "ABC Corp"),
0.0d);
+        assertEquals(0.93d, StringUtils.getJaroWinklerDistance("D N H Enterprises Inc", "D
& H Enterprises, Inc."), 0.0d);
+        assertEquals(0.94d, StringUtils.getJaroWinklerDistance("My Gym Children's Fitness
Center", "My Gym. Childrens Fitness"), 0.0d);
+        assertEquals(0.9d, StringUtils.getJaroWinklerDistance("PENNSYLVANIA", "PENNCISYLVNIA"),
0.0d);
+        // exceptions
+        try {
+            StringUtils.getJaroWinklerDistance(null, null);
+            fail("expecting IllegalArgumentException");
+        } catch (final IllegalArgumentException ex) {
+            // empty
+        }
+
+        try {
+            StringUtils.getJaroWinklerDistance(" ", null);
+            fail("expecting IllegalArgumentException");
+        } catch (final IllegalArgumentException ex) {
+            // empty
+        }
+        try {
+            StringUtils.getJaroWinklerDistance(null, "clear");
+            fail("expecting IllegalArgumentException");
+        } catch (final IllegalArgumentException ex) {
+            // empty
+        }
+    }
+
     /**
      * A sanity check for {@link StringUtils#EMPTY}.
      */



Mime
View raw message