From fddb205e168fab7830b258064a5e03a97adea35c Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Mon, 10 Jan 2022 18:30:04 +0100 Subject: [PATCH] KotlinJpsBuildTest#testJre9: migrate to JDK 11 Possibility to use JDK 9 was dropped in the Kotlin repo in this commit de7fb9606a3840954af2678e096441c92502d8ad so I had to migrate this test. Consulted with @udalov. He said that it's fine to migrate this test to JDK 11 --- .../org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt | 8 ++++---- .../testData/general/{Jre9 => Jre11}/kotlinProject.iml | 0 .../testData/general/{Jre9 => Jre11}/kotlinProject.ipr | 0 .../testData/general/{Jre9 => Jre11}/src/test.kt | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename jps/jps-plugin/testData/general/{Jre9 => Jre11}/kotlinProject.iml (100%) rename jps/jps-plugin/testData/general/{Jre9 => Jre11}/kotlinProject.ipr (100%) rename jps/jps-plugin/testData/general/{Jre9 => Jre11}/src/test.kt (100%) diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt index bec4422b0fa..8532229cf94 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt @@ -931,11 +931,11 @@ open class KotlinJpsBuildTest : KotlinJpsBuildTestBase() { KotlinTestUtils.assertEqualsToFile(expectedFile, actual.toString()) } - fun testJre9() { - val jdk9Path = KtTestUtil.getJdk9Home().absolutePath + fun testJre11() { + val jdk11Path = KtTestUtil.getJdk11Home().absolutePath - val jdk = myModel.global.addSdk(JDK_NAME, jdk9Path, "9", JpsJavaSdkType.INSTANCE) - jdk.addRoot(StandardFileSystems.JRT_PROTOCOL_PREFIX + jdk9Path + URLUtil.JAR_SEPARATOR + "java.base", JpsOrderRootType.COMPILED) + val jdk = myModel.global.addSdk(JDK_NAME, jdk11Path, "11", JpsJavaSdkType.INSTANCE) + jdk.addRoot(StandardFileSystems.JRT_PROTOCOL_PREFIX + jdk11Path + URLUtil.JAR_SEPARATOR + "java.base", JpsOrderRootType.COMPILED) loadProject(workDir.absolutePath + File.separator + PROJECT_NAME + ".ipr") addKotlinStdlibDependency() diff --git a/jps/jps-plugin/testData/general/Jre9/kotlinProject.iml b/jps/jps-plugin/testData/general/Jre11/kotlinProject.iml similarity index 100% rename from jps/jps-plugin/testData/general/Jre9/kotlinProject.iml rename to jps/jps-plugin/testData/general/Jre11/kotlinProject.iml diff --git a/jps/jps-plugin/testData/general/Jre9/kotlinProject.ipr b/jps/jps-plugin/testData/general/Jre11/kotlinProject.ipr similarity index 100% rename from jps/jps-plugin/testData/general/Jre9/kotlinProject.ipr rename to jps/jps-plugin/testData/general/Jre11/kotlinProject.ipr diff --git a/jps/jps-plugin/testData/general/Jre9/src/test.kt b/jps/jps-plugin/testData/general/Jre11/src/test.kt similarity index 100% rename from jps/jps-plugin/testData/general/Jre9/src/test.kt rename to jps/jps-plugin/testData/general/Jre11/src/test.kt