diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index fe8bafd973c..3918816e075 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -11,6 +11,7 @@ import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.util.regex.Pattern; @@ -41680,6 +41681,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } @Nested + @Tag("") @TestMetadata("compiler/testData/codegen/box/testsWithJava15") @TestDataPath("$PROJECT_ROOT") public class TestsWithJava15 { @@ -41760,6 +41762,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } @Nested + @Tag("") @TestMetadata("compiler/testData/codegen/box/testsWithJava9") @TestDataPath("$PROJECT_ROOT") public class TestsWithJava9 { diff --git a/compiler/testData/codegen/box/testsWithJava15/_tags.txt b/compiler/testData/codegen/box/testsWithJava15/_tags.txt new file mode 100644 index 00000000000..167aa007616 --- /dev/null +++ b/compiler/testData/codegen/box/testsWithJava15/_tags.txt @@ -0,0 +1 @@ + diff --git a/compiler/testData/codegen/box/testsWithJava15/records/bytecodeShapeForJava.kt b/compiler/testData/codegen/box/testsWithJava15/records/bytecodeShapeForJava.kt index ddbd77508f6..c1cd2657e8f 100644 --- a/compiler/testData/codegen/box/testsWithJava15/records/bytecodeShapeForJava.kt +++ b/compiler/testData/codegen/box/testsWithJava15/records/bytecodeShapeForJava.kt @@ -1,6 +1,5 @@ // !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport -// JVM_TARGET: 15 // ENABLE_JVM_PREVIEW // FILE: JavaClass.java public class JavaClass { diff --git a/compiler/testData/codegen/box/testsWithJava15/records/collectionSizeOverrides.kt b/compiler/testData/codegen/box/testsWithJava15/records/collectionSizeOverrides.kt index aaf0d2b4621..a62eab808c0 100644 --- a/compiler/testData/codegen/box/testsWithJava15/records/collectionSizeOverrides.kt +++ b/compiler/testData/codegen/box/testsWithJava15/records/collectionSizeOverrides.kt @@ -1,6 +1,5 @@ // !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport -// JVM_TARGET: 15 // ENABLE_JVM_PREVIEW @JvmRecord diff --git a/compiler/testData/codegen/box/testsWithJava15/records/dataJvmRecord.kt b/compiler/testData/codegen/box/testsWithJava15/records/dataJvmRecord.kt index 4b3d26a5e03..811c5725792 100644 --- a/compiler/testData/codegen/box/testsWithJava15/records/dataJvmRecord.kt +++ b/compiler/testData/codegen/box/testsWithJava15/records/dataJvmRecord.kt @@ -1,6 +1,5 @@ // !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport -// JVM_TARGET: 15 // ENABLE_JVM_PREVIEW @JvmRecord diff --git a/compiler/testData/codegen/box/testsWithJava15/records/jvmRecordBinary.kt b/compiler/testData/codegen/box/testsWithJava15/records/jvmRecordBinary.kt index 2a6571f1fd6..2786d1ee09c 100644 --- a/compiler/testData/codegen/box/testsWithJava15/records/jvmRecordBinary.kt +++ b/compiler/testData/codegen/box/testsWithJava15/records/jvmRecordBinary.kt @@ -1,6 +1,5 @@ // !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport -// JVM_TARGET: 15 // ENABLE_JVM_PREVIEW // MODULE: lib diff --git a/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverrides.kt b/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverrides.kt index 637e842b415..fc5732c6682 100644 --- a/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverrides.kt +++ b/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverrides.kt @@ -1,6 +1,5 @@ // !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport -// JVM_TARGET: 15 // ENABLE_JVM_PREVIEW // FILE: JavaClass.java diff --git a/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverridesAllCompatibilityJvmDefault.kt b/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverridesAllCompatibilityJvmDefault.kt index c0ffda1447b..545c08b3bff 100644 --- a/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverridesAllCompatibilityJvmDefault.kt +++ b/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverridesAllCompatibilityJvmDefault.kt @@ -1,6 +1,5 @@ // !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport -// JVM_TARGET: 15 // ENABLE_JVM_PREVIEW // !JVM_DEFAULT_MODE: all-compatibility diff --git a/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverridesEnableJvmDefault.kt b/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverridesEnableJvmDefault.kt index d3cd96abdd3..39e4a9094fd 100644 --- a/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverridesEnableJvmDefault.kt +++ b/compiler/testData/codegen/box/testsWithJava15/records/propertiesOverridesEnableJvmDefault.kt @@ -1,6 +1,5 @@ // !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport -// JVM_TARGET: 15 // ENABLE_JVM_PREVIEW // !JVM_DEFAULT_MODE: enable diff --git a/compiler/testData/codegen/box/testsWithJava15/records/recordDifferentPropertyOverride.kt b/compiler/testData/codegen/box/testsWithJava15/records/recordDifferentPropertyOverride.kt index 56141cb269f..9851a7ace63 100644 --- a/compiler/testData/codegen/box/testsWithJava15/records/recordDifferentPropertyOverride.kt +++ b/compiler/testData/codegen/box/testsWithJava15/records/recordDifferentPropertyOverride.kt @@ -1,4 +1,3 @@ -// JVM_TARGET: 15 // ENABLE_JVM_PREVIEW // FILE: MyRec.java public record MyRec(String name) implements KI { diff --git a/compiler/testData/codegen/box/testsWithJava15/records/recordDifferentSyntheticProperty.kt b/compiler/testData/codegen/box/testsWithJava15/records/recordDifferentSyntheticProperty.kt index ff3604c49ba..bc1122e1707 100644 --- a/compiler/testData/codegen/box/testsWithJava15/records/recordDifferentSyntheticProperty.kt +++ b/compiler/testData/codegen/box/testsWithJava15/records/recordDifferentSyntheticProperty.kt @@ -1,4 +1,3 @@ -// JVM_TARGET: 15 // ENABLE_JVM_PREVIEW // FILE: MyRec.java public record MyRec(String name) { diff --git a/compiler/testData/codegen/box/testsWithJava15/records/recordPropertyAccess.kt b/compiler/testData/codegen/box/testsWithJava15/records/recordPropertyAccess.kt index ef7fb26d562..e8e3d869b77 100644 --- a/compiler/testData/codegen/box/testsWithJava15/records/recordPropertyAccess.kt +++ b/compiler/testData/codegen/box/testsWithJava15/records/recordPropertyAccess.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +JvmRecordSupport -// JVM_TARGET: 15 // ENABLE_JVM_PREVIEW // FILE: MyRec.java public record MyRec(String name) {} diff --git a/compiler/testData/codegen/box/testsWithJava9/_tags.txt b/compiler/testData/codegen/box/testsWithJava9/_tags.txt new file mode 100644 index 00000000000..167aa007616 --- /dev/null +++ b/compiler/testData/codegen/box/testsWithJava9/_tags.txt @@ -0,0 +1 @@ + diff --git a/compiler/testData/codegen/box/testsWithJava9/concatDynamic.kt b/compiler/testData/codegen/box/testsWithJava9/concatDynamic.kt index 9caace5f1cf..bfbb5dd993a 100644 --- a/compiler/testData/codegen/box/testsWithJava9/concatDynamic.kt +++ b/compiler/testData/codegen/box/testsWithJava9/concatDynamic.kt @@ -1,5 +1,4 @@ // STRING_CONCAT: indy-with-constants -// JVM_TARGET: 9 fun box(): String { val p = 3147483648u val a = "_" diff --git a/compiler/testData/codegen/box/testsWithJava9/concatDynamic200.kt b/compiler/testData/codegen/box/testsWithJava9/concatDynamic200.kt index a578702d107..8d4cc3acf13 100644 --- a/compiler/testData/codegen/box/testsWithJava9/concatDynamic200.kt +++ b/compiler/testData/codegen/box/testsWithJava9/concatDynamic200.kt @@ -1,5 +1,4 @@ // STRING_CONCAT: indy-with-constants -// JVM_TARGET: 9 fun box(): String { val z = "0" val result = z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + diff --git a/compiler/testData/codegen/box/testsWithJava9/concatDynamic200Long.kt b/compiler/testData/codegen/box/testsWithJava9/concatDynamic200Long.kt index cf2030d8f21..6e1f2c0209e 100644 --- a/compiler/testData/codegen/box/testsWithJava9/concatDynamic200Long.kt +++ b/compiler/testData/codegen/box/testsWithJava9/concatDynamic200Long.kt @@ -1,5 +1,4 @@ // STRING_CONCAT: indy-with-constants -// JVM_TARGET: 9 fun test(z: Long): String { val result = "" + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + diff --git a/compiler/testData/codegen/box/testsWithJava9/concatDynamic201.kt b/compiler/testData/codegen/box/testsWithJava9/concatDynamic201.kt index 3af9e28b933..feca7825d0f 100644 --- a/compiler/testData/codegen/box/testsWithJava9/concatDynamic201.kt +++ b/compiler/testData/codegen/box/testsWithJava9/concatDynamic201.kt @@ -1,5 +1,4 @@ // STRING_CONCAT: indy-with-constants -// JVM_TARGET: 9 fun box(): String { val z = "0" val result = z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + diff --git a/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200.kt b/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200.kt index fbeedac6dd5..40484476c98 100644 --- a/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200.kt +++ b/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200.kt @@ -1,5 +1,4 @@ // STRING_CONCAT: indy -// JVM_TARGET: 9 fun box(): String { val z = "0" val result = z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + diff --git a/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200Long.kt b/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200Long.kt index 59fa607e454..d6b2794123f 100644 --- a/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200Long.kt +++ b/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200Long.kt @@ -1,5 +1,4 @@ // STRING_CONCAT: indy -// JVM_TARGET: 9 fun test(z: Long): String { val result = "" + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + diff --git a/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy201.kt b/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy201.kt index 8362eea5604..a8520b8aae9 100644 --- a/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy201.kt +++ b/compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy201.kt @@ -1,5 +1,4 @@ // STRING_CONCAT: indy -// JVM_TARGET: 9 fun box(): String { val z = "0" val result = z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + diff --git a/compiler/testData/codegen/box/testsWithJava9/concatDynamicInlineClasses.kt b/compiler/testData/codegen/box/testsWithJava9/concatDynamicInlineClasses.kt index 7e402ca49d9..0c38cc69d0b 100644 --- a/compiler/testData/codegen/box/testsWithJava9/concatDynamicInlineClasses.kt +++ b/compiler/testData/codegen/box/testsWithJava9/concatDynamicInlineClasses.kt @@ -1,5 +1,4 @@ // STRING_CONCAT: indy-with-constants -// JVM_TARGET: 9 inline class Str(val s: String) inline class NStr(val s: String?) diff --git a/compiler/testData/codegen/box/testsWithJava9/concatDynamicSpecialSymbols.kt b/compiler/testData/codegen/box/testsWithJava9/concatDynamicSpecialSymbols.kt index e4b68fd14e0..0a652f8d1f3 100644 --- a/compiler/testData/codegen/box/testsWithJava9/concatDynamicSpecialSymbols.kt +++ b/compiler/testData/codegen/box/testsWithJava9/concatDynamicSpecialSymbols.kt @@ -1,4 +1,3 @@ -// JVM_TARGET: 9 fun test(a: String, b: String?): String { return a + "\u0001" + 2.toChar() + 3.toChar() + 4L + b + 5.0 + 6F + '7' + b + "\u0002" + 1.toChar() diff --git a/compiler/testData/codegen/box/testsWithJava9/concatDynamicWithInline.kt b/compiler/testData/codegen/box/testsWithJava9/concatDynamicWithInline.kt index 40671b2324f..b14fce28ab3 100644 --- a/compiler/testData/codegen/box/testsWithJava9/concatDynamicWithInline.kt +++ b/compiler/testData/codegen/box/testsWithJava9/concatDynamicWithInline.kt @@ -1,5 +1,4 @@ // STRING_CONCAT: indy-with-constants -// JVM_TARGET: 9 inline fun test(crossinline s: (String) -> String): String { var result = "1" + s("2") + "3" + 4 + { "5" + s("6") + "7" diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index f757261ae98..bfae5b499bf 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -11,6 +11,7 @@ import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.util.regex.Pattern; @@ -41524,6 +41525,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } @Nested + @Tag("") @TestMetadata("compiler/testData/codegen/box/testsWithJava15") @TestDataPath("$PROJECT_ROOT") public class TestsWithJava15 { @@ -41604,6 +41606,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } @Nested + @Tag("") @TestMetadata("compiler/testData/codegen/box/testsWithJava9") @TestDataPath("$PROJECT_ROOT") public class TestsWithJava9 { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index b58ed6a7fd9..18ce151a92b 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -11,6 +11,7 @@ import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.util.regex.Pattern; @@ -41680,6 +41681,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } @Nested + @Tag("") @TestMetadata("compiler/testData/codegen/box/testsWithJava15") @TestDataPath("$PROJECT_ROOT") public class TestsWithJava15 { @@ -41760,6 +41762,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } @Nested + @Tag("") @TestMetadata("compiler/testData/codegen/box/testsWithJava9") @TestDataPath("$PROJECT_ROOT") public class TestsWithJava9 { diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractJvmBlackBoxCodegenTestBase.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractJvmBlackBoxCodegenTestBase.kt index 79d1912aa32..b51fa993cae 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractJvmBlackBoxCodegenTestBase.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractJvmBlackBoxCodegenTestBase.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.test.runners.codegen +import org.jetbrains.kotlin.config.JvmTarget import org.jetbrains.kotlin.test.Constructor import org.jetbrains.kotlin.test.TargetBackend import org.jetbrains.kotlin.test.TestJdkKind @@ -13,12 +14,12 @@ import org.jetbrains.kotlin.test.backend.handlers.BytecodeListingHandler import org.jetbrains.kotlin.test.backend.handlers.BytecodeTextHandler import org.jetbrains.kotlin.test.bind import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder -import org.jetbrains.kotlin.test.directives.CodegenTestDirectives import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.IGNORE_DEXING import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.USE_JAVAC_BASED_ON_JVM_TARGET import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.DIAGNOSTICS import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.REPORT_ONLY_EXPLICITLY_DEFINED_DEBUG_INFO import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.JDK_KIND +import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.JVM_TARGET import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.WITH_STDLIB import org.jetbrains.kotlin.test.frontend.classic.handlers.ClassicDiagnosticsHandler import org.jetbrains.kotlin.test.frontend.fir.handlers.FirDiagnosticsHandler @@ -56,19 +57,20 @@ abstract class AbstractJvmBlackBoxCodegenTestBase") @UseTechnicalNames abstract class CustomJvmTargetOnJvmBaseTest