test that longer strings sort behind shorter strings

This commit is contained in:
Bas Leijdekkers
2011-08-19 15:43:13 +02:00
parent b2daf005c7
commit cef7da219e
@@ -83,8 +83,8 @@ public class StringUtilTest extends TestCase {
Collections.sort(strings, c);
assertEquals(Arrays.asList("1.2.9.1", "1.2.10.5", "tes0", "test", "test 3", "test0", "test1", "test2", "test10", "test10a",
"test011", "Test99", "test99", "testing"), strings);
final List<String> strings2 = new ArrayList(Arrays.asList("t1", "T2", "T1", "t2"));
final List<String> strings2 = new ArrayList(Arrays.asList("t1", "t001", "T2", "T002", "T1", "t2"));
Collections.sort(strings2, c);
assertEquals(Arrays.asList("T1", "t1", "T2", "t2"), strings2);
assertEquals(Arrays.asList("T1", "t1", "t001", "T2", "t2", "T002"), strings2);
}
}