From d81c79b3bcdc0034540a3544e2634990daaa20f3 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Fri, 11 Aug 2023 23:51:04 +0200 Subject: [PATCH] Tests: fix language version in tests about PRE_RELEASE_CLASS Do not force language version to be LATEST_STABLE. There are now two versions of this test, one for K1 (LV <= 1.9) and another for K2 (LV >= 2.0), and language version is chosen automatically in `compileKotlin`. --- ...stractCompileKotlinAgainstCustomBinariesTest.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstCustomBinariesTest.kt b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstCustomBinariesTest.kt index db57994f89d..6459f04dbcc 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstCustomBinariesTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstCustomBinariesTest.kt @@ -124,10 +124,7 @@ abstract class AbstractCompileKotlinAgainstCustomBinariesTest : AbstractKotlinCo else -> throw UnsupportedOperationException(compiler.toString()) } - compileKotlin( - "source.kt", usageDestination, listOf(result), compiler, - additionalOptions.toList() + listOf("-language-version", LanguageVersion.LATEST_STABLE.versionString) - ) + compileKotlin("source.kt", usageDestination, listOf(result), compiler, additionalOptions.toList()) } // ------------------------------------------------------------------------------ @@ -247,7 +244,8 @@ abstract class AbstractCompileKotlinAgainstCustomBinariesTest : AbstractKotlinCo doTestBrokenLibrary("library", "test/A\$Anno.class") } - fun testReleaseCompilerAgainstPreReleaseLibrary() { + // KT-60780 K2: missing PRE_RELEASE_CLASS + fun testReleaseCompilerAgainstPreReleaseLibrary() = muteForK2 { doTestPreReleaseKotlinLibrary(K2JVMCompiler(), "library", tmpdir) } @@ -256,7 +254,8 @@ abstract class AbstractCompileKotlinAgainstCustomBinariesTest : AbstractKotlinCo // doTestPreReleaseKotlinLibrary(K2JSCompiler(), "library", File(tmpdir, "usage.js")) // } - fun testReleaseCompilerAgainstPreReleaseLibrarySkipPrereleaseCheck() { + // KT-60780 K2: missing PRE_RELEASE_CLASS + fun testReleaseCompilerAgainstPreReleaseLibrarySkipPrereleaseCheck() = muteForK2 { doTestPreReleaseKotlinLibrary(K2JVMCompiler(), "library", tmpdir, "-Xskip-prerelease-check") } @@ -265,7 +264,8 @@ abstract class AbstractCompileKotlinAgainstCustomBinariesTest : AbstractKotlinCo // doTestPreReleaseKotlinLibrary(K2JSCompiler(), "library", File(tmpdir, "usage.js"), "-Xskip-prerelease-check") // } - fun testReleaseCompilerAgainstPreReleaseLibrarySkipMetadataVersionCheck() { + // KT-60780 K2: missing PRE_RELEASE_CLASS + fun testReleaseCompilerAgainstPreReleaseLibrarySkipMetadataVersionCheck() = muteForK2 { doTestPreReleaseKotlinLibrary(K2JVMCompiler(), "library", tmpdir, "-Xskip-metadata-version-check") }