From c7e4fa86548d676f0454b79adc4dfe3a1d35a385 Mon Sep 17 00:00:00 2001 From: Anton Lakotka Date: Fri, 1 Sep 2023 14:42:51 +0200 Subject: [PATCH] [K2, Gradle, Test]: Remove check for languageVersion=2.0 in tests Since Kotlin default version is already 2.0 then this check can be removed. ^KT-60860 Fixed --- .../KotlinNativeCompileArgumentsTest.kt | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/unitTests/compilerArgumetns/KotlinNativeCompileArgumentsTest.kt b/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/unitTests/compilerArgumetns/KotlinNativeCompileArgumentsTest.kt index 85ae3b7f0b3..26962ed4f79 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/unitTests/compilerArgumetns/KotlinNativeCompileArgumentsTest.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/unitTests/compilerArgumetns/KotlinNativeCompileArgumentsTest.kt @@ -9,7 +9,6 @@ package org.jetbrains.kotlin.gradle.unitTests.compilerArgumetns import org.jetbrains.kotlin.cli.common.arguments.K2NativeCompilerArguments import org.jetbrains.kotlin.compilerRunner.ArgumentUtils -import org.jetbrains.kotlin.config.LanguageVersion import org.jetbrains.kotlin.gradle.dsl.KotlinVersion import org.jetbrains.kotlin.gradle.dsl.multiplatformExtension import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext.Companion.default @@ -119,11 +118,6 @@ class KotlinNativeCompileArgumentsTest { val sharedNativeCompileTask = sharedNativeCompilation.compileTaskProvider.get() as KotlinNativeCompile val arguments = sharedNativeCompileTask.createCompilerArguments(lenient) - assertTrue( - LanguageVersion.fromVersionString(arguments.languageVersion)!! >= LanguageVersion.KOTLIN_2_0, - "Expected 'languageVersion' 2.0 or higher" - ) - assertNull( arguments.fragments?.toList(), "Expected 'fragments' to *not* be set: Metadata compilations shall use -Xcommon-sources and provide klib dependencies" @@ -176,11 +170,6 @@ class KotlinNativeCompileArgumentsTest { val sharedNativeCompileTask = nativeCompilation.compileTaskProvider.get() as KotlinNativeCompile val arguments = sharedNativeCompileTask.createCompilerArguments(lenient) - assertTrue( - LanguageVersion.fromVersionString(arguments.languageVersion)!! >= LanguageVersion.KOTLIN_2_0, - "Expected 'languageVersion' 2.0 or higher" - ) - assertNull( arguments.commonSources?.toList(), "Expected 'commonSources' to not be set: Native Platform compilations shall use -Xfragment{x} arguments"