Skip to content

Commit 70e7d72

Browse files
committed
Clean up tests after debugging session.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1073487 13f79535-47bb-0310-9956-ffa450edef68
1 parent b9cab09 commit 70e7d72

1 file changed

Lines changed: 26 additions & 35 deletions

File tree

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

Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -93,42 +93,11 @@ public void testEdgeCases() {
9393
}
9494

9595
public void testExamples() {
96-
String[][] data = {{"Müller-Lüdenscheidt", "65752682"}, {"Breschnew", "17863"}, {"Wikipedia", "3412"}};
97-
this.checkEncodings(data);
98-
}
99-
100-
public void testHyphen() {
101-
this.checkEncoding("174845214", "bergisch-gladbach");
102-
// From the Javadoc example:
103-
this.checkEncoding("65752682", "Müller-Lüdenscheidt");
104-
}
105-
106-
public void testIsCologneEquals() {
107-
Assert.assertFalse("Cologne-phonetic encodings should not be equal", this.colognePhonetic.isCologneEqual("Meyer", "Müller"));
108-
Assert.assertTrue("Cologne-phonetic encodings should be equal", this.colognePhonetic.isCologneEqual("Meyer", "Mayr"));
109-
}
110-
111-
public void testIsCologneEqualsPhpData() {
112-
String[][] data = {
113-
{"house", "house"},
114-
{"House", "house"},
115-
{"Haus", "house"},
116-
{"ganz", "Gans"},
117-
{"ganz", "Gänse"},
118-
{"Miyagi", "Miyako"}};
119-
for (int i = 0; i < data.length; i++) {
120-
this.colognePhonetic.isCologneEqual(data[i][1], data[i][0]);
121-
}
122-
}
123-
124-
/**
125-
* Test data from http://repo.magdev.de/src/Text_ColognePhonetic-0.2.2/test/Text_ColognePhoneticTest.php
126-
*/
127-
public void testPhpData() {
12896
String[][] data = {
97+
{"Breschnew", "17863"},
98+
{"Wikipedia", "3412"},
12999
{"peter", "127"},
130100
{"pharma", "376"},
131-
{"bergisch-gladbach", "174845214"},
132101
{"mönchengladbach", "64645214"},
133102
{"deutsch", "28"},
134103
{"deutz", "28"},
@@ -143,9 +112,31 @@ public void testPhpData() {
143112
{"Arbeitsamt", "071862"},
144113
{"Eberhard", "0172"},
145114
{"Eberhardt", "0172"},
146-
{"heithabu", "021"},
147-
{"Müller-Lüdenscheidt", "65752682"},};
115+
{"heithabu", "021"}};
116+
this.checkEncodings(data);
117+
}
118+
119+
public void testHyphen() {
120+
String[][] data = {{"bergisch-gladbach", "174845214"}, {"Müller-Lüdenscheidt", "65752682"},
121+
// From the Javadoc example:
122+
{"Müller-Lüdenscheidt", "65752682"}};
148123
this.checkEncodings(data);
124+
125+
}
126+
127+
public void testIsCologneEquals() {
128+
String[][] data = {
129+
{"Meyer", "Müller"},
130+
{"Meyer", "Mayr"},
131+
{"house", "house"},
132+
{"House", "house"},
133+
{"Haus", "house"},
134+
{"ganz", "Gans"},
135+
{"ganz", "Gänse"},
136+
{"Miyagi", "Miyako"}};
137+
for (int i = 0; i < data.length; i++) {
138+
this.colognePhonetic.isCologneEqual(data[i][1], data[i][0]);
139+
}
149140
}
150141

151142
public void testVariations() {

0 commit comments

Comments
 (0)