Skip to content

Commit 92fab79

Browse files
committed
Sort methods AB.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1154433 13f79535-47bb-0310-9956-ffa450edef68
1 parent e3b7364 commit 92fab79

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

src/test/org/apache/commons/codec/language/bm/RuleTest.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@
3131
* @since 2.0
3232
*/
3333
public class RuleTest {
34+
private static class NegativeIntegerBaseMatcher extends BaseMatcher<Integer> {
35+
public void describeTo(Description description) {
36+
description.appendText("value should be negative");
37+
}
38+
39+
public boolean matches(Object item) {
40+
return ((Integer) item) < 0;
41+
}
42+
}
43+
3444
private Rule.Phoneme[][] makePhonemes() {
3545
String[][] words = {
3646
{ "rinD", "rinDlt", "rina", "rinalt", "rino", "rinolt", "rinu", "rinult" },
@@ -48,15 +58,6 @@ private Rule.Phoneme[][] makePhonemes() {
4858
return phonemes;
4959
}
5060

51-
@Test
52-
public void phonemeComparedToSelfIsZero() {
53-
for (Rule.Phoneme[] phs : makePhonemes()) {
54-
for (Rule.Phoneme ph : phs) {
55-
assertEquals("Phoneme compared to itself should be zero: " + ph.getPhonemeText(), 0, ph.compareTo(ph));
56-
}
57-
}
58-
}
59-
6061
@Test
6162
public void phonemeComparedToLaterIsNegative() {
6263
for (Rule.Phoneme[] phs : makePhonemes()) {
@@ -71,13 +72,12 @@ public void phonemeComparedToLaterIsNegative() {
7172
}
7273
}
7374

74-
private static class NegativeIntegerBaseMatcher extends BaseMatcher<Integer> {
75-
public boolean matches(Object item) {
76-
return ((Integer) item) < 0;
77-
}
78-
79-
public void describeTo(Description description) {
80-
description.appendText("value should be negative");
75+
@Test
76+
public void phonemeComparedToSelfIsZero() {
77+
for (Rule.Phoneme[] phs : makePhonemes()) {
78+
for (Rule.Phoneme ph : phs) {
79+
assertEquals("Phoneme compared to itself should be zero: " + ph.getPhonemeText(), 0, ph.compareTo(ph));
80+
}
8181
}
8282
}
8383
}

0 commit comments

Comments
 (0)