diff --git a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java index 566a2f5cf6c..b9fa937a904 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java @@ -23,6 +23,7 @@ import java.awt.*; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; +import java.util.Arrays; import static org.jetbrains.jet.codegen.CodegenTestUtil.assertIsCurrentTime; @@ -31,7 +32,7 @@ public class NamespaceGenTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.ALL); + createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY); } public void testPSVM() throws Exception { @@ -286,10 +287,11 @@ public class NamespaceGenTest extends CodegenTestCase { assertEquals(239, main.invoke(null, new Object[]{null})); } - public void _testVarargs() throws Exception { + public void testVarargs() throws Exception { loadText("fun foo() = java.util.Arrays.asList(\"IntelliJ\", \"IDEA\")"); final Method main = generateFunction(); - ArrayList arrayList = (ArrayList) main.invoke(null); + java.util.List list = (java.util.List) main.invoke(null); + assertEquals(Arrays.asList("IntelliJ", "IDEA"), list); } public void testFieldRead() throws Exception { @@ -441,10 +443,6 @@ public class NamespaceGenTest extends CodegenTestCase { blackBoxFile("checkCast.kt"); } - public void testTypeCastException() throws Exception { - blackBoxFile("typeCastException.kt"); - } - public void testPutBooleanAsVoid() throws Exception { loadText("class C(val x: Int) { { x > 0 } } fun box() { val c = C(0) } "); final Method main = generateFunction(); diff --git a/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java b/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java index 1f3ea34a8d1..9b9868d0048 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java @@ -371,4 +371,8 @@ public class StdlibTest extends CodegenTestCase { public void testKt1515() { blackBoxMultiFile("/multi/kt1515/thisPackage.kt", "/multi/kt1515/otherPackage.kt"); } + + public void testTypeCastException() { + blackBoxFile("typeCastException.kt"); + } }