Basic -Xrelease option support
#KT-29974 Fixed
This commit is contained in:
+10
@@ -388,6 +388,16 @@ default: `indy-with-constants` for JVM target 9 or greater, `inline` otherwise""
|
||||
)
|
||||
var stringConcat: String? by NullableStringFreezableVar(null)
|
||||
|
||||
@Argument(
|
||||
value = "-Xrelease",
|
||||
valueDescription = "Supported versions depend on used JDK",
|
||||
description = """
|
||||
Compile against specified JDK API. Supported versions depend on used JDK
|
||||
"""
|
||||
)
|
||||
var release: String? by NullableStringFreezableVar(null)
|
||||
|
||||
|
||||
@Argument(
|
||||
value = "-Xsam-conversions",
|
||||
valueDescription = "{class|indy}",
|
||||
|
||||
@@ -55,7 +55,8 @@ class ClasspathRootsResolver(
|
||||
private val javaModuleFinder: CliJavaModuleFinder,
|
||||
private val requireStdlibModule: Boolean,
|
||||
private val outputDirectory: VirtualFile?,
|
||||
private val javaFileManager: KotlinCliJavaFileManager
|
||||
private val javaFileManager: KotlinCliJavaFileManager,
|
||||
private val release: Int
|
||||
) {
|
||||
val javaModuleGraph = JavaModuleGraph(javaModuleFinder)
|
||||
|
||||
@@ -124,8 +125,15 @@ class ClasspathRootsResolver(
|
||||
modules += module
|
||||
}
|
||||
}
|
||||
|
||||
addModularRoots(modules, result)
|
||||
if (release <= 0 || release >= 9) {
|
||||
addModularRoots(modules, result)
|
||||
} else {
|
||||
//TODO: see also `addJvmSdkRoots` usages, some refactoring is required with moving such logic into one place
|
||||
val listFoldersForRelease = javaModuleFinder.listFoldersForRelease(release)
|
||||
listFoldersForRelease.forEach {
|
||||
result += JavaRoot(it, JavaRoot.RootType.BINARY_SIG)
|
||||
}
|
||||
}
|
||||
|
||||
return RootsAndModules(result, modules)
|
||||
}
|
||||
|
||||
@@ -241,6 +241,9 @@ class KotlinCoreEnvironment private constructor(
|
||||
val jdkHome = configuration.get(JVMConfigurationKeys.JDK_HOME)
|
||||
val jrtFileSystem = VirtualFileManager.getInstance().getFileSystem(StandardFileSystems.JRT_PROTOCOL)
|
||||
val javaModuleFinder = CliJavaModuleFinder(
|
||||
jdkHome?.path?.let { path ->
|
||||
VirtualFileManager.getInstance().getFileSystem(StandardFileSystems.FILE_PROTOCOL).findFileByPath(path)
|
||||
},
|
||||
jdkHome?.path?.let { path ->
|
||||
jrtFileSystem?.findFileByPath(path + URLUtil.JAR_SEPARATOR)
|
||||
},
|
||||
@@ -260,7 +263,8 @@ class KotlinCoreEnvironment private constructor(
|
||||
javaModuleFinder,
|
||||
!configuration.getBoolean(CLIConfigurationKeys.ALLOW_KOTLIN_PACKAGE),
|
||||
outputDirectory?.let(this::findLocalFile),
|
||||
javaFileManager
|
||||
javaFileManager,
|
||||
configuration.get(JVMConfigurationKeys.RELEASE, 0)
|
||||
)
|
||||
|
||||
val (initialRoots, javaModules) =
|
||||
|
||||
@@ -73,6 +73,20 @@ fun CompilerConfiguration.setupJvmSpecificArguments(arguments: K2JVMCompilerArgu
|
||||
}
|
||||
}
|
||||
|
||||
val release = arguments.release
|
||||
if (release != null) {
|
||||
val value = release.toIntOrNull()
|
||||
if (value == null) {
|
||||
messageCollector.report(
|
||||
ERROR,
|
||||
"Can't parse value passed for `-Xrelease`: $release."
|
||||
)
|
||||
} else {
|
||||
// TODO: check
|
||||
put(JVMConfigurationKeys.RELEASE, value)
|
||||
}
|
||||
}
|
||||
|
||||
handleClosureGenerationSchemeArgument("-Xsam-conversions", arguments.samConversions, JVMConfigurationKeys.SAM_CONVERSIONS, jvmTarget)
|
||||
handleClosureGenerationSchemeArgument("-Xlambdas", arguments.lambdas, JVMConfigurationKeys.LAMBDAS, jvmTarget)
|
||||
|
||||
@@ -147,7 +161,8 @@ fun CompilerConfiguration.configureExplicitContentRoots(arguments: K2JVMCompiler
|
||||
}
|
||||
|
||||
fun CompilerConfiguration.configureStandardLibs(paths: KotlinPaths?, arguments: K2JVMCompilerArguments) {
|
||||
val isModularJava = isModularJava()
|
||||
val releaseFlagValue = this.get(JVMConfigurationKeys.RELEASE, 0)
|
||||
val isModularJava = isModularJava() && (releaseFlagValue <= 0 || releaseFlagValue >= 9)
|
||||
|
||||
fun addRoot(moduleName: String, libraryName: String, getLibrary: (KotlinPaths) -> File, noLibraryArgument: String) {
|
||||
addModularRootIfNotNull(
|
||||
|
||||
@@ -17,24 +17,41 @@
|
||||
package org.jetbrains.kotlin.cli.jvm.modules
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.vfs.StandardFileSystems
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.openapi.vfs.VirtualFileManager
|
||||
import com.intellij.psi.PsiJavaModule
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
import com.intellij.util.io.URLUtil
|
||||
import org.jetbrains.kotlin.resolve.jvm.KotlinCliJavaFileManager
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModule
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleFinder
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleInfo
|
||||
|
||||
class CliJavaModuleFinder(
|
||||
jdkRootFile: VirtualFile?,
|
||||
jrtFileSystemRoot: VirtualFile?,
|
||||
private val javaFileManager: KotlinCliJavaFileManager,
|
||||
project: Project
|
||||
) : JavaModuleFinder {
|
||||
private val modulesRoot = jrtFileSystemRoot?.findChild("modules")
|
||||
private val ctSymFile = jdkRootFile?.findChild("lib")?.findChild("ct.sym")
|
||||
private val userModules = linkedMapOf<String, JavaModule>()
|
||||
|
||||
private val allScope = GlobalSearchScope.allScope(project)
|
||||
|
||||
public val compilationJdkVersion by lazy {
|
||||
//TODO: add test with -jdk-home
|
||||
// Observe all JDK codes from folder name chars in ct.sym file,
|
||||
// there should be maximal one corresponding to used compilation JDK
|
||||
listFoldersInCtSym()?.children?.maxOf {
|
||||
if (it.name == "META-INF") -1
|
||||
else it.name.substringBeforeLast("-modules").maxOf { char ->
|
||||
char.toString().toIntOrNull(36) ?: -1
|
||||
}
|
||||
} ?: -1
|
||||
}
|
||||
|
||||
fun addUserModule(module: JavaModule) {
|
||||
userModules.putIfAbsent(module.name, module)
|
||||
}
|
||||
@@ -53,4 +70,27 @@ class CliJavaModuleFinder(
|
||||
val moduleInfo = JavaModuleInfo.read(file, javaFileManager, allScope) ?: return null
|
||||
return JavaModule.Explicit(moduleInfo, listOf(JavaModule.Root(moduleRoot, isBinary = true)), file)
|
||||
}
|
||||
|
||||
private fun codeFor(release: Int): String = release.toString(36).toUpperCase()
|
||||
|
||||
private fun matchesRelease(fileName: String, release: Int) =
|
||||
!fileName.contains("-") && fileName.contains(codeFor(release)) // skip `*-modules`
|
||||
|
||||
private fun hasCtSymFile() = ctSymFile != null && ctSymFile.isValid
|
||||
|
||||
fun listFoldersForRelease(release: Int): List<VirtualFile> {
|
||||
if (!hasCtSymFile()) return emptyList()
|
||||
val findFileByPath = listFoldersInCtSym() ?: return emptyList()
|
||||
val isJDK12OrLater = compilationJdkVersion >= 12
|
||||
return findFileByPath.children.filter { matchesRelease(it.name, release) }.flatMap {
|
||||
if (isJDK12OrLater)
|
||||
it.children.toList()
|
||||
else {
|
||||
listOf(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun listFoldersInCtSym() = VirtualFileManager.getInstance().getFileSystem(StandardFileSystems.JAR_PROTOCOL)
|
||||
?.findFileByPath(ctSymFile!!.path + URLUtil.JAR_SEPARATOR)
|
||||
}
|
||||
|
||||
@@ -106,6 +106,9 @@ public class JVMConfigurationKeys {
|
||||
public static final CompilerConfigurationKey<JvmStringConcat> STRING_CONCAT =
|
||||
CompilerConfigurationKey.create("Specifies string concatenation scheme");
|
||||
|
||||
public static final CompilerConfigurationKey<Integer> RELEASE =
|
||||
CompilerConfigurationKey.create("Specifies JDK API version");
|
||||
|
||||
public static final CompilerConfigurationKey<JvmClosureGenerationScheme> SAM_CONVERSIONS =
|
||||
CompilerConfigurationKey.create("SAM conversions code generation scheme");
|
||||
|
||||
|
||||
+264
@@ -143,6 +143,108 @@ public class FirBlackBoxModernJdkCodegenTestGenerated extends AbstractFirBlackBo
|
||||
public void testVarHandle() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/varHandle.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ReleaseFlag {
|
||||
@Test
|
||||
public void testAllFilesPresentInReleaseFlag() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ByteBuffer {
|
||||
@Test
|
||||
public void testAllFilesPresentInByteBuffer() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer.kt")
|
||||
public void testByteBuffer() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_10.kt")
|
||||
public void testByteBuffer_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_11.kt")
|
||||
public void testByteBuffer_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_6.kt")
|
||||
public void testByteBuffer_6() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_6.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_8.kt")
|
||||
public void testByteBuffer_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_9.kt")
|
||||
public void testByteBuffer_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_9.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Reflective {
|
||||
@Test
|
||||
public void testAllFilesPresentInReflective() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective.kt")
|
||||
public void testReflective() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_10.kt")
|
||||
public void testReflective_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_11.kt")
|
||||
public void testReflective_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_6.kt")
|
||||
public void testReflective_6() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_6.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_8.kt")
|
||||
public void testReflective_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_9.kt")
|
||||
public void testReflective_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_9.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -225,6 +327,168 @@ public class FirBlackBoxModernJdkCodegenTestGenerated extends AbstractFirBlackBo
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ReleaseFlag {
|
||||
@Test
|
||||
public void testAllFilesPresentInReleaseFlag() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ByteBuffer {
|
||||
@Test
|
||||
public void testAllFilesPresentInByteBuffer() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer.kt")
|
||||
public void testByteBuffer() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_10.kt")
|
||||
public void testByteBuffer_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_11.kt")
|
||||
public void testByteBuffer_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_12.kt")
|
||||
public void testByteBuffer_12() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_12.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_13.kt")
|
||||
public void testByteBuffer_13() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_13.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_14.kt")
|
||||
public void testByteBuffer_14() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_14.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_15.kt")
|
||||
public void testByteBuffer_15() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_15.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_16.kt")
|
||||
public void testByteBuffer_16() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_16.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_17.kt")
|
||||
public void testByteBuffer_17() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_17.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_8.kt")
|
||||
public void testByteBuffer_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_9.kt")
|
||||
public void testByteBuffer_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_9.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Constable {
|
||||
@Test
|
||||
public void testAllFilesPresentInConstable() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable.kt")
|
||||
public void testConstable() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_10.kt")
|
||||
public void testConstable_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_11.kt")
|
||||
public void testConstable_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_12.kt")
|
||||
public void testConstable_12() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_12.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_13.kt")
|
||||
public void testConstable_13() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_13.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_14.kt")
|
||||
public void testConstable_14() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_14.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_15.kt")
|
||||
public void testConstable_15() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_15.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_16.kt")
|
||||
public void testConstable_16() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_16.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_17.kt")
|
||||
public void testConstable_17() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_17.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_8.kt")
|
||||
public void testConstable_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_9.kt")
|
||||
public void testConstable_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_9.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/sealed")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+5
@@ -59,6 +59,11 @@ object LanguageSettingsDirectives : SimpleDirectivesContainer() {
|
||||
additionalParser = JvmDefaultMode.Companion::fromStringOrNull
|
||||
)
|
||||
|
||||
val RELEASE by valueDirective(
|
||||
description = "Configures corresponding release flag",
|
||||
parser = Integer::valueOf
|
||||
)
|
||||
|
||||
val INHERIT_MULTIFILE_PARTS by directive(
|
||||
description = "Enables corresponding analysis flag (JvmAnalysisFlags.inheritMultifileParts)"
|
||||
)
|
||||
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 10
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 11
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 6
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/Buffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/Buffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 8
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/Buffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/Buffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 9
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/ReflectiveOperationException
|
||||
// 1 LOCALVARIABLE reflective Ljava/lang/ReflectiveOperationException;
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(iae: IllegalAccessException?, cnfe: ClassNotFoundException?) {
|
||||
val reflective = if (cond()) iae else cnfe
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// RELEASE: 10
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/ReflectiveOperationException
|
||||
// 1 LOCALVARIABLE reflective Ljava/lang/ReflectiveOperationException;
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(iae: IllegalAccessException?, cnfe: ClassNotFoundException?) {
|
||||
val reflective = if (cond()) iae else cnfe
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// RELEASE: 11
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/ReflectiveOperationException
|
||||
// 1 LOCALVARIABLE reflective Ljava/lang/ReflectiveOperationException;
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(iae: IllegalAccessException?, cnfe: ClassNotFoundException?) {
|
||||
val reflective = if (cond()) iae else cnfe
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// RELEASE: 6
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 0 CHECKCAST java/lang/ReflectiveOperationException
|
||||
// 0 LOCALVARIABLE reflective Ljava/lang/ReflectiveOperationException;
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(iae: IllegalAccessException?, cnfe: ClassNotFoundException?) {
|
||||
val reflective = if (cond()) iae else cnfe
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// RELEASE: 8
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/ReflectiveOperationException
|
||||
// 1 LOCALVARIABLE reflective Ljava/lang/ReflectiveOperationException;
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(iae: IllegalAccessException?, cnfe: ClassNotFoundException?) {
|
||||
val reflective = if (cond()) iae else cnfe
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// RELEASE: 9
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/ReflectiveOperationException
|
||||
// 1 LOCALVARIABLE reflective Ljava/lang/ReflectiveOperationException;
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(iae: IllegalAccessException?, cnfe: ClassNotFoundException?) {
|
||||
val reflective = if (cond()) iae else cnfe
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 10
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 11
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 12
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 13
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 14
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 15
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 16
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 17
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 8
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/Buffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/Buffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// RELEASE: 9
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 1 public final static clear\(Ljava/nio/ByteBuffer;\)Ljava/nio/ByteBuffer;
|
||||
// 1 INVOKEVIRTUAL java/nio/ByteBuffer.clear \(\)Ljava/nio/ByteBuffer;
|
||||
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
|
||||
|
||||
fun box(): String {
|
||||
if (clear(java.nio.ByteBuffer.allocateDirect(10)).capacity() != 10) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/constant/Constable
|
||||
// 1 LOCALVARIABLE constable Ljava/lang/constant/Constable;
|
||||
|
||||
import java.lang.invoke.*
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(mh: MethodHandle?, mt: MethodType?) {
|
||||
val constable = if (cond()) mh else mt
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// RELEASE: 10
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 0 CHECKCAST java/lang/constant/Constable
|
||||
// 0 LOCALVARIABLE constable Ljava/lang/constant/Constable;
|
||||
|
||||
import java.lang.invoke.*
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(mh: MethodHandle?, mt: MethodType?) {
|
||||
val z = if (cond()) mh else mt
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// RELEASE: 11
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 0 CHECKCAST java/lang/constant/Constable
|
||||
// 0 LOCALVARIABLE constable Ljava/lang/constant/Constable;
|
||||
|
||||
import java.lang.invoke.*
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(mh: MethodHandle?, mt: MethodType?) {
|
||||
val z = if (cond()) mh else mt
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// RELEASE: 12
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/constant/Constable
|
||||
// 1 LOCALVARIABLE constable Ljava/lang/constant/Constable;
|
||||
|
||||
import java.lang.invoke.*
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(mh: MethodHandle?, mt: MethodType?) {
|
||||
val constable = if (cond()) mh else mt
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// RELEASE: 13
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/constant/Constable
|
||||
// 1 LOCALVARIABLE constable Ljava/lang/constant/Constable;
|
||||
|
||||
import java.lang.invoke.*
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(mh: MethodHandle?, mt: MethodType?) {
|
||||
val constable = if (cond()) mh else mt
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// RELEASE: 14
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/constant/Constable
|
||||
// 1 LOCALVARIABLE constable Ljava/lang/constant/Constable;
|
||||
|
||||
import java.lang.invoke.*
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(mh: MethodHandle?, mt: MethodType?) {
|
||||
val constable = if (cond()) mh else mt
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// RELEASE: 15
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/constant/Constable
|
||||
// 1 LOCALVARIABLE constable Ljava/lang/constant/Constable;
|
||||
|
||||
import java.lang.invoke.*
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(mh: MethodHandle?, mt: MethodType?) {
|
||||
val constable = if (cond()) mh else mt
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// RELEASE: 16
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/constant/Constable
|
||||
// 1 LOCALVARIABLE constable Ljava/lang/constant/Constable;
|
||||
|
||||
import java.lang.invoke.*
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(mh: MethodHandle?, mt: MethodType?) {
|
||||
val constable = if (cond()) mh else mt
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// RELEASE: 17
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 2 CHECKCAST java/lang/constant/Constable
|
||||
// 1 LOCALVARIABLE constable Ljava/lang/constant/Constable;
|
||||
|
||||
import java.lang.invoke.*
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(mh: MethodHandle?, mt: MethodType?) {
|
||||
val constable = if (cond()) mh else mt
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// RELEASE: 8
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 0 CHECKCAST java/lang/constant/Constable
|
||||
// 0 LOCALVARIABLE constable Ljava/lang/constant/Constable;
|
||||
|
||||
import java.lang.invoke.*
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(mh: MethodHandle?, mt: MethodType?) {
|
||||
val z = if (cond()) mh else mt
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// RELEASE: 9
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 0 CHECKCAST java/lang/constant/Constable
|
||||
// 0 LOCALVARIABLE constable Ljava/lang/constant/Constable;
|
||||
|
||||
import java.lang.invoke.*
|
||||
|
||||
fun cond() = true
|
||||
|
||||
fun test(mh: MethodHandle?, mt: MethodType?) {
|
||||
val z = if (cond()) mh else mt
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(null, null)
|
||||
return "OK"
|
||||
}
|
||||
+264
@@ -125,6 +125,108 @@ public class BlackBoxModernJdkCodegenTestGenerated extends AbstractBlackBoxCodeg
|
||||
public void testVarHandle() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/varHandle.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ReleaseFlag {
|
||||
@Test
|
||||
public void testAllFilesPresentInReleaseFlag() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ByteBuffer {
|
||||
@Test
|
||||
public void testAllFilesPresentInByteBuffer() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer.kt")
|
||||
public void testByteBuffer() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_10.kt")
|
||||
public void testByteBuffer_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_11.kt")
|
||||
public void testByteBuffer_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_6.kt")
|
||||
public void testByteBuffer_6() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_6.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_8.kt")
|
||||
public void testByteBuffer_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_9.kt")
|
||||
public void testByteBuffer_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_9.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Reflective {
|
||||
@Test
|
||||
public void testAllFilesPresentInReflective() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective.kt")
|
||||
public void testReflective() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_10.kt")
|
||||
public void testReflective_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_11.kt")
|
||||
public void testReflective_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_6.kt")
|
||||
public void testReflective_6() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_6.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_8.kt")
|
||||
public void testReflective_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_9.kt")
|
||||
public void testReflective_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_9.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -207,6 +309,168 @@ public class BlackBoxModernJdkCodegenTestGenerated extends AbstractBlackBoxCodeg
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ReleaseFlag {
|
||||
@Test
|
||||
public void testAllFilesPresentInReleaseFlag() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ByteBuffer {
|
||||
@Test
|
||||
public void testAllFilesPresentInByteBuffer() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer.kt")
|
||||
public void testByteBuffer() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_10.kt")
|
||||
public void testByteBuffer_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_11.kt")
|
||||
public void testByteBuffer_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_12.kt")
|
||||
public void testByteBuffer_12() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_12.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_13.kt")
|
||||
public void testByteBuffer_13() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_13.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_14.kt")
|
||||
public void testByteBuffer_14() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_14.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_15.kt")
|
||||
public void testByteBuffer_15() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_15.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_16.kt")
|
||||
public void testByteBuffer_16() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_16.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_17.kt")
|
||||
public void testByteBuffer_17() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_17.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_8.kt")
|
||||
public void testByteBuffer_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_9.kt")
|
||||
public void testByteBuffer_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_9.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Constable {
|
||||
@Test
|
||||
public void testAllFilesPresentInConstable() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable.kt")
|
||||
public void testConstable() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_10.kt")
|
||||
public void testConstable_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_11.kt")
|
||||
public void testConstable_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_12.kt")
|
||||
public void testConstable_12() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_12.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_13.kt")
|
||||
public void testConstable_13() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_13.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_14.kt")
|
||||
public void testConstable_14() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_14.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_15.kt")
|
||||
public void testConstable_15() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_15.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_16.kt")
|
||||
public void testConstable_16() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_16.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_17.kt")
|
||||
public void testConstable_17() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_17.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_8.kt")
|
||||
public void testConstable_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_9.kt")
|
||||
public void testConstable_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_9.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/sealed")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+264
@@ -143,6 +143,108 @@ public class IrBlackBoxModernJdkCodegenTestGenerated extends AbstractIrBlackBoxC
|
||||
public void testVarHandle() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/varHandle.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ReleaseFlag {
|
||||
@Test
|
||||
public void testAllFilesPresentInReleaseFlag() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ByteBuffer {
|
||||
@Test
|
||||
public void testAllFilesPresentInByteBuffer() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer.kt")
|
||||
public void testByteBuffer() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_10.kt")
|
||||
public void testByteBuffer_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_11.kt")
|
||||
public void testByteBuffer_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_6.kt")
|
||||
public void testByteBuffer_6() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_6.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_8.kt")
|
||||
public void testByteBuffer_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_9.kt")
|
||||
public void testByteBuffer_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/byteBuffer/byteBuffer_9.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Reflective {
|
||||
@Test
|
||||
public void testAllFilesPresentInReflective() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective.kt")
|
||||
public void testReflective() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_10.kt")
|
||||
public void testReflective_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_11.kt")
|
||||
public void testReflective_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_6.kt")
|
||||
public void testReflective_6() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_6.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_8.kt")
|
||||
public void testReflective_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reflective_9.kt")
|
||||
public void testReflective_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava11/releaseFlag/reflective/reflective_9.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -225,6 +327,168 @@ public class IrBlackBoxModernJdkCodegenTestGenerated extends AbstractIrBlackBoxC
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ReleaseFlag {
|
||||
@Test
|
||||
public void testAllFilesPresentInReleaseFlag() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ByteBuffer {
|
||||
@Test
|
||||
public void testAllFilesPresentInByteBuffer() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer.kt")
|
||||
public void testByteBuffer() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_10.kt")
|
||||
public void testByteBuffer_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_11.kt")
|
||||
public void testByteBuffer_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_12.kt")
|
||||
public void testByteBuffer_12() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_12.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_13.kt")
|
||||
public void testByteBuffer_13() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_13.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_14.kt")
|
||||
public void testByteBuffer_14() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_14.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_15.kt")
|
||||
public void testByteBuffer_15() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_15.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_16.kt")
|
||||
public void testByteBuffer_16() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_16.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_17.kt")
|
||||
public void testByteBuffer_17() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_17.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_8.kt")
|
||||
public void testByteBuffer_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("byteBuffer_9.kt")
|
||||
public void testByteBuffer_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/byteBuffer/byteBuffer_9.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Constable {
|
||||
@Test
|
||||
public void testAllFilesPresentInConstable() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable.kt")
|
||||
public void testConstable() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_10.kt")
|
||||
public void testConstable_10() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_10.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_11.kt")
|
||||
public void testConstable_11() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_11.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_12.kt")
|
||||
public void testConstable_12() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_12.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_13.kt")
|
||||
public void testConstable_13() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_13.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_14.kt")
|
||||
public void testConstable_14() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_14.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_15.kt")
|
||||
public void testConstable_15() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_15.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_16.kt")
|
||||
public void testConstable_16() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_16.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_17.kt")
|
||||
public void testConstable_17() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_17.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_8.kt")
|
||||
public void testConstable_8() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_8.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constable_9.kt")
|
||||
public void testConstable_9() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/releaseFlag/constable/constable_9.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/boxModernJdk/testsWithJava17/sealed")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+2
@@ -47,6 +47,7 @@ import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives.ENABLE_JV
|
||||
import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives.NO_OPTIMIZED_CALLABLE_REFERENCES
|
||||
import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives.NO_UNIFIED_NULL_CHECKS
|
||||
import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives.PARAMETERS_METADATA
|
||||
import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives.RELEASE
|
||||
import org.jetbrains.kotlin.test.directives.model.DirectivesContainer
|
||||
import org.jetbrains.kotlin.test.directives.model.RegisteredDirectives
|
||||
import org.jetbrains.kotlin.test.model.DependencyDescription
|
||||
@@ -145,6 +146,7 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig
|
||||
register(PARAMETERS_METADATA, JVMConfigurationKeys.PARAMETERS_METADATA)
|
||||
register(JVM_TARGET, JVMConfigurationKeys.JVM_TARGET)
|
||||
register(SERIALIZE_IR, JVMConfigurationKeys.SERIALIZE_IR)
|
||||
register(RELEASE, JVMConfigurationKeys.RELEASE)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalPathApi::class, ExperimentalStdlibApi::class)
|
||||
|
||||
Reference in New Issue
Block a user