diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java index c101157d489..d848b1810fc 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java @@ -413,15 +413,9 @@ public abstract class CodegenTestCase extends KtUsefulTestCase { @NotNull protected GeneratedClassLoader createClassLoader() { ClassLoader classLoader; - if (configurationKind.getWithReflection() && configurationKind.getWithCoroutines()) { - classLoader = ForTestCompileRuntime.reflectAndCoroutinesJarClassLoader(); - } - else if (configurationKind.getWithReflection()) { + if (configurationKind.getWithReflection()) { classLoader = ForTestCompileRuntime.runtimeAndReflectJarClassLoader(); } - else if (configurationKind.getWithCoroutines()) { - classLoader = ForTestCompileRuntime.runtimeAndCoroutinesJarClassLoader(); - } else { classLoader = ForTestCompileRuntime.runtimeJarClassLoader(); } @@ -685,9 +679,6 @@ public abstract class CodegenTestCase extends KtUsefulTestCase { if (loadAndroidAnnotations) { javaClasspath.add(ForTestCompileRuntime.androidAnnotationsForTests().getPath()); } - if (configurationKind.getWithCoroutines()) { - javaClasspath.add(ForTestCompileRuntime.coroutinesJarForTests().getPath()); - } javaClassesOutputDirectory = CodegenTestUtil.compileJava( findJavaSourcesInDirectory(javaSourceDir), javaClasspath, javacOptions @@ -714,10 +705,8 @@ public abstract class CodegenTestCase extends KtUsefulTestCase { } } - return (addReflect && addCoroutines) ? ConfigurationKind.ALL : - addReflect ? ConfigurationKind.WITH_REFLECT : - addCoroutines ? ConfigurationKind.WITH_COROUTINES : - addRuntime ? ConfigurationKind.NO_KOTLIN_REFLECT : + return addReflect ? ConfigurationKind.ALL : + (addRuntime || addCoroutines) ? ConfigurationKind.NO_KOTLIN_REFLECT : ConfigurationKind.JDK_ONLY; } diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java index 240b6a13da0..f65b1c18449 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java @@ -19,19 +19,12 @@ import java.util.List; public class ForTestCompileRuntime { private static volatile SoftReference reflectJarClassLoader = new SoftReference<>(null); private static volatile SoftReference runtimeJarClassLoader = new SoftReference<>(null); - private static volatile SoftReference coroutinesJarClassLoader = new SoftReference<>(null); - private static volatile SoftReference coroutinesAndReflectJarClassLoader = new SoftReference<>(null); @NotNull public static File runtimeJarForTests() { return assertExists(new File("dist/kotlinc/lib/kotlin-stdlib.jar")); } - @NotNull - public static File coroutinesJarForTests() { - return assertExists(new File("dist/kotlin-stdlib-coroutines.jar")); - } - @NotNull public static File minimalRuntimeJarForTests() { return assertExists(new File("dist/kotlin-stdlib-minimal-for-test.jar")); @@ -114,36 +107,12 @@ public class ForTestCompileRuntime { public static synchronized ClassLoader runtimeAndReflectJarClassLoader() { ClassLoader loader = reflectJarClassLoader.get(); if (loader == null) { - loader = createClassLoader(runtimeJarForTests(), coroutinesJarForTests(), reflectJarForTests(), scriptRuntimeJarForTests(), - kotlinTestJarForTests()); + loader = createClassLoader(runtimeJarForTests(), reflectJarForTests(), scriptRuntimeJarForTests(), kotlinTestJarForTests()); reflectJarClassLoader = new SoftReference<>(loader); } return loader; } - @NotNull - public static synchronized ClassLoader runtimeAndCoroutinesJarClassLoader() { - ClassLoader loader = coroutinesJarClassLoader.get(); - if (loader == null) { - loader = createClassLoader(runtimeJarForTests(), coroutinesJarForTests(), scriptRuntimeJarForTests(), kotlinTestJarForTests()); - coroutinesJarClassLoader = new SoftReference<>(loader); - } - return loader; - } - - @NotNull - public static synchronized ClassLoader reflectAndCoroutinesJarClassLoader() { - ClassLoader loader = coroutinesAndReflectJarClassLoader.get(); - if (loader == null) { - loader = createClassLoader( - runtimeJarForTests(), reflectJarForTests(), coroutinesJarForTests(), - scriptRuntimeJarForTests(), kotlinTestJarForTests() - ); - coroutinesAndReflectJarClassLoader = new SoftReference<>(loader); - } - return loader; - } - @NotNull public static synchronized ClassLoader runtimeJarClassLoader() { ClassLoader loader = runtimeJarClassLoader.get(); diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/ConfigurationKind.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/test/ConfigurationKind.kt index 61949e6dae4..03f7662069e 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/ConfigurationKind.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/ConfigurationKind.kt @@ -8,8 +8,7 @@ package org.jetbrains.kotlin.test enum class ConfigurationKind( val withRuntime: Boolean = false, val withMockRuntime: Boolean = false, - val withReflection: Boolean = false, - val withCoroutines: Boolean = false + val withReflection: Boolean = false ) { /** JDK without any kotlin runtime */ JDK_NO_RUNTIME(), @@ -17,10 +16,6 @@ enum class ConfigurationKind( JDK_ONLY(withMockRuntime = true), /** JDK + kotlin runtime but without reflection */ NO_KOTLIN_REFLECT(withRuntime = true), - /** JDK + kotlin runtime + coroutines */ - WITH_COROUTINES(withCoroutines = true, withRuntime = true), /** JDK + kotlin runtime + kotlin reflection */ - WITH_REFLECT(withRuntime = true, withReflection = true), - /** JDK + kotlin runtime + kotlin reflection + coroutines */ - ALL(withRuntime = true, withReflection = true, withCoroutines = true) + ALL(withRuntime = true, withReflection = true) } diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java index 00f77bdb22c..673fa64e1b3 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java @@ -582,9 +582,6 @@ public class KotlinTestUtils { configuration.put(JVMConfigurationKeys.JDK_HOME, new File(System.getProperty("java.home"))); } - if (configurationKind.getWithCoroutines()) { - JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.coroutinesJarForTests()); - } if (configurationKind.getWithRuntime()) { JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.runtimeJarForTests()); JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.scriptRuntimeJarForTests()); diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.173 b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.173 index 21bf6a9465b..90ee151869e 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.173 +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.173 @@ -577,9 +577,6 @@ public class KotlinTestUtils { configuration.put(JVMConfigurationKeys.JDK_HOME, new File(System.getProperty("java.home"))); } - if (configurationKind.getWithCoroutines()) { - JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.coroutinesJarForTests()); - } if (configurationKind.getWithRuntime()) { JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.runtimeJarForTests()); JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.scriptRuntimeJarForTests()); diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as31 b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as31 index b6c1023160d..8f464669754 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as31 +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as31 @@ -577,9 +577,6 @@ public class KotlinTestUtils { JvmContentRootsKt.addJvmClasspathRoots(configuration, PathUtil.getJdkClassesRootsFromCurrentJre()); } - if (configurationKind.getWithCoroutines()) { - JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.coroutinesJarForTests()); - } if (configurationKind.getWithRuntime()) { JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.runtimeJarForTests()); JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.scriptRuntimeJarForTests()); diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as32 b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as32 index 11197abf954..70ef3cec62a 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as32 +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java.as32 @@ -577,9 +577,6 @@ public class KotlinTestUtils { JvmContentRootsKt.addJvmClasspathRoots(configuration, PathUtil.getJdkClassesRootsFromCurrentJre()); } - if (configurationKind.getWithCoroutines()) { - JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.coroutinesJarForTests()); - } if (configurationKind.getWithRuntime()) { JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.runtimeJarForTests()); JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.scriptRuntimeJarForTests()); diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt index 5c73c379d52..a131d6dc6e5 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt @@ -530,7 +530,7 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration compileKotlin( "release.kt", tmpdir, - listOf(library, ForTestCompileRuntime.coroutinesJarForTests()), + listOf(library), additionalOptions = listOf("-language-version", "1.3", "-api-version", "1.3") ) }