non-working test for 'for'

This commit is contained in:
Dmitry Jemerov
2011-04-15 12:10:22 +02:00
parent b30f6db5e6
commit c9072a1817
2 changed files with 18 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
import java.util.*
fun concat(l: List): String {
val sb = new StringBuilder()
for(s in l) {
sb.append(s)
}
s.toString()
}
@@ -2,6 +2,8 @@ package org.jetbrains.jet.codegen;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
/**
* @author yole
@@ -50,4 +52,11 @@ public class ControlStructuresTest extends CodegenTestCase {
assertEquals(5, main.invoke(null, "true"));
assertEquals(10, main.invoke(null, "false"));
}
public void _testFor() throws Exception {
loadFile("for.jet");
final Method main = generateFunction();
List<String> args = Arrays.asList("IntelliJ", " ", "IDEA");
assertEquals("IntelliJ IDEA", main.invoke(args));
}
}