Redefine configuration kinds, so that the most of test dependent on JDK_ONLY now use mock kotlin runtime:
MOCK_RUNTIME -> JDK_ONLY JDK_ONLY -> JDK_NO_RUNTIME
This commit is contained in:
@@ -21,8 +21,12 @@ enum class ConfigurationKind(
|
||||
val withMockRuntime: Boolean = false,
|
||||
val withReflection: Boolean = false
|
||||
) {
|
||||
JDK_ONLY(),
|
||||
MOCK_RUNTIME(withMockRuntime = true),
|
||||
/** JDK without any kotlin runtime */
|
||||
JDK_NO_RUNTIME(),
|
||||
/** JDK + light mock kotlin runtime */
|
||||
JDK_ONLY(withMockRuntime = true),
|
||||
/** JDK + kotlin runtime but without reflection */
|
||||
NO_KOTLIN_REFLECT(withRuntime = true),
|
||||
/** JDK + kotlin runtime + kotlin reflection */
|
||||
ALL(withRuntime = true, withReflection = true),
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public abstract class KotlinMultiFileTestWithJava<M, F> extends KotlinTestWithEn
|
||||
|
||||
@NotNull
|
||||
protected ConfigurationKind getConfigurationKind() {
|
||||
return ConfigurationKind.MOCK_RUNTIME;
|
||||
return ConfigurationKind.JDK_ONLY;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -179,7 +179,7 @@ class KotlinCliJavaFileManagerTest : KotlinTestWithEnvironment() {
|
||||
javaFilesDir = KotlinTestUtils.tmpDir("java-file-manager-test")
|
||||
|
||||
val configuration = KotlinTestUtils.newConfiguration(
|
||||
ConfigurationKind.MOCK_RUNTIME, TestJdkKind.MOCK_JDK, emptyList(), listOf(javaFilesDir!!)
|
||||
ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK, emptyList(), listOf(javaFilesDir!!)
|
||||
)
|
||||
|
||||
return KotlinCoreEnvironment.createForTests(testRootDisposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES)
|
||||
|
||||
@@ -60,7 +60,7 @@ import static org.jetbrains.kotlin.builtins.KotlinBuiltIns.*;
|
||||
public class LoadBuiltinsTest extends KotlinTestWithEnvironment {
|
||||
@Override
|
||||
protected KotlinCoreEnvironment createEnvironment() {
|
||||
return createEnvironmentWithJdk(ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK);
|
||||
return createEnvironmentWithJdk(ConfigurationKind.JDK_NO_RUNTIME, TestJdkKind.MOCK_JDK);
|
||||
}
|
||||
|
||||
public void testBuiltIns() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user