From 9e3453a44e0e2c0be379ecdc8f814530bc56adc7 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 6 Jun 2011 21:14:11 +0400 Subject: [PATCH] Tests fixed JET-85 Generate code for Java's fully qualified names -- is still open --- idea/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java | 2 +- idea/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java b/idea/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java index 063a39bfa95..b7128b97cfc 100644 --- a/idea/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java +++ b/idea/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java @@ -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")); diff --git a/idea/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java b/idea/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java index accd5b6b767..71369d938f8 100644 --- a/idea/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java +++ b/idea/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java @@ -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)); }