Add JVM/JVM_IR mixed compilation tests for compileKotlinAgainstKotlin/boxInline

This commit is contained in:
Alexander Udalov
2020-08-28 20:56:28 +02:00
parent e324733b01
commit 9e357354fb
20 changed files with 10190 additions and 15 deletions
@@ -1,5 +1,5 @@
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_OLD_AGAINST_IR
// NO_CHECK_LAMBDA_INLINING
// FILE: 1.kt
@@ -1,5 +1,5 @@
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_OLD_AGAINST_IR
// NO_CHECK_LAMBDA_INLINING
// FILE: 1.kt
@@ -1,5 +1,5 @@
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: 1.kt
package test
@@ -1,7 +1,7 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS, JS_IR
// IGNORE_BACKEND: JS_IR_ES6
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD
// NO_CHECK_LAMBDA_INLINING
// FILE: 1.kt
// WITH_RUNTIME
@@ -1,6 +1,6 @@
// Not a multi-module test.
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_IR
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_IR, JVM_MULTI_MODULE_OLD_AGAINST_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: A.kt
// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm
// WITH_RUNTIME
@@ -1,5 +1,5 @@
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: 1.kt
package test
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: 1.kt
package builders
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: 1.kt
package builders
@@ -7,7 +7,7 @@
// The lambda in box() attempts to store the result in a null Ref for some reason.
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_OLD_AGAINST_IR
@file:JvmMultifileClass
@file:JvmName("XKt")
@@ -1,7 +1,7 @@
// WITH_RUNTIME
// WITH_COROUTINES
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_OLD_AGAINST_IR
// NO_CHECK_LAMBDA_INLINING
// FILE: a.kt
@@ -1,6 +1,6 @@
// !LANGUAGE: -ProhibitProtectedCallFromInline
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: 1.kt
package test
@@ -22,6 +22,7 @@ import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.InTextDirectivesUtils;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
import java.io.File;
@@ -99,11 +100,21 @@ public abstract class AbstractCompileKotlinAgainstKotlinTest extends CodegenTest
);
}
@NotNull
protected TargetBackend getBackendA() {
return getBackend();
}
@NotNull
protected TargetBackend getBackendB() {
return getBackend();
}
@NotNull
private ClassFileFactory compileA(@NotNull TestFile testFile, List<TestFile> files) {
Disposable compileDisposable = createDisposable("compileA");
CompilerConfiguration configuration = createConfiguration(
ConfigurationKind.ALL, getTestJdkKind(files), getBackend(),
ConfigurationKind.ALL, getTestJdkKind(files), getBackendA(),
Collections.singletonList(KotlinTestUtils.getAnnotationsJar()),
Collections.emptyList(), Collections.singletonList(testFile)
);
@@ -126,7 +137,7 @@ public abstract class AbstractCompileKotlinAgainstKotlinTest extends CodegenTest
private ClassFileFactory compileB(@NotNull TestFile testFile, List<TestFile> files) {
String commonHeader = StringsKt.substringBefore(files.get(0).content, "FILE:", "");
CompilerConfiguration configuration = createConfiguration(
ConfigurationKind.ALL, getTestJdkKind(files), getBackend(),
ConfigurationKind.ALL, getTestJdkKind(files), getBackendB(),
Arrays.asList(KotlinTestUtils.getAnnotationsJar(), aDir),
Collections.emptyList(), Arrays.asList(testFile, new TestFile("header", commonHeader))
);
@@ -9,5 +9,19 @@ import org.jetbrains.kotlin.codegen.AbstractCompileKotlinAgainstInlineKotlinTest
import org.jetbrains.kotlin.test.TargetBackend
abstract class AbstractIrCompileKotlinAgainstInlineKotlinTest : AbstractCompileKotlinAgainstInlineKotlinTest() {
override val backend = TargetBackend.JVM_IR
override val backend: TargetBackend get() = TargetBackend.JVM_IR
}
abstract class AbstractJvmIrAgainstOldBoxInlineTest : AbstractIrCompileKotlinAgainstInlineKotlinTest() {
override val backend: TargetBackend get() = TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD
override fun getBackendA(): TargetBackend = TargetBackend.JVM
override fun getBackendB(): TargetBackend = TargetBackend.JVM_IR
}
abstract class AbstractJvmOldAgainstIrBoxInlineTest : AbstractIrCompileKotlinAgainstInlineKotlinTest() {
override val backend: TargetBackend get() = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR
override fun getBackendA(): TargetBackend = TargetBackend.JVM_IR
override fun getBackendB(): TargetBackend = TargetBackend.JVM
}
@@ -9,5 +9,19 @@ import org.jetbrains.kotlin.codegen.AbstractCompileKotlinAgainstKotlinTest
import org.jetbrains.kotlin.test.TargetBackend
abstract class AbstractIrCompileKotlinAgainstKotlinTest : AbstractCompileKotlinAgainstKotlinTest() {
override val backend = TargetBackend.JVM_IR
override val backend: TargetBackend get() = TargetBackend.JVM_IR
}
abstract class AbstractJvmIrAgainstOldBoxTest : AbstractIrCompileKotlinAgainstKotlinTest() {
override val backend: TargetBackend get() = TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD
override fun getBackendA(): TargetBackend = TargetBackend.JVM
override fun getBackendB(): TargetBackend = TargetBackend.JVM_IR
}
abstract class AbstractJvmOldAgainstIrBoxTest : AbstractIrCompileKotlinAgainstKotlinTest() {
override val backend: TargetBackend get() = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR
override fun getBackendA(): TargetBackend = TargetBackend.JVM_IR
override fun getBackendB(): TargetBackend = TargetBackend.JVM
}
@@ -13,6 +13,8 @@ enum class TargetBackend(
JVM(false),
JVM_OLD(false, JVM),
JVM_IR(true, JVM),
JVM_MULTI_MODULE_IR_AGAINST_OLD(true, JVM_IR),
JVM_MULTI_MODULE_OLD_AGAINST_IR(false, JVM),
JS(false),
JS_IR(true, JS),
JS_IR_ES6(true, JS_IR),
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,639 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.codegen.ir;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
}
public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("annotationInInterface.kt")
public void testAnnotationInInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt");
}
@TestMetadata("annotationOnTypeUseInTypeAlias.kt")
public void testAnnotationOnTypeUseInTypeAlias() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt");
}
@TestMetadata("annotationsOnTypeAliases.kt")
public void testAnnotationsOnTypeAliases() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt");
}
@TestMetadata("callDeserializedPropertyOnInlineClassType.kt")
public void testCallDeserializedPropertyOnInlineClassType() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt");
}
@TestMetadata("callsToMultifileClassFromOtherPackage.kt")
public void testCallsToMultifileClassFromOtherPackage() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt");
}
@TestMetadata("classInObject.kt")
public void testClassInObject() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/classInObject.kt");
}
@TestMetadata("companionObjectInEnum.kt")
public void testCompanionObjectInEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt");
}
@TestMetadata("companionObjectMember.kt")
public void testCompanionObjectMember() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt");
}
@TestMetadata("constPropertyReferenceFromMultifileClass.kt")
public void testConstPropertyReferenceFromMultifileClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt");
}
@TestMetadata("constructorVararg.kt")
public void testConstructorVararg() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt");
}
@TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt")
public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt");
}
@TestMetadata("copySamOnInline.kt")
public void testCopySamOnInline() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt");
}
@TestMetadata("copySamOnInline2.kt")
public void testCopySamOnInline2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt");
}
@TestMetadata("coroutinesBinary.kt")
public void testCoroutinesBinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines");
}
@TestMetadata("defaultConstructor.kt")
public void testDefaultConstructor() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt");
}
@TestMetadata("defaultLambdaRegeneration.kt")
public void testDefaultLambdaRegeneration() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt");
}
@TestMetadata("defaultLambdaRegeneration2.kt")
public void testDefaultLambdaRegeneration2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt");
}
@TestMetadata("delegatedDefault.kt")
public void testDelegatedDefault() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt");
}
@TestMetadata("delegationAndAnnotations.kt")
public void testDelegationAndAnnotations() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt");
}
@TestMetadata("doublyNestedClass.kt")
public void testDoublyNestedClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt");
}
@TestMetadata("enum.kt")
public void testEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/enum.kt");
}
@TestMetadata("expectClassActualTypeAlias.kt")
public void testExpectClassActualTypeAlias() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt");
}
@TestMetadata("inlineClassFromBinaryDependencies.kt")
public void testInlineClassFromBinaryDependencies() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt");
}
@TestMetadata("inlineClassInlineProperty.kt")
public void testInlineClassInlineProperty() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt");
}
@TestMetadata("inlinedConstants.kt")
public void testInlinedConstants() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt");
}
@TestMetadata("innerClassConstructor.kt")
public void testInnerClassConstructor() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt");
}
@TestMetadata("interfaceDelegationAndBridgesProcessing.kt")
public void testInterfaceDelegationAndBridgesProcessing() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt");
}
@TestMetadata("internalSetterOverridden.kt")
public void testInternalSetterOverridden() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt");
}
@TestMetadata("internalWithOtherModuleName.kt")
public void testInternalWithOtherModuleName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt");
}
@TestMetadata("jvmField.kt")
public void testJvmField() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmField.kt");
}
@TestMetadata("jvmFieldInAnnotationCompanion.kt")
public void testJvmFieldInAnnotationCompanion() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt");
}
@TestMetadata("jvmFieldInConstructor.kt")
public void testJvmFieldInConstructor() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt");
}
@TestMetadata("jvmFieldInInterfaceCompanion.kt")
public void testJvmFieldInInterfaceCompanion() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt");
}
@TestMetadata("jvmNames.kt")
public void testJvmNames() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt");
}
@TestMetadata("jvmPackageName.kt")
public void testJvmPackageName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt");
}
@TestMetadata("jvmPackageNameInRootPackage.kt")
public void testJvmPackageNameInRootPackage() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt");
}
@TestMetadata("jvmPackageNameMultifileClass.kt")
public void testJvmPackageNameMultifileClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt");
}
@TestMetadata("jvmPackageNameWithJvmName.kt")
public void testJvmPackageNameWithJvmName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt");
}
@TestMetadata("jvmStaticInObject.kt")
public void testJvmStaticInObject() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt");
}
@TestMetadata("kotlinPropertyAsAnnotationParameter.kt")
public void testKotlinPropertyAsAnnotationParameter() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt");
}
@TestMetadata("kt14012.kt")
public void testKt14012() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012.kt");
}
@TestMetadata("kt14012_multi.kt")
public void testKt14012_multi() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt");
}
@TestMetadata("kt21775.kt")
public void testKt21775() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/kt21775.kt");
}
@TestMetadata("metadataForMembersInLocalClassInInitializer.kt")
public void testMetadataForMembersInLocalClassInInitializer() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt");
}
@TestMetadata("multifileClassInlineFunctionAccessingProperty.kt")
public void testMultifileClassInlineFunctionAccessingProperty() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt");
}
@TestMetadata("multifileClassWithTypealias.kt")
public void testMultifileClassWithTypealias() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt");
}
@TestMetadata("nestedClass.kt")
public void testNestedClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt");
}
@TestMetadata("nestedClassInAnnotationArgument.kt")
public void testNestedClassInAnnotationArgument() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt");
}
@TestMetadata("nestedEnum.kt")
public void testNestedEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt");
}
@TestMetadata("nestedFunctionTypeAliasExpansion.kt")
public void testNestedFunctionTypeAliasExpansion() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt");
}
@TestMetadata("nestedObject.kt")
public void testNestedObject() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt");
}
@TestMetadata("nestedTypeAliasExpansion.kt")
public void testNestedTypeAliasExpansion() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt");
}
@TestMetadata("optionalAnnotation.kt")
public void testOptionalAnnotation() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/optionalAnnotation.kt");
}
@TestMetadata("platformTypes.kt")
public void testPlatformTypes() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt");
}
@TestMetadata("privateCompanionObjectValInDifferentModule.kt")
public void testPrivateCompanionObjectValInDifferentModule() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt");
}
@TestMetadata("privateTopLevelValInDifferentModule.kt")
public void testPrivateTopLevelValInDifferentModule() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt");
}
@TestMetadata("propertyReference.kt")
public void testPropertyReference() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt");
}
@TestMetadata("recursiveGeneric.kt")
public void testRecursiveGeneric() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt");
}
@TestMetadata("reflectTopLevelFunctionOtherFile.kt")
public void testReflectTopLevelFunctionOtherFile() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt");
}
@TestMetadata("sealedClass.kt")
public void testSealedClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt");
}
@TestMetadata("secondaryConstructors.kt")
public void testSecondaryConstructors() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/simple.kt");
}
@TestMetadata("simpleValAnonymousObject.kt")
public void testSimpleValAnonymousObject() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt");
}
@TestMetadata("specialBridgesInDependencies.kt")
public void testSpecialBridgesInDependencies() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt");
}
@TestMetadata("starImportEnum.kt")
public void testStarImportEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt");
}
@TestMetadata("targetedJvmName.kt")
public void testTargetedJvmName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt");
}
@TestMetadata("typeAliasesKt13181.kt")
public void testTypeAliasesKt13181() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt");
}
@TestMetadata("unsignedTypesInAnnotations.kt")
public void testUnsignedTypesInAnnotations() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt");
}
@TestMetadata("useDeserializedFunInterface.kt")
public void testUseDeserializedFunInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt");
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8 extends AbstractJvmIrAgainstOldBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
}
public void testAllFilesPresentInJvm8() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Defaults extends AbstractJvmIrAgainstOldBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
}
public void testAllFilesPresentInDefaults() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("superCall.kt")
public void testSuperCall() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt");
}
@TestMetadata("superCallFromInterface.kt")
public void testSuperCallFromInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt");
}
@TestMetadata("superCallFromInterface2.kt")
public void testSuperCallFromInterface2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt");
}
@TestMetadata("superPropAccess.kt")
public void testSuperPropAccess() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt");
}
@TestMetadata("superPropAccessFromInterface.kt")
public void testSuperPropAccessFromInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt");
}
@TestMetadata("superPropAccessFromInterface2.kt")
public void testSuperPropAccessFromInterface2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt");
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class AllCompatibility extends AbstractJvmIrAgainstOldBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
}
public void testAllFilesPresentInAllCompatibility() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("callStackTrace.kt")
public void testCallStackTrace() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt");
}
@TestMetadata("superCall.kt")
public void testSuperCall() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt");
}
@TestMetadata("superCallFromInterface.kt")
public void testSuperCallFromInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt");
}
@TestMetadata("superCallFromInterface2.kt")
public void testSuperCallFromInterface2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt");
}
@TestMetadata("superPropAccess.kt")
public void testSuperPropAccess() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt");
}
@TestMetadata("superPropAccessFromInterface.kt")
public void testSuperPropAccessFromInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt");
}
@TestMetadata("superPropAccessFromInterface2.kt")
public void testSuperPropAccessFromInterface2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt");
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DelegationBy extends AbstractJvmIrAgainstOldBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
}
public void testAllFilesPresentInDelegationBy() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt");
}
@TestMetadata("simpleProperty.kt")
public void testSimpleProperty() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt");
}
}
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Interop extends AbstractJvmIrAgainstOldBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
}
public void testAllFilesPresentInInterop() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("likeMemberClash.kt")
public void testLikeMemberClash() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt");
}
@TestMetadata("likeSpecialization.kt")
public void testLikeSpecialization() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt");
}
@TestMetadata("newAndOldSchemes.kt")
public void testNewAndOldSchemes() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt");
}
@TestMetadata("newAndOldSchemes2.kt")
public void testNewAndOldSchemes2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt");
}
@TestMetadata("newAndOldSchemes2Compatibility.kt")
public void testNewAndOldSchemes2Compatibility() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt");
}
@TestMetadata("newSchemeWithJvmDefault.kt")
public void testNewSchemeWithJvmDefault() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt");
}
}
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8against6 extends AbstractJvmIrAgainstOldBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
}
public void testAllFilesPresentInJvm8against6() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("jdk8Against6.kt")
public void testJdk8Against6() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt");
}
@TestMetadata("simpleCall.kt")
public void testSimpleCall() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt");
}
@TestMetadata("simpleCallWithBigHierarchy.kt")
public void testSimpleCallWithBigHierarchy() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt");
}
@TestMetadata("simpleCallWithHierarchy.kt")
public void testSimpleCallWithHierarchy() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt");
}
@TestMetadata("simpleProp.kt")
public void testSimpleProp() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt");
}
@TestMetadata("simplePropWithHierarchy.kt")
public void testSimplePropWithHierarchy() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt");
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Delegation extends AbstractJvmIrAgainstOldBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
}
public void testAllFilesPresentInDelegation() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("diamond.kt")
public void testDiamond() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt");
}
@TestMetadata("diamond2.kt")
public void testDiamond2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt");
}
@TestMetadata("diamond3.kt")
public void testDiamond3() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt");
}
}
}
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class TypeAnnotations extends AbstractJvmIrAgainstOldBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
}
public void testAllFilesPresentInTypeAnnotations() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@TestMetadata("implicitReturn.kt")
public void testImplicitReturn() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,639 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.codegen.ir;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
}
public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("annotationInInterface.kt")
public void testAnnotationInInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt");
}
@TestMetadata("annotationOnTypeUseInTypeAlias.kt")
public void testAnnotationOnTypeUseInTypeAlias() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt");
}
@TestMetadata("annotationsOnTypeAliases.kt")
public void testAnnotationsOnTypeAliases() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt");
}
@TestMetadata("callDeserializedPropertyOnInlineClassType.kt")
public void testCallDeserializedPropertyOnInlineClassType() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt");
}
@TestMetadata("callsToMultifileClassFromOtherPackage.kt")
public void testCallsToMultifileClassFromOtherPackage() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt");
}
@TestMetadata("classInObject.kt")
public void testClassInObject() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/classInObject.kt");
}
@TestMetadata("companionObjectInEnum.kt")
public void testCompanionObjectInEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt");
}
@TestMetadata("companionObjectMember.kt")
public void testCompanionObjectMember() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt");
}
@TestMetadata("constPropertyReferenceFromMultifileClass.kt")
public void testConstPropertyReferenceFromMultifileClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt");
}
@TestMetadata("constructorVararg.kt")
public void testConstructorVararg() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt");
}
@TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt")
public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt");
}
@TestMetadata("copySamOnInline.kt")
public void testCopySamOnInline() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt");
}
@TestMetadata("copySamOnInline2.kt")
public void testCopySamOnInline2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt");
}
@TestMetadata("coroutinesBinary.kt")
public void testCoroutinesBinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines");
}
@TestMetadata("defaultConstructor.kt")
public void testDefaultConstructor() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt");
}
@TestMetadata("defaultLambdaRegeneration.kt")
public void testDefaultLambdaRegeneration() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt");
}
@TestMetadata("defaultLambdaRegeneration2.kt")
public void testDefaultLambdaRegeneration2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt");
}
@TestMetadata("delegatedDefault.kt")
public void testDelegatedDefault() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt");
}
@TestMetadata("delegationAndAnnotations.kt")
public void testDelegationAndAnnotations() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt");
}
@TestMetadata("doublyNestedClass.kt")
public void testDoublyNestedClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt");
}
@TestMetadata("enum.kt")
public void testEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/enum.kt");
}
@TestMetadata("expectClassActualTypeAlias.kt")
public void testExpectClassActualTypeAlias() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt");
}
@TestMetadata("inlineClassFromBinaryDependencies.kt")
public void testInlineClassFromBinaryDependencies() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt");
}
@TestMetadata("inlineClassInlineProperty.kt")
public void testInlineClassInlineProperty() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt");
}
@TestMetadata("inlinedConstants.kt")
public void testInlinedConstants() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt");
}
@TestMetadata("innerClassConstructor.kt")
public void testInnerClassConstructor() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt");
}
@TestMetadata("interfaceDelegationAndBridgesProcessing.kt")
public void testInterfaceDelegationAndBridgesProcessing() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt");
}
@TestMetadata("internalSetterOverridden.kt")
public void testInternalSetterOverridden() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt");
}
@TestMetadata("internalWithOtherModuleName.kt")
public void testInternalWithOtherModuleName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt");
}
@TestMetadata("jvmField.kt")
public void testJvmField() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmField.kt");
}
@TestMetadata("jvmFieldInAnnotationCompanion.kt")
public void testJvmFieldInAnnotationCompanion() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt");
}
@TestMetadata("jvmFieldInConstructor.kt")
public void testJvmFieldInConstructor() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt");
}
@TestMetadata("jvmFieldInInterfaceCompanion.kt")
public void testJvmFieldInInterfaceCompanion() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt");
}
@TestMetadata("jvmNames.kt")
public void testJvmNames() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt");
}
@TestMetadata("jvmPackageName.kt")
public void testJvmPackageName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt");
}
@TestMetadata("jvmPackageNameInRootPackage.kt")
public void testJvmPackageNameInRootPackage() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt");
}
@TestMetadata("jvmPackageNameMultifileClass.kt")
public void testJvmPackageNameMultifileClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt");
}
@TestMetadata("jvmPackageNameWithJvmName.kt")
public void testJvmPackageNameWithJvmName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt");
}
@TestMetadata("jvmStaticInObject.kt")
public void testJvmStaticInObject() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt");
}
@TestMetadata("kotlinPropertyAsAnnotationParameter.kt")
public void testKotlinPropertyAsAnnotationParameter() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt");
}
@TestMetadata("kt14012.kt")
public void testKt14012() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012.kt");
}
@TestMetadata("kt14012_multi.kt")
public void testKt14012_multi() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt");
}
@TestMetadata("kt21775.kt")
public void testKt21775() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/kt21775.kt");
}
@TestMetadata("metadataForMembersInLocalClassInInitializer.kt")
public void testMetadataForMembersInLocalClassInInitializer() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt");
}
@TestMetadata("multifileClassInlineFunctionAccessingProperty.kt")
public void testMultifileClassInlineFunctionAccessingProperty() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt");
}
@TestMetadata("multifileClassWithTypealias.kt")
public void testMultifileClassWithTypealias() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt");
}
@TestMetadata("nestedClass.kt")
public void testNestedClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt");
}
@TestMetadata("nestedClassInAnnotationArgument.kt")
public void testNestedClassInAnnotationArgument() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt");
}
@TestMetadata("nestedEnum.kt")
public void testNestedEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt");
}
@TestMetadata("nestedFunctionTypeAliasExpansion.kt")
public void testNestedFunctionTypeAliasExpansion() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt");
}
@TestMetadata("nestedObject.kt")
public void testNestedObject() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt");
}
@TestMetadata("nestedTypeAliasExpansion.kt")
public void testNestedTypeAliasExpansion() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt");
}
@TestMetadata("optionalAnnotation.kt")
public void testOptionalAnnotation() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/optionalAnnotation.kt");
}
@TestMetadata("platformTypes.kt")
public void testPlatformTypes() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt");
}
@TestMetadata("privateCompanionObjectValInDifferentModule.kt")
public void testPrivateCompanionObjectValInDifferentModule() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt");
}
@TestMetadata("privateTopLevelValInDifferentModule.kt")
public void testPrivateTopLevelValInDifferentModule() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt");
}
@TestMetadata("propertyReference.kt")
public void testPropertyReference() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt");
}
@TestMetadata("recursiveGeneric.kt")
public void testRecursiveGeneric() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt");
}
@TestMetadata("reflectTopLevelFunctionOtherFile.kt")
public void testReflectTopLevelFunctionOtherFile() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt");
}
@TestMetadata("sealedClass.kt")
public void testSealedClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt");
}
@TestMetadata("secondaryConstructors.kt")
public void testSecondaryConstructors() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/simple.kt");
}
@TestMetadata("simpleValAnonymousObject.kt")
public void testSimpleValAnonymousObject() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt");
}
@TestMetadata("specialBridgesInDependencies.kt")
public void testSpecialBridgesInDependencies() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt");
}
@TestMetadata("starImportEnum.kt")
public void testStarImportEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt");
}
@TestMetadata("targetedJvmName.kt")
public void testTargetedJvmName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt");
}
@TestMetadata("typeAliasesKt13181.kt")
public void testTypeAliasesKt13181() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt");
}
@TestMetadata("unsignedTypesInAnnotations.kt")
public void testUnsignedTypesInAnnotations() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt");
}
@TestMetadata("useDeserializedFunInterface.kt")
public void testUseDeserializedFunInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt");
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8 extends AbstractJvmOldAgainstIrBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
}
public void testAllFilesPresentInJvm8() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Defaults extends AbstractJvmOldAgainstIrBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
}
public void testAllFilesPresentInDefaults() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("superCall.kt")
public void testSuperCall() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt");
}
@TestMetadata("superCallFromInterface.kt")
public void testSuperCallFromInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt");
}
@TestMetadata("superCallFromInterface2.kt")
public void testSuperCallFromInterface2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt");
}
@TestMetadata("superPropAccess.kt")
public void testSuperPropAccess() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt");
}
@TestMetadata("superPropAccessFromInterface.kt")
public void testSuperPropAccessFromInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt");
}
@TestMetadata("superPropAccessFromInterface2.kt")
public void testSuperPropAccessFromInterface2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt");
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class AllCompatibility extends AbstractJvmOldAgainstIrBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
}
public void testAllFilesPresentInAllCompatibility() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("callStackTrace.kt")
public void testCallStackTrace() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt");
}
@TestMetadata("superCall.kt")
public void testSuperCall() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt");
}
@TestMetadata("superCallFromInterface.kt")
public void testSuperCallFromInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt");
}
@TestMetadata("superCallFromInterface2.kt")
public void testSuperCallFromInterface2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt");
}
@TestMetadata("superPropAccess.kt")
public void testSuperPropAccess() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt");
}
@TestMetadata("superPropAccessFromInterface.kt")
public void testSuperPropAccessFromInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt");
}
@TestMetadata("superPropAccessFromInterface2.kt")
public void testSuperPropAccessFromInterface2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt");
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DelegationBy extends AbstractJvmOldAgainstIrBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
}
public void testAllFilesPresentInDelegationBy() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt");
}
@TestMetadata("simpleProperty.kt")
public void testSimpleProperty() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt");
}
}
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Interop extends AbstractJvmOldAgainstIrBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
}
public void testAllFilesPresentInInterop() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("likeMemberClash.kt")
public void testLikeMemberClash() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt");
}
@TestMetadata("likeSpecialization.kt")
public void testLikeSpecialization() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt");
}
@TestMetadata("newAndOldSchemes.kt")
public void testNewAndOldSchemes() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt");
}
@TestMetadata("newAndOldSchemes2.kt")
public void testNewAndOldSchemes2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt");
}
@TestMetadata("newAndOldSchemes2Compatibility.kt")
public void testNewAndOldSchemes2Compatibility() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt");
}
@TestMetadata("newSchemeWithJvmDefault.kt")
public void testNewSchemeWithJvmDefault() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt");
}
}
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8against6 extends AbstractJvmOldAgainstIrBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
}
public void testAllFilesPresentInJvm8against6() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("jdk8Against6.kt")
public void testJdk8Against6() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt");
}
@TestMetadata("simpleCall.kt")
public void testSimpleCall() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt");
}
@TestMetadata("simpleCallWithBigHierarchy.kt")
public void testSimpleCallWithBigHierarchy() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt");
}
@TestMetadata("simpleCallWithHierarchy.kt")
public void testSimpleCallWithHierarchy() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt");
}
@TestMetadata("simpleProp.kt")
public void testSimpleProp() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt");
}
@TestMetadata("simplePropWithHierarchy.kt")
public void testSimplePropWithHierarchy() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt");
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Delegation extends AbstractJvmOldAgainstIrBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
}
public void testAllFilesPresentInDelegation() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("diamond.kt")
public void testDiamond() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt");
}
@TestMetadata("diamond2.kt")
public void testDiamond2() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt");
}
@TestMetadata("diamond3.kt")
public void testDiamond3() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt");
}
}
}
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class TypeAnnotations extends AbstractJvmOldAgainstIrBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
}
public void testAllFilesPresentInTypeAnnotations() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
@TestMetadata("implicitReturn.kt")
public void testImplicitReturn() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt");
}
}
}
@@ -442,6 +442,16 @@ fun main(args: Array<String>) {
testClass<AbstractIrCompileKotlinAgainstKotlinTest> {
model("compileKotlinAgainstKotlin", targetBackend = TargetBackend.JVM_IR)
}
testClass<AbstractJvmIrAgainstOldBoxTest> {
model("compileKotlinAgainstKotlin", targetBackend = TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD)
}
testClass<AbstractJvmOldAgainstIrBoxTest> {
model(
"compileKotlinAgainstKotlin",
targetBackend = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR,
skipTestsForExperimentalCoroutines = true
)
}
testClass<AbstractIrBytecodeListingTest> {
model("codegen/bytecodeListing", targetBackend = TargetBackend.JVM_IR)
@@ -537,6 +547,16 @@ fun main(args: Array<String>) {
testClass<AbstractIrCompileKotlinAgainstInlineKotlinTest> {
model("codegen/boxInline", targetBackend = TargetBackend.JVM_IR)
}
testClass<AbstractJvmIrAgainstOldBoxInlineTest> {
model("codegen/boxInline", targetBackend = TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD)
}
testClass<AbstractJvmOldAgainstIrBoxInlineTest> {
model(
"codegen/boxInline",
targetBackend = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR,
skipTestsForExperimentalCoroutines = true
)
}
}
testGroup("compiler/fir/raw-fir/psi2fir/tests", "compiler/fir/raw-fir/psi2fir/testData") {