diff --git a/compiler/testData/codegen/box/unsignedTypes/checkBasicUnsignedLiterals.kt b/compiler/testData/codegen/box/unsignedTypes/checkBasicUnsignedLiterals.kt index 00e1b52ed56..d52d3030a0e 100644 --- a/compiler/testData/codegen/box/unsignedTypes/checkBasicUnsignedLiterals.kt +++ b/compiler/testData/codegen/box/unsignedTypes/checkBasicUnsignedLiterals.kt @@ -1,5 +1,3 @@ -// !LANGUAGE: +InlineClasses -// !SKIP_METADATA_VERSION_CHECK // IGNORE_BACKEND: JVM_IR // WITH_UNSIGNED // TARGET_BACKEND: JVM diff --git a/compiler/testData/codegen/box/unsignedTypes/evaluateConstructorOfUnsignedType.kt b/compiler/testData/codegen/box/unsignedTypes/evaluateConstructorOfUnsignedType.kt index 271667b1d18..5bd2eae26cc 100644 --- a/compiler/testData/codegen/box/unsignedTypes/evaluateConstructorOfUnsignedType.kt +++ b/compiler/testData/codegen/box/unsignedTypes/evaluateConstructorOfUnsignedType.kt @@ -1,5 +1,3 @@ -// !LANGUAGE: +InlineClasses -// !SKIP_METADATA_VERSION_CHECK // IGNORE_BACKEND: JVM_IR // WITH_UNSIGNED // TARGET_BACKEND: JVM diff --git a/compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt b/compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt index 6300ee4c28f..847c2306849 100644 --- a/compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt +++ b/compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt @@ -1,5 +1,3 @@ -// !LANGUAGE: +InlineClasses -// !SKIP_METADATA_VERSION_CHECK // IGNORE_BACKEND: JVM_IR // WITH_UNSIGNED // TARGET_BACKEND: JVM diff --git a/compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt b/compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt index a2c9725eedf..7a51ebfa7de 100644 --- a/compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt +++ b/compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt @@ -1,5 +1,3 @@ -// !LANGUAGE: +InlineClasses -// !SKIP_METADATA_VERSION_CHECK // IGNORE_BACKEND: JVM_IR // WITH_UNSIGNED // IGNORE_BACKEND: JS, JS_IR diff --git a/compiler/testData/ir/irText/expressions/unsignedIntegerLiterals.kt b/compiler/testData/ir/irText/expressions/unsignedIntegerLiterals.kt index cce1c9bfd3a..bac0d082589 100644 --- a/compiler/testData/ir/irText/expressions/unsignedIntegerLiterals.kt +++ b/compiler/testData/ir/irText/expressions/unsignedIntegerLiterals.kt @@ -1,5 +1,3 @@ -// !LANGUAGE: +InlineClasses -// !SKIP_METADATA_VERSION_CHECK // WITH_UNSIGNED val testSimpleUIntLiteral = 1u diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java index d15210255cc..ed6b9ddc7f8 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java @@ -68,6 +68,7 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; +import static org.jetbrains.kotlin.checkers.CompilerTestLanguageVersionSettingsKt.API_VERSION_DIRECTIVE; import static org.jetbrains.kotlin.checkers.CompilerTestLanguageVersionSettingsKt.parseLanguageVersionSettings; import static org.jetbrains.kotlin.cli.common.output.outputUtils.OutputUtilsKt.writeAllTo; import static org.jetbrains.kotlin.codegen.CodegenTestUtil.*; @@ -196,9 +197,16 @@ public abstract class CodegenTestCase extends KtUsefulTestCase { } Map directives = KotlinTestUtils.parseDirectives(testFile.content); + + if (InTextDirectivesUtils.isDirectiveDefined(testFile.content, "WITH_UNSIGNED")) { + assertDirectivesToNull(explicitLanguageVersionSettings, explicitLanguageVersion); + explicitLanguageVersion = LanguageVersion.KOTLIN_1_3; + directives.put(API_VERSION_DIRECTIVE, ApiVersion.KOTLIN_1_3.getVersionString()); + } + LanguageVersionSettings fileLanguageVersionSettings = parseLanguageVersionSettings(directives); if (fileLanguageVersionSettings != null) { - assertDirectivesToNull(explicitLanguageVersionSettings, explicitLanguageVersion); + assertDirectivesToNull(explicitLanguageVersionSettings, null); explicitLanguageVersionSettings = fileLanguageVersionSettings; } }