non-working test for 'for'
This commit is contained in:
@@ -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.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author yole
|
* @author yole
|
||||||
@@ -50,4 +52,11 @@ public class ControlStructuresTest extends CodegenTestCase {
|
|||||||
assertEquals(5, main.invoke(null, "true"));
|
assertEquals(5, main.invoke(null, "true"));
|
||||||
assertEquals(10, main.invoke(null, "false"));
|
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user