Run CompileKotlinAgainstJava tests in both APT / non-APT modes

This commit is contained in:
Mikhail Glukhikh
2019-10-10 17:09:59 +03:00
parent 393047883e
commit 1bc4642fc9
3 changed files with 524 additions and 230 deletions
@@ -38,13 +38,19 @@ import org.jetbrains.kotlin.test.TestJdkKind
import org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.validateAndCompareDescriptorWithFile import org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.validateAndCompareDescriptorWithFile
import org.junit.Assert import org.junit.Assert
import java.io.File import java.io.File
import java.io.IOException
import java.lang.annotation.Retention import java.lang.annotation.Retention
abstract class AbstractCompileKotlinAgainstJavaTest : TestCaseWithTmpdir() { abstract class AbstractCompileKotlinAgainstJavaTest : TestCaseWithTmpdir() {
@Throws(IOException::class) protected fun doTestWithoutAPT(ktFilePath: String) {
protected fun doTest(ktFilePath: String) { doTest(ktFilePath, aptMode = false)
}
protected fun doTestWithAPT(ktFilePath: String) {
doTest(ktFilePath, aptMode = true)
}
private fun doTest(ktFilePath: String, aptMode: Boolean) {
Assert.assertTrue(ktFilePath.endsWith(".kt")) Assert.assertTrue(ktFilePath.endsWith(".kt"))
val ktFile = File(ktFilePath) val ktFile = File(ktFilePath)
val javaFile = File(ktFilePath.replaceFirst("\\.kt$".toRegex(), ".java")) val javaFile = File(ktFilePath.replaceFirst("\\.kt$".toRegex(), ".java"))
@@ -53,7 +59,8 @@ abstract class AbstractCompileKotlinAgainstJavaTest : TestCaseWithTmpdir() {
val compiledSuccessfully = compileKotlinWithJava( val compiledSuccessfully = compileKotlinWithJava(
listOf(javaFile), listOf(javaFile),
listOf(ktFile), listOf(ktFile),
out, testRootDisposable out, testRootDisposable,
aptMode
) )
if (!compiledSuccessfully) return if (!compiledSuccessfully) return
@@ -75,12 +82,12 @@ abstract class AbstractCompileKotlinAgainstJavaTest : TestCaseWithTmpdir() {
validateAndCompareDescriptorWithFile(packageView, CONFIGURATION, expectedFile) validateAndCompareDescriptorWithFile(packageView, CONFIGURATION, expectedFile)
} }
@Throws(IOException::class)
fun compileKotlinWithJava( fun compileKotlinWithJava(
javaFiles: List<File>, javaFiles: List<File>,
kotlinFiles: List<File>, kotlinFiles: List<File>,
outDir: File, outDir: File,
disposable: Disposable disposable: Disposable,
aptMode: Boolean
): Boolean { ): Boolean {
val environment = createEnvironmentWithMockJdkAndIdeaAnnotations(disposable) val environment = createEnvironmentWithMockJdkAndIdeaAnnotations(disposable)
environment.configuration.put(JVMConfigurationKeys.USE_JAVAC, true) environment.configuration.put(JVMConfigurationKeys.USE_JAVAC, true)
@@ -91,7 +98,7 @@ abstract class AbstractCompileKotlinAgainstJavaTest : TestCaseWithTmpdir() {
environment.registerJavac( environment.registerJavac(
javaFiles = javaFiles, javaFiles = javaFiles,
kotlinFiles = ktFiles, kotlinFiles = ktFiles,
arguments = arrayOf("-proc:none"), arguments = if (aptMode) arrayOf() else arrayOf("-proc:none"),
bootClasspath = listOf(findMockJdkRtJar()) bootClasspath = listOf(findMockJdkRtJar())
) )
ModuleVisibilityManager.SERVICE.getInstance(environment.project).addModule( ModuleVisibilityManager.SERVICE.getInstance(environment.project).addModule(
@@ -298,7 +298,8 @@ fun main(args: Array<String>) {
} }
testClass<AbstractCompileKotlinAgainstJavaTest> { testClass<AbstractCompileKotlinAgainstJavaTest> {
model("compileKotlinAgainstJava") model("compileKotlinAgainstJava", testClassName = "WithAPT", testMethod = "doTestWithAPT")
model("compileKotlinAgainstJava", testClassName = "WithoutAPT", testMethod = "doTestWithoutAPT")
} }
testClass<AbstractCompileKotlinAgainstKotlinTest> { testClass<AbstractCompileKotlinAgainstKotlinTest> {
@@ -16,285 +16,571 @@ import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all") @SuppressWarnings("all")
@TestMetadata("compiler/testData/compileKotlinAgainstJava")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class CompileKotlinAgainstJavaTestGenerated extends AbstractCompileKotlinAgainstJavaTest { public class CompileKotlinAgainstJavaTestGenerated extends AbstractCompileKotlinAgainstJavaTest {
private void runTest(String testDataFilePath) throws Exception { @TestMetadata("compiler/testData/compileKotlinAgainstJava")
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class WithAPT extends AbstractCompileKotlinAgainstJavaTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestWithAPT, this, testDataFilePath);
}
@TestMetadata("AbstractClass.kt")
public void testAbstractClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/AbstractClass.kt");
}
@TestMetadata("AbstractEnum.kt")
public void testAbstractEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/AbstractEnum.kt");
}
public void testAllFilesPresentInWithAPT() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileKotlinAgainstJava"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("AnnotationWithArguments.kt")
public void testAnnotationWithArguments() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/AnnotationWithArguments.kt");
}
@TestMetadata("AnnotationWithField.kt")
public void testAnnotationWithField() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/AnnotationWithField.kt");
}
@TestMetadata("AsteriskInImport.kt")
public void testAsteriskInImport() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/AsteriskInImport.kt");
}
@TestMetadata("CheckKotlinStub.kt")
public void testCheckKotlinStub() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/CheckKotlinStub.kt");
}
@TestMetadata("CheckNotNull.kt")
public void testCheckNotNull() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/CheckNotNull.kt");
}
@TestMetadata("Class.kt")
public void testClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Class.kt");
}
@TestMetadata("ClassWithNestedEnum.kt")
public void testClassWithNestedEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ClassWithNestedEnum.kt");
}
@TestMetadata("ClassWithTypeParameter.kt")
public void testClassWithTypeParameter() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ClassWithTypeParameter.kt");
}
@TestMetadata("CyclicDependencies.kt")
public void testCyclicDependencies() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/CyclicDependencies.kt");
}
@TestMetadata("DefaultModifier.kt")
public void testDefaultModifier() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/DefaultModifier.kt");
}
@TestMetadata("EnclosingClassInner.kt")
public void testEnclosingClassInner() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/EnclosingClassInner.kt");
}
@TestMetadata("Enum.kt")
public void testEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Enum.kt");
}
@TestMetadata("EnumName.kt")
public void testEnumName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/EnumName.kt");
}
@TestMetadata("EnumValues.kt")
public void testEnumValues() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/EnumValues.kt");
}
@TestMetadata("Inheritance.kt")
public void testInheritance() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Inheritance.kt");
}
@TestMetadata("InheritedInner.kt")
public void testInheritedInner() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InheritedInner.kt");
}
@TestMetadata("InnerCanonicalName.kt")
public void testInnerCanonicalName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InnerCanonicalName.kt");
}
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InnerClass.kt");
}
@TestMetadata("InnerClassFromAsteriskImport.kt")
public void testInnerClassFromAsteriskImport() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InnerClassFromAsteriskImport.kt");
}
@TestMetadata("InnerClassFromImport.kt")
public void testInnerClassFromImport() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InnerClassFromImport.kt");
}
@TestMetadata("InnerWithGenericOuter.kt")
public void testInnerWithGenericOuter() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InnerWithGenericOuter.kt");
}
@TestMetadata("Interface.kt")
public void testInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Interface.kt");
}
@TestMetadata("InterfaceField.kt")
public void testInterfaceField() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InterfaceField.kt");
}
@TestMetadata("InterfaceMemberClass.kt")
public void testInterfaceMemberClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InterfaceMemberClass.kt");
}
@TestMetadata("InterfaceWithDefault.kt")
public void testInterfaceWithDefault() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InterfaceWithDefault.kt");
}
@TestMetadata("JavaLangClass.kt")
public void testJavaLangClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/JavaLangClass.kt");
}
@TestMetadata("ListImpl.kt")
public void testListImpl() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ListImpl.kt");
}
@TestMetadata("MapExample.kt")
public void testMapExample() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/MapExample.kt");
}
@TestMetadata("Method.kt")
public void testMethod() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Method.kt");
}
@TestMetadata("MethodWithArgument.kt")
public void testMethodWithArgument() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/MethodWithArgument.kt");
}
@TestMetadata("MethodWithSeveralTypeParameters.kt")
public void testMethodWithSeveralTypeParameters() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/MethodWithSeveralTypeParameters.kt");
}
@TestMetadata("MethodWithTypeParameter.kt")
public void testMethodWithTypeParameter() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/MethodWithTypeParameter.kt");
}
@TestMetadata("MethodWithWildcard.kt")
public void testMethodWithWildcard() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/MethodWithWildcard.kt");
}
@TestMetadata("Nesting.kt")
public void testNesting() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Nesting.kt");
}
@TestMetadata("RawReturnType.kt")
public void testRawReturnType() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/RawReturnType.kt");
}
@TestMetadata("ReturnEnum.kt")
public void testReturnEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnEnum.kt");
}
@TestMetadata("ReturnInnerClass.kt")
public void testReturnInnerClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerClass.kt");
}
@TestMetadata("ReturnInnerInInner.kt")
public void testReturnInnerInInner() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerInInner.kt");
}
@TestMetadata("ReturnInnerInner.kt")
public void testReturnInnerInner() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerInner.kt");
}
@TestMetadata("ReturnNested.kt")
public void testReturnNested() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnNested.kt");
}
@TestMetadata("ReturnNestedFQ.kt")
public void testReturnNestedFQ() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnNestedFQ.kt");
}
@TestMetadata("ReturnType.kt")
public void testReturnType() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnType.kt");
}
@TestMetadata("ReturnTypeResolution.kt")
public void testReturnTypeResolution() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnTypeResolution.kt");
}
@TestMetadata("SeveralInnerClasses.kt")
public void testSeveralInnerClasses() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/SeveralInnerClasses.kt");
}
@TestMetadata("SimpleAnnotation.kt")
public void testSimpleAnnotation() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/SimpleAnnotation.kt");
}
@TestMetadata("SimpleWildcard.kt")
public void testSimpleWildcard() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/SimpleWildcard.kt");
}
@TestMetadata("Singleton.kt")
public void testSingleton() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Singleton.kt");
}
@TestMetadata("StaticNestedClass.kt")
public void testStaticNestedClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/StaticNestedClass.kt");
}
@TestMetadata("TypeArgumentInSuperType.kt")
public void testTypeArgumentInSuperType() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/TypeArgumentInSuperType.kt");
}
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/TypeParameter.kt");
}
@TestMetadata("UseKtClass.kt")
public void testUseKtClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/UseKtClass.kt");
}
@TestMetadata("Vararg.kt")
public void testVararg() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Vararg.kt");
}
} }
@TestMetadata("AbstractClass.kt") @TestMetadata("compiler/testData/compileKotlinAgainstJava")
public void testAbstractClass() throws Exception { @TestDataPath("$PROJECT_ROOT")
runTest("compiler/testData/compileKotlinAgainstJava/AbstractClass.kt"); @RunWith(JUnit3RunnerWithInners.class)
} public static class WithoutAPT extends AbstractCompileKotlinAgainstJavaTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestWithoutAPT, this, testDataFilePath);
}
@TestMetadata("AbstractEnum.kt") @TestMetadata("AbstractClass.kt")
public void testAbstractEnum() throws Exception { public void testAbstractClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/AbstractEnum.kt"); runTest("compiler/testData/compileKotlinAgainstJava/AbstractClass.kt");
} }
public void testAllFilesPresentInCompileKotlinAgainstJava() throws Exception { @TestMetadata("AbstractEnum.kt")
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileKotlinAgainstJava"), Pattern.compile("^(.+)\\.kt$"), true); public void testAbstractEnum() throws Exception {
} runTest("compiler/testData/compileKotlinAgainstJava/AbstractEnum.kt");
}
@TestMetadata("AnnotationWithArguments.kt") public void testAllFilesPresentInWithoutAPT() throws Exception {
public void testAnnotationWithArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileKotlinAgainstJava"), Pattern.compile("^(.+)\\.kt$"), true);
runTest("compiler/testData/compileKotlinAgainstJava/AnnotationWithArguments.kt"); }
}
@TestMetadata("AnnotationWithField.kt") @TestMetadata("AnnotationWithArguments.kt")
public void testAnnotationWithField() throws Exception { public void testAnnotationWithArguments() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/AnnotationWithField.kt"); runTest("compiler/testData/compileKotlinAgainstJava/AnnotationWithArguments.kt");
} }
@TestMetadata("AsteriskInImport.kt") @TestMetadata("AnnotationWithField.kt")
public void testAsteriskInImport() throws Exception { public void testAnnotationWithField() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/AsteriskInImport.kt"); runTest("compiler/testData/compileKotlinAgainstJava/AnnotationWithField.kt");
} }
@TestMetadata("CheckKotlinStub.kt") @TestMetadata("AsteriskInImport.kt")
public void testCheckKotlinStub() throws Exception { public void testAsteriskInImport() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/CheckKotlinStub.kt"); runTest("compiler/testData/compileKotlinAgainstJava/AsteriskInImport.kt");
} }
@TestMetadata("CheckNotNull.kt") @TestMetadata("CheckKotlinStub.kt")
public void testCheckNotNull() throws Exception { public void testCheckKotlinStub() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/CheckNotNull.kt"); runTest("compiler/testData/compileKotlinAgainstJava/CheckKotlinStub.kt");
} }
@TestMetadata("Class.kt") @TestMetadata("CheckNotNull.kt")
public void testClass() throws Exception { public void testCheckNotNull() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Class.kt"); runTest("compiler/testData/compileKotlinAgainstJava/CheckNotNull.kt");
} }
@TestMetadata("ClassWithNestedEnum.kt") @TestMetadata("Class.kt")
public void testClassWithNestedEnum() throws Exception { public void testClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ClassWithNestedEnum.kt"); runTest("compiler/testData/compileKotlinAgainstJava/Class.kt");
} }
@TestMetadata("ClassWithTypeParameter.kt") @TestMetadata("ClassWithNestedEnum.kt")
public void testClassWithTypeParameter() throws Exception { public void testClassWithNestedEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ClassWithTypeParameter.kt"); runTest("compiler/testData/compileKotlinAgainstJava/ClassWithNestedEnum.kt");
} }
@TestMetadata("CyclicDependencies.kt") @TestMetadata("ClassWithTypeParameter.kt")
public void testCyclicDependencies() throws Exception { public void testClassWithTypeParameter() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/CyclicDependencies.kt"); runTest("compiler/testData/compileKotlinAgainstJava/ClassWithTypeParameter.kt");
} }
@TestMetadata("DefaultModifier.kt") @TestMetadata("CyclicDependencies.kt")
public void testDefaultModifier() throws Exception { public void testCyclicDependencies() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/DefaultModifier.kt"); runTest("compiler/testData/compileKotlinAgainstJava/CyclicDependencies.kt");
} }
@TestMetadata("EnclosingClassInner.kt") @TestMetadata("DefaultModifier.kt")
public void testEnclosingClassInner() throws Exception { public void testDefaultModifier() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/EnclosingClassInner.kt"); runTest("compiler/testData/compileKotlinAgainstJava/DefaultModifier.kt");
} }
@TestMetadata("Enum.kt") @TestMetadata("EnclosingClassInner.kt")
public void testEnum() throws Exception { public void testEnclosingClassInner() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Enum.kt"); runTest("compiler/testData/compileKotlinAgainstJava/EnclosingClassInner.kt");
} }
@TestMetadata("EnumName.kt") @TestMetadata("Enum.kt")
public void testEnumName() throws Exception { public void testEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/EnumName.kt"); runTest("compiler/testData/compileKotlinAgainstJava/Enum.kt");
} }
@TestMetadata("EnumValues.kt") @TestMetadata("EnumName.kt")
public void testEnumValues() throws Exception { public void testEnumName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/EnumValues.kt"); runTest("compiler/testData/compileKotlinAgainstJava/EnumName.kt");
} }
@TestMetadata("Inheritance.kt") @TestMetadata("EnumValues.kt")
public void testInheritance() throws Exception { public void testEnumValues() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Inheritance.kt"); runTest("compiler/testData/compileKotlinAgainstJava/EnumValues.kt");
} }
@TestMetadata("InheritedInner.kt") @TestMetadata("Inheritance.kt")
public void testInheritedInner() throws Exception { public void testInheritance() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InheritedInner.kt"); runTest("compiler/testData/compileKotlinAgainstJava/Inheritance.kt");
} }
@TestMetadata("InnerCanonicalName.kt") @TestMetadata("InheritedInner.kt")
public void testInnerCanonicalName() throws Exception { public void testInheritedInner() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InnerCanonicalName.kt"); runTest("compiler/testData/compileKotlinAgainstJava/InheritedInner.kt");
} }
@TestMetadata("InnerClass.kt") @TestMetadata("InnerCanonicalName.kt")
public void testInnerClass() throws Exception { public void testInnerCanonicalName() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InnerClass.kt"); runTest("compiler/testData/compileKotlinAgainstJava/InnerCanonicalName.kt");
} }
@TestMetadata("InnerClassFromAsteriskImport.kt") @TestMetadata("InnerClass.kt")
public void testInnerClassFromAsteriskImport() throws Exception { public void testInnerClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InnerClassFromAsteriskImport.kt"); runTest("compiler/testData/compileKotlinAgainstJava/InnerClass.kt");
} }
@TestMetadata("InnerClassFromImport.kt") @TestMetadata("InnerClassFromAsteriskImport.kt")
public void testInnerClassFromImport() throws Exception { public void testInnerClassFromAsteriskImport() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InnerClassFromImport.kt"); runTest("compiler/testData/compileKotlinAgainstJava/InnerClassFromAsteriskImport.kt");
} }
@TestMetadata("InnerWithGenericOuter.kt") @TestMetadata("InnerClassFromImport.kt")
public void testInnerWithGenericOuter() throws Exception { public void testInnerClassFromImport() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InnerWithGenericOuter.kt"); runTest("compiler/testData/compileKotlinAgainstJava/InnerClassFromImport.kt");
} }
@TestMetadata("Interface.kt") @TestMetadata("InnerWithGenericOuter.kt")
public void testInterface() throws Exception { public void testInnerWithGenericOuter() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Interface.kt"); runTest("compiler/testData/compileKotlinAgainstJava/InnerWithGenericOuter.kt");
} }
@TestMetadata("InterfaceField.kt") @TestMetadata("Interface.kt")
public void testInterfaceField() throws Exception { public void testInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InterfaceField.kt"); runTest("compiler/testData/compileKotlinAgainstJava/Interface.kt");
} }
@TestMetadata("InterfaceMemberClass.kt") @TestMetadata("InterfaceField.kt")
public void testInterfaceMemberClass() throws Exception { public void testInterfaceField() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InterfaceMemberClass.kt"); runTest("compiler/testData/compileKotlinAgainstJava/InterfaceField.kt");
} }
@TestMetadata("InterfaceWithDefault.kt") @TestMetadata("InterfaceMemberClass.kt")
public void testInterfaceWithDefault() throws Exception { public void testInterfaceMemberClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/InterfaceWithDefault.kt"); runTest("compiler/testData/compileKotlinAgainstJava/InterfaceMemberClass.kt");
} }
@TestMetadata("JavaLangClass.kt") @TestMetadata("InterfaceWithDefault.kt")
public void testJavaLangClass() throws Exception { public void testInterfaceWithDefault() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/JavaLangClass.kt"); runTest("compiler/testData/compileKotlinAgainstJava/InterfaceWithDefault.kt");
} }
@TestMetadata("ListImpl.kt") @TestMetadata("JavaLangClass.kt")
public void testListImpl() throws Exception { public void testJavaLangClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ListImpl.kt"); runTest("compiler/testData/compileKotlinAgainstJava/JavaLangClass.kt");
} }
@TestMetadata("MapExample.kt") @TestMetadata("ListImpl.kt")
public void testMapExample() throws Exception { public void testListImpl() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/MapExample.kt"); runTest("compiler/testData/compileKotlinAgainstJava/ListImpl.kt");
} }
@TestMetadata("Method.kt") @TestMetadata("MapExample.kt")
public void testMethod() throws Exception { public void testMapExample() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Method.kt"); runTest("compiler/testData/compileKotlinAgainstJava/MapExample.kt");
} }
@TestMetadata("MethodWithArgument.kt") @TestMetadata("Method.kt")
public void testMethodWithArgument() throws Exception { public void testMethod() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/MethodWithArgument.kt"); runTest("compiler/testData/compileKotlinAgainstJava/Method.kt");
} }
@TestMetadata("MethodWithSeveralTypeParameters.kt") @TestMetadata("MethodWithArgument.kt")
public void testMethodWithSeveralTypeParameters() throws Exception { public void testMethodWithArgument() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/MethodWithSeveralTypeParameters.kt"); runTest("compiler/testData/compileKotlinAgainstJava/MethodWithArgument.kt");
} }
@TestMetadata("MethodWithTypeParameter.kt") @TestMetadata("MethodWithSeveralTypeParameters.kt")
public void testMethodWithTypeParameter() throws Exception { public void testMethodWithSeveralTypeParameters() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/MethodWithTypeParameter.kt"); runTest("compiler/testData/compileKotlinAgainstJava/MethodWithSeveralTypeParameters.kt");
} }
@TestMetadata("MethodWithWildcard.kt") @TestMetadata("MethodWithTypeParameter.kt")
public void testMethodWithWildcard() throws Exception { public void testMethodWithTypeParameter() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/MethodWithWildcard.kt"); runTest("compiler/testData/compileKotlinAgainstJava/MethodWithTypeParameter.kt");
} }
@TestMetadata("Nesting.kt") @TestMetadata("MethodWithWildcard.kt")
public void testNesting() throws Exception { public void testMethodWithWildcard() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Nesting.kt"); runTest("compiler/testData/compileKotlinAgainstJava/MethodWithWildcard.kt");
} }
@TestMetadata("RawReturnType.kt") @TestMetadata("Nesting.kt")
public void testRawReturnType() throws Exception { public void testNesting() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/RawReturnType.kt"); runTest("compiler/testData/compileKotlinAgainstJava/Nesting.kt");
} }
@TestMetadata("ReturnEnum.kt") @TestMetadata("RawReturnType.kt")
public void testReturnEnum() throws Exception { public void testRawReturnType() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnEnum.kt"); runTest("compiler/testData/compileKotlinAgainstJava/RawReturnType.kt");
} }
@TestMetadata("ReturnInnerClass.kt") @TestMetadata("ReturnEnum.kt")
public void testReturnInnerClass() throws Exception { public void testReturnEnum() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerClass.kt"); runTest("compiler/testData/compileKotlinAgainstJava/ReturnEnum.kt");
} }
@TestMetadata("ReturnInnerInInner.kt") @TestMetadata("ReturnInnerClass.kt")
public void testReturnInnerInInner() throws Exception { public void testReturnInnerClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerInInner.kt"); runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerClass.kt");
} }
@TestMetadata("ReturnInnerInner.kt") @TestMetadata("ReturnInnerInInner.kt")
public void testReturnInnerInner() throws Exception { public void testReturnInnerInInner() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerInner.kt"); runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerInInner.kt");
} }
@TestMetadata("ReturnNested.kt") @TestMetadata("ReturnInnerInner.kt")
public void testReturnNested() throws Exception { public void testReturnInnerInner() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnNested.kt"); runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerInner.kt");
} }
@TestMetadata("ReturnNestedFQ.kt") @TestMetadata("ReturnNested.kt")
public void testReturnNestedFQ() throws Exception { public void testReturnNested() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnNestedFQ.kt"); runTest("compiler/testData/compileKotlinAgainstJava/ReturnNested.kt");
} }
@TestMetadata("ReturnType.kt") @TestMetadata("ReturnNestedFQ.kt")
public void testReturnType() throws Exception { public void testReturnNestedFQ() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnType.kt"); runTest("compiler/testData/compileKotlinAgainstJava/ReturnNestedFQ.kt");
} }
@TestMetadata("ReturnTypeResolution.kt") @TestMetadata("ReturnType.kt")
public void testReturnTypeResolution() throws Exception { public void testReturnType() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/ReturnTypeResolution.kt"); runTest("compiler/testData/compileKotlinAgainstJava/ReturnType.kt");
} }
@TestMetadata("SeveralInnerClasses.kt") @TestMetadata("ReturnTypeResolution.kt")
public void testSeveralInnerClasses() throws Exception { public void testReturnTypeResolution() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/SeveralInnerClasses.kt"); runTest("compiler/testData/compileKotlinAgainstJava/ReturnTypeResolution.kt");
} }
@TestMetadata("SimpleAnnotation.kt") @TestMetadata("SeveralInnerClasses.kt")
public void testSimpleAnnotation() throws Exception { public void testSeveralInnerClasses() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/SimpleAnnotation.kt"); runTest("compiler/testData/compileKotlinAgainstJava/SeveralInnerClasses.kt");
} }
@TestMetadata("SimpleWildcard.kt") @TestMetadata("SimpleAnnotation.kt")
public void testSimpleWildcard() throws Exception { public void testSimpleAnnotation() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/SimpleWildcard.kt"); runTest("compiler/testData/compileKotlinAgainstJava/SimpleAnnotation.kt");
} }
@TestMetadata("Singleton.kt") @TestMetadata("SimpleWildcard.kt")
public void testSingleton() throws Exception { public void testSimpleWildcard() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Singleton.kt"); runTest("compiler/testData/compileKotlinAgainstJava/SimpleWildcard.kt");
} }
@TestMetadata("StaticNestedClass.kt") @TestMetadata("Singleton.kt")
public void testStaticNestedClass() throws Exception { public void testSingleton() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/StaticNestedClass.kt"); runTest("compiler/testData/compileKotlinAgainstJava/Singleton.kt");
} }
@TestMetadata("TypeArgumentInSuperType.kt") @TestMetadata("StaticNestedClass.kt")
public void testTypeArgumentInSuperType() throws Exception { public void testStaticNestedClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/TypeArgumentInSuperType.kt"); runTest("compiler/testData/compileKotlinAgainstJava/StaticNestedClass.kt");
} }
@TestMetadata("TypeParameter.kt") @TestMetadata("TypeArgumentInSuperType.kt")
public void testTypeParameter() throws Exception { public void testTypeArgumentInSuperType() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/TypeParameter.kt"); runTest("compiler/testData/compileKotlinAgainstJava/TypeArgumentInSuperType.kt");
} }
@TestMetadata("UseKtClass.kt") @TestMetadata("TypeParameter.kt")
public void testUseKtClass() throws Exception { public void testTypeParameter() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/UseKtClass.kt"); runTest("compiler/testData/compileKotlinAgainstJava/TypeParameter.kt");
} }
@TestMetadata("Vararg.kt") @TestMetadata("UseKtClass.kt")
public void testVararg() throws Exception { public void testUseKtClass() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Vararg.kt"); runTest("compiler/testData/compileKotlinAgainstJava/UseKtClass.kt");
}
@TestMetadata("Vararg.kt")
public void testVararg() throws Exception {
runTest("compiler/testData/compileKotlinAgainstJava/Vararg.kt");
}
} }
} }