[Nice-commit] Nice/testsuite/lib/java/util collections.testsuite,1.4,1.5
Brought to you by:
bonniot
From: <bo...@us...> - 2003-03-03 16:42:48
|
Update of /cvsroot/nice/Nice/testsuite/lib/java/util In directory sc8-pr-cvs1:/tmp/cvs-serv20382/testsuite/lib/java/util Modified Files: collections.testsuite Log Message: Sorting collections using an anonymous comparator. Index: collections.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/lib/java/util/collections.testsuite,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** collections.testsuite 5 Dec 2002 16:05:39 -0000 1.4 --- collections.testsuite 3 Mar 2003 16:42:43 -0000 1.5 *************** *** 23,24 **** --- 23,33 ---- alist.add(10); alist.remove(10); + + /// PASS + int[] a = [ 1, 10, 3 ]; + a.sort((int i, int j) => j - i); + assert a[0] == 10; + + String[] s = [ "a", "aa", "aaa" ]; + s.sort((String s1, String s2) => s2.length - s1.length); + assert s[0] == "aaa"; |