Changeset 14371 in josm for trunk/test/unit
- Timestamp:
- 2018-10-27T13:34:59+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java
r13520 r14371 295 295 assertEquals("Empty on null stream", 0, Utils.readBytesFromStream(null).length); 296 296 } 297 298 /** 299 * Test of {@link Utils#getLevenshteinDistance} method. 300 */ 301 @Test 302 public void testLevenshteinDistance() { 303 assertEquals(0, Utils.getLevenshteinDistance("foo", "foo")); 304 assertEquals(3, Utils.getLevenshteinDistance("foo", "bar")); 305 assertEquals(1, Utils.getLevenshteinDistance("bar", "baz")); 306 } 307 308 /** 309 * Test of {@link Utils#isSimilar} method. 310 */ 311 @Test 312 public void testIsSimilar() { 313 assertFalse(Utils.isSimilar("foo", "foo")); 314 assertFalse(Utils.isSimilar("foo", "bar")); 315 assertTrue(Utils.isSimilar("bar", "baz")); 316 assertTrue(Utils.isSimilar("bar", "baz")); 317 assertTrue(Utils.isSimilar("Rua São João", "Rua SAO Joao")); 318 } 297 319 }
Note:
See TracChangeset
for help on using the changeset viewer.