Skip to content

Commit 3b0e93a

Browse files
committed
Format before adding tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1073219 13f79535-47bb-0310-9956-ffa450edef68
1 parent c84250a commit 3b0e93a

1 file changed

Lines changed: 34 additions & 17 deletions

File tree

src/test/org/apache/commons/codec/language/ColognePhoneticTest.java

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,36 +33,53 @@ protected StringEncoder createEncoder() {
3333
public void testBorderCases() {
3434
ColognePhonetic koellePhon = new ColognePhonetic();
3535

36-
String[][] data = { { "a", "0" }, { "e", "0" }, { "i", "0" },
37-
{ "o", "0" }, { "u", "0" }, { "\u00E4", "0" }, { "\u00F6", "0" },
38-
{ "\u00FC", "0" }, { "aa", "0" }, { "ha", "0" }, { "h", "" },
39-
{ "aha", "0" }, { "b", "1" }, { "p", "1" }, { "ph", "3" },
40-
{ "f", "3" }, { "v", "3" }, { "w", "3" }, { "g", "4" },
41-
{ "k", "4" }, { "q", "4" }, { "x", "48" }, { "ax", "048" },
42-
{ "cx", "48" }, { "l", "5" }, { "cl", "45" }, { "acl", "085" },
43-
{ "mn", "6" }, { "r", "7" } };
36+
String[][] data = {
37+
{"a", "0"},
38+
{"e", "0"},
39+
{"i", "0"},
40+
{"o", "0"},
41+
{"u", "0"},
42+
{"\u00E4", "0"},
43+
{"\u00F6", "0"},
44+
{"\u00FC", "0"},
45+
{"aa", "0"},
46+
{"ha", "0"},
47+
{"h", ""},
48+
{"aha", "0"},
49+
{"b", "1"},
50+
{"p", "1"},
51+
{"ph", "3"},
52+
{"f", "3"},
53+
{"v", "3"},
54+
{"w", "3"},
55+
{"g", "4"},
56+
{"k", "4"},
57+
{"q", "4"},
58+
{"x", "48"},
59+
{"ax", "048"},
60+
{"cx", "48"},
61+
{"l", "5"},
62+
{"cl", "45"},
63+
{"acl", "085"},
64+
{"mn", "6"},
65+
{"r", "7"}};
4466

4567
for (int i = 0; i < data.length; i++) {
46-
assertEquals("Failed to correctly convert element of index: " + i,
47-
data[i][1], koellePhon.colognePhonetic(data[i][0]));
68+
assertEquals("Failed to correctly convert element of index: " + i, data[i][1], koellePhon.colognePhonetic(data[i][0]));
4869
}
4970
}
5071

5172
public void testExamples() {
5273
ColognePhonetic koellePhon = new ColognePhonetic();
53-
String[][] data = { { "Müller-Lüdenscheidt", "65752682" },
54-
{ "Breschnew", "17863" }, { "Wikipedia", "3412" } };
55-
74+
String[][] data = {{"Müller-Lüdenscheidt", "65752682"}, {"Breschnew", "17863"}, {"Wikipedia", "3412"}};
5675
for (int i = 0; i < data.length; i++) {
5776
assertEquals(data[i][1], koellePhon.colognePhonetic(data[i][0]));
5877
}
5978
}
6079

6180
public void testIsCologneEquals() {
6281
ColognePhonetic koellePhon = new ColognePhonetic();
63-
assertFalse("Cologne-phonetic encodings should not be equal",
64-
koellePhon.isCologneEqual("Meyer", "Müller"));
65-
assertTrue("Cologne-phonetic encodings should be equal",
66-
koellePhon.isCologneEqual("Meyer", "Mayr"));
82+
assertFalse("Cologne-phonetic encodings should not be equal", koellePhon.isCologneEqual("Meyer", "Müller"));
83+
assertTrue("Cologne-phonetic encodings should be equal", koellePhon.isCologneEqual("Meyer", "Mayr"));
6784
}
6885
}

0 commit comments

Comments
 (0)