commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1073219 - /commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java
Date Tue, 22 Feb 2011 04:02:30 GMT
Author: ggregory
Date: Tue Feb 22 04:02:30 2011
New Revision: 1073219

URL: http://svn.apache.org/viewvc?rev=1073219&view=rev
Log:
Format before adding tests.

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

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java?rev=1073219&r1=1073218&r2=1073219&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java
Tue Feb 22 04:02:30 2011
@@ -33,26 +33,45 @@ public class ColognePhoneticTest extends
     public void testBorderCases() {
         ColognePhonetic koellePhon = new ColognePhonetic();
 
-        String[][] data = { { "a", "0" }, { "e", "0" }, { "i", "0" },
-                { "o", "0" }, { "u", "0" }, { "\u00E4", "0" }, { "\u00F6", "0" },
-                { "\u00FC", "0" }, { "aa", "0" }, { "ha", "0" }, { "h", "" },
-                { "aha", "0" }, { "b", "1" }, { "p", "1" }, { "ph", "3" },
-                { "f", "3" }, { "v", "3" }, { "w", "3" }, { "g", "4" },
-                { "k", "4" }, { "q", "4" }, { "x", "48" }, { "ax", "048" },
-                { "cx", "48" }, { "l", "5" }, { "cl", "45" }, { "acl", "085" },
-                { "mn", "6" }, { "r", "7" } };
+        String[][] data = {
+            {"a", "0"},
+            {"e", "0"},
+            {"i", "0"},
+            {"o", "0"},
+            {"u", "0"},
+            {"\u00E4", "0"},
+            {"\u00F6", "0"},
+            {"\u00FC", "0"},
+            {"aa", "0"},
+            {"ha", "0"},
+            {"h", ""},
+            {"aha", "0"},
+            {"b", "1"},
+            {"p", "1"},
+            {"ph", "3"},
+            {"f", "3"},
+            {"v", "3"},
+            {"w", "3"},
+            {"g", "4"},
+            {"k", "4"},
+            {"q", "4"},
+            {"x", "48"},
+            {"ax", "048"},
+            {"cx", "48"},
+            {"l", "5"},
+            {"cl", "45"},
+            {"acl", "085"},
+            {"mn", "6"},
+            {"r", "7"}};
 
         for (int i = 0; i < data.length; i++) {
-            assertEquals("Failed to correctly convert element of index: " + i,
-                         data[i][1], koellePhon.colognePhonetic(data[i][0]));
+            assertEquals("Failed to correctly convert element of index: " + i, data[i][1],
koellePhon.colognePhonetic(data[i][0]));
         }
     }
 
     public void testExamples() {
         ColognePhonetic koellePhon = new ColognePhonetic();
-        String[][] data = { { "Müller-Lüdenscheidt", "65752682" },
-                { "Breschnew", "17863" }, { "Wikipedia", "3412" } };
-
+        String[][] data = {{"Müller-Lüdenscheidt", "65752682"}, {"Breschnew", "17863"},
{"Wikipedia", "3412"}};
         for (int i = 0; i < data.length; i++) {
             assertEquals(data[i][1], koellePhon.colognePhonetic(data[i][0]));
         }
@@ -60,9 +79,7 @@ public class ColognePhoneticTest extends
 
     public void testIsCologneEquals() {
         ColognePhonetic koellePhon = new ColognePhonetic();
-        assertFalse("Cologne-phonetic encodings should not be equal",
-                koellePhon.isCologneEqual("Meyer", "Müller"));
-        assertTrue("Cologne-phonetic encodings should be equal",
-                koellePhon.isCologneEqual("Meyer", "Mayr"));
+        assertFalse("Cologne-phonetic encodings should not be equal", koellePhon.isCologneEqual("Meyer",
"Müller"));
+        assertTrue("Cologne-phonetic encodings should be equal", koellePhon.isCologneEqual("Meyer",
"Mayr"));
     }
 }



Mime
View raw message