Tests fixed

JET-85 Generate code for Java's fully qualified names -- is still open
This commit is contained in:
Andrey Breslav
2011-06-06 21:14:11 +04:00
parent 8cffea6bc2
commit 9e3453a44e
2 changed files with 2 additions and 2 deletions
@@ -70,7 +70,7 @@ public class ControlStructuresTest extends CodegenTestCase {
}
public void testCondJumpOnStack() throws Exception {
loadText("fun foo(a: String): Int = if (java.lang.Boolean.parseBoolean(a)) 5 else 10");
loadText("import java.lang.Boolean as jlBoolean; fun foo(a: String): Int = if (jlBoolean.parseBoolean(a)) 5 else 10");
final Method main = generateFunction();
assertEquals(5, main.invoke(null, "true"));
assertEquals(10, main.invoke(null, "false"));
@@ -123,7 +123,7 @@ public class PrimitiveTypesTest extends CodegenTestCase {
}
public void testDoubleToJava() throws Exception {
loadText("fun foo(d: Double): String? = java.lang.Double.toString(d)");
loadText("import java.lang.Double as jlDouble; fun foo(d: Double): String? = jlDouble.toString(d)");
final Method main = generateFunction();
assertEquals("1.0", main.invoke(null, 1.0));
}