Update of /cvsroot/nice/Nice/testsuite/compiler/statements/loops
In directory sc8-pr-cvs1:/tmp/cvs-serv7633/F:/nice/testsuite/compiler/statements/loops
Modified Files:
newforloop.testsuite
Log Message:
Type declaration in enhanced for loop is now optional.
Index: newforloop.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/statements/loops/newforloop.testsuite,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** newforloop.testsuite 11 Mar 2003 17:19:28 -0000 1.1
--- newforloop.testsuite 9 Aug 2003 10:51:47 -0000 1.2
***************
*** 30,31 ****
--- 30,43 ----
assert(j==10);
+ /// PASS
+ String[] arr = ["a","bc","def","ghij","klmno"];
+ String t = "";
+ for (s : arr) t+=s;
+ assert(t.equals("abcdefghijklmno"));
+
+ /// PASS
+ int[][] array2 = [[1,2],[3,4]];
+ int j = 0;
+ for(array3 : array2)
+ for(i : array3) j+=i;
+ assert(j==10);
|