[Nice-commit] Nice/testsuite/lib/nice/lang collections.testsuite,1.4,1.5
Brought to you by:
bonniot
From: <ar...@us...> - 2003-07-08 11:52:54
|
Update of /cvsroot/nice/Nice/testsuite/lib/nice/lang In directory sc8-pr-cvs1:/tmp/cvs-serv23848/F:/nice/testsuite/lib/nice/lang Modified Files: collections.testsuite Log Message: Fix the max function for negative values. Index: collections.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/lib/nice/lang/collections.testsuite,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** collections.testsuite 4 Mar 2003 17:08:56 -0000 1.4 --- collections.testsuite 8 Jul 2003 11:52:51 -0000 1.5 *************** *** 3,4 **** --- 3,16 ---- [0,1,2].foreach(int i => `assert`(i == count++)); assert count == 3; + + /// PASS + long[] array = [-3,-1,-2]; + assert array.max() == -1; + + /// PASS + long[] arr = []; + boolean b = false; + try { + arr.max(); + } catch (AssertionFailed x) { b = true; } + assert b; |