[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
This commit is contained in:
Anton Lakotka
2023-09-01 14:42:51 +02:00
committed by Space Team
parent cc2be502f6
commit c7e4fa8654
@@ -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"