failing test for 'for ... in' on array

This commit is contained in:
Dmitry Jemerov
2011-04-15 13:48:06 +02:00
parent 706b844eb3
commit 4987b8460c
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
fun concat(l: Array<String>): String {
val sb = new StringBuilder()
for(s in l) {
sb.append(s)
}
s.toString()
}
@@ -77,4 +77,11 @@ public class ControlStructuresTest extends CodegenTestCase {
List<String> args = Arrays.asList("IntelliJ", " ", "IDEA");
assertEquals("IntelliJ IDEA", main.invoke(args));
}
public void testForInArray() throws Exception {
loadFile("forInArray.jet");
final Method main = generateFunction();
String[] args = new String[] { "IntelliJ", " ", "IDEA" };
assertEquals("IntelliJ IDEA", main.invoke(args));
}
}