From c90f11b7e654431e74b538f5f7fd05c7bac167ef Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Fri, 29 Aug 2014 18:35:13 +0400 Subject: [PATCH] Support Java symbols in runtime descriptor loading --- .../annotations/classes/Retention.kt | 1 + .../jvm/compiler/AbstractLoadJavaTest.java | 27 +- .../jvm/compiler/LoadDescriptorUtil.java | 18 +- .../AbstractJvmRuntimeDescriptorLoaderTest.kt | 180 +- ...mRuntimeDescriptorLoaderTestGenerated.java | 6110 ++++++++++------- .../java/reflect/ReflectJavaClassFinder.kt | 8 +- .../reflect/ReflectJavaAnnotation.kt | 40 + .../reflect/ReflectJavaAnnotationArguments.kt | 69 + .../structure/reflect/ReflectJavaArrayType.kt | 6 +- .../structure/reflect/ReflectJavaClass.kt | 95 +- .../reflect/ReflectJavaClassifierType.kt | 17 +- .../reflect/ReflectJavaConstructor.kt | 63 + .../structure/reflect/ReflectJavaField.kt | 6 +- .../structure/reflect/ReflectJavaMember.kt | 20 +- .../structure/reflect/ReflectJavaMethod.kt | 22 +- .../java/structure/reflect/ReflectJavaType.kt | 8 +- .../reflect/ReflectJavaTypeParameter.kt | 4 +- .../structure/reflect/reflectStructureUtil.kt | 11 +- .../kotlin/generators/tests/GenerateTests.kt | 1 + 19 files changed, 4018 insertions(+), 2688 deletions(-) create mode 100644 core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaAnnotation.kt create mode 100644 core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaAnnotationArguments.kt create mode 100644 core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaConstructor.kt diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt index 8af0034ba43..6f1ded2bbd0 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt @@ -1,4 +1,5 @@ //ALLOW_AST_ACCESS +//SKIP_IN_RUNTIME_TEST package test import java.lang.annotation.* diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractLoadJavaTest.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractLoadJavaTest.java index 1d981a577ba..ebbecf0a6b3 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractLoadJavaTest.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractLoadJavaTest.java @@ -52,10 +52,7 @@ import org.junit.Assert; import java.io.File; import java.io.FileFilter; import java.io.IOException; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.regex.Pattern; import static org.jetbrains.kotlin.jvm.compiler.LoadDescriptorUtil.*; @@ -82,7 +79,8 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir { List javaSources = FileUtil.findFilesByMask(Pattern.compile(".+\\.java"), sourcesDir); Pair binaryPackageAndContext = compileJavaAndLoadTestPackageAndBindingContextFromBinary( - javaSources, tmpdir, myTestRootDisposable, ConfigurationKind.JDK_ONLY); + javaSources, tmpdir, ConfigurationKind.JDK_ONLY + ); checkJavaPackage(expectedFile, binaryPackageAndContext.first, binaryPackageAndContext.second, DONT_INCLUDE_METHODS_OF_OBJECT); } @@ -110,7 +108,8 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir { Assert.assertEquals("test", packageFromSource.getName().asString()); PackageViewDescriptor packageFromBinary = LoadDescriptorUtil.loadTestPackageAndBindingContextFromJavaRoot( - tmpdir, getTestRootDisposable(), configurationKind).first; + tmpdir, getTestRootDisposable(), TestJdkKind.MOCK_JDK, configurationKind + ).first; for (DeclarationDescriptor descriptor : packageFromBinary.getMemberScope().getAllDescriptors()) { if (descriptor instanceof ClassDescriptor) { @@ -208,7 +207,8 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir { FileUtil.copy(originalJavaFile, new File(testPackageDir, originalJavaFile.getName())); Pair javaPackageAndContext = loadTestPackageAndBindingContextFromJavaRoot( - tmpdir, getTestRootDisposable(), ConfigurationKind.JDK_ONLY); + tmpdir, getTestRootDisposable(), TestJdkKind.MOCK_JDK, ConfigurationKind.JDK_ONLY + ); checkJavaPackage(expectedFile, javaPackageAndContext.first, javaPackageAndContext.second, DONT_INCLUDE_METHODS_OF_OBJECT.withValidationStrategy(errorTypesAllowed())); @@ -241,11 +241,22 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir { getTestRootDisposable(), ConfigurationKind.JDK_AND_ANNOTATIONS, TestJdkKind.MOCK_JDK); Pair javaPackageAndContext = compileJavaAndLoadTestPackageAndBindingContextFromBinary( - srcFiles, compiledDir, getTestRootDisposable(), ConfigurationKind.ALL); + srcFiles, compiledDir, ConfigurationKind.ALL + ); checkJavaPackage(getTxtFile(javaFileName), javaPackageAndContext.first, javaPackageAndContext.second, configuration); } + @NotNull + private Pair compileJavaAndLoadTestPackageAndBindingContextFromBinary( + @NotNull Collection javaFiles, + @NotNull File outDir, + @NotNull ConfigurationKind configurationKind + ) throws IOException { + compileJavaWithAnnotationsJar(javaFiles, outDir); + return loadTestPackageAndBindingContextFromJavaRoot(outDir, myTestRootDisposable, TestJdkKind.MOCK_JDK, configurationKind); + } + private static void checkJavaPackage( File txtFile, PackageViewDescriptor javaPackage, diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadDescriptorUtil.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadDescriptorUtil.java index 213ac82de1f..5d8b3135f0f 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadDescriptorUtil.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadDescriptorUtil.java @@ -80,10 +80,12 @@ public final class LoadDescriptorUtil { public static Pair loadTestPackageAndBindingContextFromJavaRoot( @NotNull File javaRoot, @NotNull Disposable disposable, + @NotNull TestJdkKind testJdkKind, @NotNull ConfigurationKind configurationKind ) { CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( - configurationKind, TestJdkKind.MOCK_JDK, + configurationKind, + testJdkKind, JetTestUtils.getAnnotationsJar(), javaRoot, new File("compiler/tests") // for @ExpectLoadError annotation @@ -100,19 +102,7 @@ public final class LoadDescriptorUtil { return Pair.create(packageView, trace.getBindingContext()); } - @NotNull - public static Pair compileJavaAndLoadTestPackageAndBindingContextFromBinary( - @NotNull Collection javaFiles, - @NotNull File outDir, - @NotNull Disposable disposable, - @NotNull ConfigurationKind configurationKind - ) - throws IOException { - compileJavaWithAnnotationsJar(javaFiles, outDir); - return loadTestPackageAndBindingContextFromJavaRoot(outDir, disposable, configurationKind); - } - - private static void compileJavaWithAnnotationsJar(@NotNull Collection javaFiles, @NotNull File outDir) throws IOException { + public static void compileJavaWithAnnotationsJar(@NotNull Collection javaFiles, @NotNull File outDir) throws IOException { String classPath = ForTestCompileRuntime.runtimeJarForTests() + File.pathSeparator + JetTestUtils.getAnnotationsJar().getPath(); JetTestUtils.compileJavaFiles(javaFiles, Arrays.asList( diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt b/compiler/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt index 7efd66013d6..f7bf3490066 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt @@ -16,32 +16,40 @@ package org.jetbrains.kotlin.jvm.runtime +import com.intellij.openapi.util.io.FileUtil import org.jetbrains.kotlin.cli.common.output.outputUtils.writeAllTo -import org.jetbrains.kotlin.codegen.GeneratedClassLoader import org.jetbrains.kotlin.codegen.GenerationUtils import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime -import org.jetbrains.kotlin.descriptors.* +import org.jetbrains.kotlin.descriptors.ConstructorDescriptor +import org.jetbrains.kotlin.descriptors.DeclarationDescriptorVisitor +import org.jetbrains.kotlin.descriptors.ModuleDescriptor +import org.jetbrains.kotlin.descriptors.PackageViewDescriptor import org.jetbrains.kotlin.jvm.compiler.ExpectedLoadErrorsUtil import org.jetbrains.kotlin.jvm.compiler.LoadDescriptorUtil +import org.jetbrains.kotlin.load.java.JvmAnnotationNames +import org.jetbrains.kotlin.load.java.structure.reflect.classId import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader import org.jetbrains.kotlin.load.kotlin.reflect.ReflectKotlinClass import org.jetbrains.kotlin.load.kotlin.reflect.RuntimeModuleData import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.name.FqNameUnsafe import org.jetbrains.kotlin.renderer.DescriptorRenderer import org.jetbrains.kotlin.renderer.DescriptorRendererBuilder -import org.jetbrains.kotlin.resolve.descriptorUtil.resolveTopLevelClass +import org.jetbrains.kotlin.resolve.DescriptorUtils import org.jetbrains.kotlin.resolve.scopes.JetScope import org.jetbrains.kotlin.resolve.scopes.RedeclarationHandler -import org.jetbrains.kotlin.resolve.scopes.WritableScope.LockLevel +import org.jetbrains.kotlin.resolve.scopes.WritableScope import org.jetbrains.kotlin.resolve.scopes.WritableScopeImpl -import org.jetbrains.kotlin.test.ConfigurationKind -import org.jetbrains.kotlin.test.JetTestUtils -import org.jetbrains.kotlin.test.TestCaseWithTmpdir +import org.jetbrains.kotlin.serialization.deserialization.findClassAcrossModuleDependencies +import org.jetbrains.kotlin.test.* +import org.jetbrains.kotlin.test.JetTestUtils.TestFileFactoryNoModules +import org.jetbrains.kotlin.test.util.DescriptorValidator.ValidationVisitor.errorTypesForbidden import org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator +import org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.Configuration import org.jetbrains.kotlin.types.TypeSubstitutor import org.jetbrains.kotlin.utils.sure import java.io.File +import java.net.URLClassLoader +import java.util.regex.Pattern public abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdir() { class object { @@ -49,8 +57,10 @@ public abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdi .setWithDefinedIn(false) .setExcludedAnnotationClasses(listOf( ExpectedLoadErrorsUtil.ANNOTATION_CLASS_NAME, + // TODO: add these annotations when they are retained at runtime "kotlin.deprecated", "kotlin.data", + "kotlin.inline", "org.jetbrains.annotations.NotNull", "org.jetbrains.annotations.Nullable", "org.jetbrains.annotations.Mutable", @@ -64,92 +74,122 @@ public abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdi } // NOTE: this test does a dirty hack of text substitution to make all annotations defined in source code retain at runtime. - // Specifically each "annotation class" is replaced by "Retention(RUNTIME) annotation class" - protected fun doTest(ktFileName: String) { - val ktFile = File(ktFileName) + // Specifically each "annotation class" in Kotlin sources is replaced by "Retention(RUNTIME) annotation class", and the same in Java + protected fun doTest(fileName: String) { + val file = File(fileName) + val text = FileUtil.loadFile(file, true) - val environment = JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable, ConfigurationKind.ALL) - val jetFile = JetTestUtils.createFile(ktFileName, loadFileAddingRuntimeRetention(ktFile), environment.getProject()) - val classFileFactory = GenerationUtils.compileFileGetClassFileFactoryForTest(jetFile) - val classLoader = GeneratedClassLoader(classFileFactory, null, ForTestCompileRuntime.runtimeJarForTests().toURI().toURL()) + if (InTextDirectivesUtils.isDirectiveDefined(text, "SKIP_IN_RUNTIME_TEST")) return - classFileFactory.writeAllTo(tmpdir) + compileFile(file, text) + val classLoader = URLClassLoader(array(tmpdir.toURI().toURL()), ForTestCompileRuntime.runtimeJarClassLoader()) + + val actual = createReflectedPackageView(classLoader) + + val expected = LoadDescriptorUtil.loadTestPackageAndBindingContextFromJavaRoot( + tmpdir, getTestRootDisposable(), TestJdkKind.FULL_JDK, ConfigurationKind.ALL + ).first + + val comparatorConfiguration = Configuration( + /* checkPrimaryConstructors = */ fileName.endsWith(".kt"), + /* checkPropertyAccessors = */ true, + /* includeMethodsOfKotlinAny = */ false, + { descriptor -> + // Skip annotation constructors because order of their parameters is not retained at runtime + !(descriptor is ConstructorDescriptor && DescriptorUtils.isAnnotationClass(descriptor.getContainingDeclaration())) + }, + errorTypesForbidden(), renderer + ) + RecursiveDescriptorComparator.validateAndCompareDescriptors(expected, actual, comparatorConfiguration, null) + } + + private fun compileFile(file: File, text: String) { + val fileName = file.getName() + when { + fileName.endsWith(".java") -> { + val sources = JetTestUtils.createTestFiles(fileName, text, object : TestFileFactoryNoModules() { + override fun create(fileName: String, text: String, directives: Map): File { + val targetFile = File(tmpdir, fileName) + targetFile.writeText(addRuntimeRetentionToJavaSource(text)) + return targetFile + } + }) + LoadDescriptorUtil.compileJavaWithAnnotationsJar(sources, tmpdir) + } + fileName.endsWith(".kt") -> { + val environment = JetTestUtils.createEnvironmentWithFullJdk(myTestRootDisposable) + val jetFile = JetTestUtils.createFile(file.getPath(), addRuntimeRetentionToKotlinSource(text), environment.getProject()) + GenerationUtils.compileFileGetClassFileFactoryForTest(jetFile).writeAllTo(tmpdir) + } + } + } + + private fun createReflectedPackageView(classLoader: URLClassLoader): SyntheticPackageViewForTest { val module = RuntimeModuleData.create(classLoader).module // Since runtime package view descriptor doesn't support getAllDescriptors(), we construct a synthetic package view here. // It has in its scope descriptors for all the classes and top level members generated by the compiler - val actual = object : PackageViewDescriptor { - val scope = WritableScopeImpl(JetScope.Empty, this, RedeclarationHandler.THROW_EXCEPTION, "runtime descriptor loader test") - - override fun getFqName() = LoadDescriptorUtil.TEST_PACKAGE_FQNAME - override fun getMemberScope() = scope - override fun getModule() = module - override fun accept(visitor: DeclarationDescriptorVisitor, data: D): R = - visitor.visitPackageViewDescriptor(this, data) - - override fun getContainingDeclaration() = throw UnsupportedOperationException() - override fun getOriginal() = throw UnsupportedOperationException() - override fun substitute(substitutor: TypeSubstitutor) = throw UnsupportedOperationException() - override fun acceptVoid(visitor: DeclarationDescriptorVisitor?) = throw UnsupportedOperationException() - override fun getAnnotations() = throw UnsupportedOperationException() - override fun getName() = throw UnsupportedOperationException() - } - + val actual = SyntheticPackageViewForTest(module) val scope = actual.getMemberScope() - scope.changeLockLevel(LockLevel.BOTH) - for (outputFile in classLoader.getAllGeneratedFiles()) { - val className = outputFile.relativePath.substringBeforeLast(".class").replace('/', '.').replace('\\', '.') + val generatedPackageDir = File(tmpdir, LoadDescriptorUtil.TEST_PACKAGE_FQNAME.pathSegments().single().asString()) + val allClassFiles = FileUtil.findFilesByMask(Pattern.compile(".*\\.class"), generatedPackageDir) + + for (classFile in allClassFiles) { + val className = tmpdir.relativePath(classFile).substringBeforeLast(".class").replace('/', '.').replace('\\', '.') val klass = classLoader.loadClass(className).sure("Couldn't load class $className") + val header = ReflectKotlinClass.create(klass)?.getClassHeader() - when (ReflectKotlinClass.create(klass)!!.getClassHeader().kind) { - KotlinClassHeader.Kind.PACKAGE_FACADE -> { - val packageView = module.getPackage(actual.getFqName()) ?: error("Couldn't resolve package ${actual.getFqName()}") - for (descriptor in packageView.getMemberScope().getAllDescriptors()) { - when (descriptor) { - is FunctionDescriptor -> scope.addFunctionDescriptor(descriptor) - is PropertyDescriptor -> scope.addPropertyDescriptor(descriptor) - } - } - } - KotlinClassHeader.Kind.CLASS -> { - val classDescriptor = - resolveClassByFqNameInModule(module, FqNameUnsafe(className)).sure("Couldn't resolve class $className") - if (classDescriptor.getContainingDeclaration() is PackageFragmentDescriptor) { - scope.addClassifierDescriptor(classDescriptor) - } + if (header?.kind == KotlinClassHeader.Kind.PACKAGE_FACADE) { + val packageView = module.getPackage(actual.getFqName()).sure("Couldn't resolve package ${actual.getFqName()}") + scope.importScope(packageView.getMemberScope()) + } + else if (header == null || + (header.kind == KotlinClassHeader.Kind.CLASS && header.classKind == JvmAnnotationNames.KotlinClass.Kind.CLASS)) { + // Either a normal Kotlin class or a Java class + val classDescriptor = module.findClassAcrossModuleDependencies(klass.classId).sure("Couldn't resolve class $className") + if (DescriptorUtils.isTopLevelDeclaration(classDescriptor)) { + scope.addClassifierDescriptor(classDescriptor) } } } - - val expected = LoadDescriptorUtil.loadTestPackageAndBindingContextFromJavaRoot(tmpdir, getTestRootDisposable(), - ConfigurationKind.ALL) - val comparatorConfiguration = RecursiveDescriptorComparator.DONT_INCLUDE_METHODS_OF_OBJECT - .checkPrimaryConstructors(true) - .checkPropertyAccessors(true) - .withRenderer(renderer) - RecursiveDescriptorComparator.validateAndCompareDescriptors(expected.first, actual, comparatorConfiguration, null) + return actual } - private fun loadFileAddingRuntimeRetention(file: File): String { - return file.readText().replace( + private fun addRuntimeRetentionToKotlinSource(text: String): String { + return text.replace( "annotation class", "[java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)] annotation class" ) } - // Resolves not only top level classes, but also nested classes, including class objects and classes nested within them - private fun resolveClassByFqNameInModule(module: ModuleDescriptor, fqName: FqNameUnsafe): ClassDescriptor? { - if (fqName.isRoot()) return null + private fun addRuntimeRetentionToJavaSource(text: String): String { + return text.replace( + "@interface", + "@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @interface" + ) + } - if (fqName.isSafe()) { - val topLevel = module.resolveTopLevelClass(fqName.toSafe()) - if (topLevel != null) return topLevel + private class SyntheticPackageViewForTest(private val module: ModuleDescriptor) : PackageViewDescriptor { + private val scope = WritableScopeImpl(JetScope.Empty, this, RedeclarationHandler.THROW_EXCEPTION, "runtime descriptor loader test") + + ;{ + scope.changeLockLevel(WritableScope.LockLevel.BOTH) } - val parent = resolveClassByFqNameInModule(module, fqName.parent()) ?: return null - return parent.getUnsubstitutedInnerClassesScope().getClassifier(fqName.shortName()) as? ClassDescriptor + override fun getFqName() = LoadDescriptorUtil.TEST_PACKAGE_FQNAME + override fun getMemberScope() = scope + override fun getModule() = module + override fun accept(visitor: DeclarationDescriptorVisitor, data: D): R = + visitor.visitPackageViewDescriptor(this, data) + + override fun getContainingDeclaration() = throw UnsupportedOperationException() + override fun getOriginal() = throw UnsupportedOperationException() + override fun substitute(substitutor: TypeSubstitutor) = throw UnsupportedOperationException() + override fun acceptVoid(visitor: DeclarationDescriptorVisitor?) = throw UnsupportedOperationException() + override fun getAnnotations() = throw UnsupportedOperationException() + override fun getName() = throw UnsupportedOperationException() } } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java index 08d337cb699..fc4071181ad 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java @@ -28,3033 +28,4109 @@ 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/loadJava/compiledKotlin") -@TestDataPath("$PROJECT_ROOT") @InnerTestClasses({ - JvmRuntimeDescriptorLoaderTestGenerated.Annotations.class, - JvmRuntimeDescriptorLoaderTestGenerated.Class.class, - JvmRuntimeDescriptorLoaderTestGenerated.ClassFun.class, - JvmRuntimeDescriptorLoaderTestGenerated.ClassObject.class, - JvmRuntimeDescriptorLoaderTestGenerated.Constructor.class, - JvmRuntimeDescriptorLoaderTestGenerated.DataClass.class, - JvmRuntimeDescriptorLoaderTestGenerated.Enum.class, - JvmRuntimeDescriptorLoaderTestGenerated.FromLoadJava.class, - JvmRuntimeDescriptorLoaderTestGenerated.Fun.class, - JvmRuntimeDescriptorLoaderTestGenerated.Inline.class, - JvmRuntimeDescriptorLoaderTestGenerated.MemberOrder.class, - JvmRuntimeDescriptorLoaderTestGenerated.Nested.class, - JvmRuntimeDescriptorLoaderTestGenerated.PlatformTypes.class, - JvmRuntimeDescriptorLoaderTestGenerated.Prop.class, - JvmRuntimeDescriptorLoaderTestGenerated.Type.class, - JvmRuntimeDescriptorLoaderTestGenerated.Visibility.class, + JvmRuntimeDescriptorLoaderTestGenerated.CompiledKotlin.class, + JvmRuntimeDescriptorLoaderTestGenerated.CompiledJava.class, }) @RunWith(JUnit3RunnerWithInners.class) public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInCompiledKotlin() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations") + @TestMetadata("compiler/testData/loadJava/compiledKotlin") @TestDataPath("$PROJECT_ROOT") @InnerTestClasses({ - Annotations.ClassMembers.class, - Annotations.Classes.class, - Annotations.PackageMembers.class, - Annotations.Parameters.class, - Annotations.PropertiesWithoutBackingFields.class, + CompiledKotlin.Annotations.class, + CompiledKotlin.Class.class, + CompiledKotlin.ClassFun.class, + CompiledKotlin.ClassObject.class, + CompiledKotlin.Constructor.class, + CompiledKotlin.DataClass.class, + CompiledKotlin.Enum.class, + CompiledKotlin.FromLoadJava.class, + CompiledKotlin.Fun.class, + CompiledKotlin.Inline.class, + CompiledKotlin.MemberOrder.class, + CompiledKotlin.Nested.class, + CompiledKotlin.PlatformTypes.class, + CompiledKotlin.Prop.class, + CompiledKotlin.Type.class, + CompiledKotlin.Visibility.class, }) @RunWith(JUnit3RunnerWithInners.class) - public static class Annotations extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInAnnotations() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations"), Pattern.compile("^(.+)\\.kt$"), true); + public static class CompiledKotlin extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInCompiledKotlin() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("AnnotatedAnnotation.kt") - public void testAnnotatedAnnotation() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); - doTest(fileName); - } - - @TestMetadata("AnnotatedMethod.kt") - public void testAnnotatedMethod() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); - doTest(fileName); - } - - @TestMetadata("SimpleAnnotation.kt") - public void testSimpleAnnotation() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); - doTest(fileName); - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations") @TestDataPath("$PROJECT_ROOT") + @InnerTestClasses({ + Annotations.ClassMembers.class, + Annotations.Classes.class, + Annotations.PackageMembers.class, + Annotations.Parameters.class, + Annotations.PropertiesWithoutBackingFields.class, + }) @RunWith(JUnit3RunnerWithInners.class) - public static class ClassMembers extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInClassMembers() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classMembers"), Pattern.compile("^(.+)\\.kt$"), true); + public static class Annotations extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInAnnotations() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("ClassObjectPropertyField.kt") - public void testClassObjectPropertyField() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); + @TestMetadata("AnnotatedAnnotation.kt") + public void testAnnotatedAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); doTest(fileName); } - @TestMetadata("DelegatedProperty.kt") - public void testDelegatedProperty() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); + @TestMetadata("AnnotatedMethod.kt") + public void testAnnotatedMethod() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); doTest(fileName); } - @TestMetadata("EnumArgument.kt") - public void testEnumArgument() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); + @TestMetadata("SimpleAnnotation.kt") + public void testSimpleAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); doTest(fileName); } - @TestMetadata("Function.kt") - public void testFunction() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); - doTest(fileName); + @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassMembers extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInClassMembers() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classMembers"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("ClassObjectPropertyField.kt") + public void testClassObjectPropertyField() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); + doTest(fileName); + } + + @TestMetadata("DelegatedProperty.kt") + public void testDelegatedProperty() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); + doTest(fileName); + } + + @TestMetadata("EnumArgument.kt") + public void testEnumArgument() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); + doTest(fileName); + } + + @TestMetadata("Function.kt") + public void testFunction() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); + doTest(fileName); + } + + @TestMetadata("Getter.kt") + public void testGetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); + doTest(fileName); + } + + @TestMetadata("PropertyField.kt") + public void testPropertyField() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); + doTest(fileName); + } + + @TestMetadata("Setter.kt") + public void testSetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); + doTest(fileName); + } } - @TestMetadata("Getter.kt") - public void testGetter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); - doTest(fileName); + @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Classes extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInClasses() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classes"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("AnnotationInClassObject.kt") + public void testAnnotationInClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); + doTest(fileName); + } + + @TestMetadata("ClassInClassObject.kt") + public void testClassInClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); + doTest(fileName); + } + + @TestMetadata("ClassObject.kt") + public void testClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); + doTest(fileName); + } + + @TestMetadata("ClassObjectInStaticNestedClass.kt") + public void testClassObjectInStaticNestedClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); + doTest(fileName); + } + + @TestMetadata("Deprecated.kt") + public void testDeprecated() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); + doTest(fileName); + } + + @TestMetadata("DollarsInAnnotationName.kt") + public void testDollarsInAnnotationName() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); + doTest(fileName); + } + + @TestMetadata("EnumArgument.kt") + public void testEnumArgument() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); + doTest(fileName); + } + + @TestMetadata("MultipleAnnotations.kt") + public void testMultipleAnnotations() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); + doTest(fileName); + } + + @TestMetadata("NestedAnnotation.kt") + public void testNestedAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); + doTest(fileName); + } + + @TestMetadata("NestedClass.kt") + public void testNestedClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); + doTest(fileName); + } + + @TestMetadata("Retention.kt") + public void testRetention() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); + doTest(fileName); + } + + @TestMetadata("Simple.kt") + public void testSimple() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); + doTest(fileName); + } + + @TestMetadata("WithArgument.kt") + public void testWithArgument() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); + doTest(fileName); + } + + @TestMetadata("WithMultipleArguments.kt") + public void testWithMultipleArguments() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); + doTest(fileName); + } } - @TestMetadata("PropertyField.kt") - public void testPropertyField() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); - doTest(fileName); + @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageMembers extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInPackageMembers() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("DelegatedProperty.kt") + public void testDelegatedProperty() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); + doTest(fileName); + } + + @TestMetadata("EnumArgument.kt") + public void testEnumArgument() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); + doTest(fileName); + } + + @TestMetadata("EnumArrayArgument.kt") + public void testEnumArrayArgument() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); + doTest(fileName); + } + + @TestMetadata("Function.kt") + public void testFunction() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); + doTest(fileName); + } + + @TestMetadata("Getter.kt") + public void testGetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); + doTest(fileName); + } + + @TestMetadata("PropertyField.kt") + public void testPropertyField() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); + doTest(fileName); + } + + @TestMetadata("Setter.kt") + public void testSetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); + doTest(fileName); + } + + @TestMetadata("StringArrayArgument.kt") + public void testStringArrayArgument() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); + doTest(fileName); + } } - @TestMetadata("Setter.kt") - public void testSetter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); - doTest(fileName); + @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Parameters extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInParameters() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/parameters"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("Constructor.kt") + public void testConstructor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); + doTest(fileName); + } + + @TestMetadata("EnumConstructor.kt") + public void testEnumConstructor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); + doTest(fileName); + } + + @TestMetadata("ExtensionFunction.kt") + public void testExtensionFunction() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); + doTest(fileName); + } + + @TestMetadata("ExtensionFunctionInClass.kt") + public void testExtensionFunctionInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtensionPropertySetter.kt") + public void testExtensionPropertySetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); + doTest(fileName); + } + + @TestMetadata("FunctionInClass.kt") + public void testFunctionInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); + doTest(fileName); + } + + @TestMetadata("FunctionInTrait.kt") + public void testFunctionInTrait() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); + doTest(fileName); + } + + @TestMetadata("ManyAnnotations.kt") + public void testManyAnnotations() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); + doTest(fileName); + } + + @TestMetadata("PropertySetterInClass.kt") + public void testPropertySetterInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); + doTest(fileName); + } + + @TestMetadata("TopLevelFunction.kt") + public void testTopLevelFunction() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); + doTest(fileName); + } + + @TestMetadata("TopLevelPropertySetter.kt") + public void testTopLevelPropertySetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PropertiesWithoutBackingFields extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInPropertiesWithoutBackingFields() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("Class.kt") + public void testClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); + doTest(fileName); + } + + @TestMetadata("ClassObject.kt") + public void testClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); + doTest(fileName); + } + + @TestMetadata("ExtensionsWithSameNameClass.kt") + public void testExtensionsWithSameNameClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtensionsWithSameNamePackage.kt") + public void testExtensionsWithSameNamePackage() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); + doTest(fileName); + } + + @TestMetadata("NestedTrait.kt") + public void testNestedTrait() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); + doTest(fileName); + } + + @TestMetadata("TopLevel.kt") + public void testTopLevel() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); + doTest(fileName); + } + + @TestMetadata("Trait.kt") + public void testTrait() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); + doTest(fileName); + } + + @TestMetadata("TraitClassObject.kt") + public void testTraitClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); + doTest(fileName); + } } } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/class") @TestDataPath("$PROJECT_ROOT") + @InnerTestClasses({ + Class.JavaBean.class, + }) @RunWith(JUnit3RunnerWithInners.class) - public static class Classes extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInClasses() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classes"), Pattern.compile("^(.+)\\.kt$"), true); + public static class Class extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInClass() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("AnnotationInClassObject.kt") - public void testAnnotationInClassObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); + @TestMetadata("Class.kt") + public void testClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); doTest(fileName); } - @TestMetadata("ClassInClassObject.kt") - public void testClassInClassObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); + @TestMetadata("ClassInParam.kt") + public void testClassInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); doTest(fileName); } - @TestMetadata("ClassObject.kt") - public void testClassObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); + @TestMetadata("ClassInnerClass.kt") + public void testClassInnerClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); doTest(fileName); } - @TestMetadata("ClassObjectInStaticNestedClass.kt") - public void testClassObjectInStaticNestedClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); + @TestMetadata("ClassMemberConflict.kt") + public void testClassMemberConflict() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); doTest(fileName); } - @TestMetadata("Deprecated.kt") - public void testDeprecated() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); + @TestMetadata("ClassOutParam.kt") + public void testClassOutParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); doTest(fileName); } - @TestMetadata("DollarsInAnnotationName.kt") - public void testDollarsInAnnotationName() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); + @TestMetadata("ClassParam.kt") + public void testClassParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); doTest(fileName); } - @TestMetadata("EnumArgument.kt") - public void testEnumArgument() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); + @TestMetadata("ClassParamReferencesParam.kt") + public void testClassParamReferencesParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); doTest(fileName); } - @TestMetadata("MultipleAnnotations.kt") - public void testMultipleAnnotations() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); + @TestMetadata("ClassParamReferencesParam2.kt") + public void testClassParamReferencesParam2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); doTest(fileName); } - @TestMetadata("NestedAnnotation.kt") - public void testNestedAnnotation() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); + @TestMetadata("ClassParamReferencesSelf.kt") + public void testClassParamReferencesSelf() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); + doTest(fileName); + } + + @TestMetadata("ClassParamUpperClassBound.kt") + public void testClassParamUpperClassBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); + doTest(fileName); + } + + @TestMetadata("ClassParamUpperClassInterfaceBound.kt") + public void testClassParamUpperClassInterfaceBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); + doTest(fileName); + } + + @TestMetadata("ClassParamUpperInterfaceBound.kt") + public void testClassParamUpperInterfaceBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); + doTest(fileName); + } + + @TestMetadata("ClassTwoParams.kt") + public void testClassTwoParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); + doTest(fileName); + } + + @TestMetadata("ClassTwoParams2.kt") + public void testClassTwoParams2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); + doTest(fileName); + } + + @TestMetadata("EnumWithGenericConstructorParameter.kt") + public void testEnumWithGenericConstructorParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); + doTest(fileName); + } + + @TestMetadata("EnumWithPrimitiveConstructorParameter.kt") + public void testEnumWithPrimitiveConstructorParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); + doTest(fileName); + } + + @TestMetadata("InheritClassSimple.kt") + public void testInheritClassSimple() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); + doTest(fileName); + } + + @TestMetadata("InheritClassWithParam.kt") + public void testInheritClassWithParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); + doTest(fileName); + } + + @TestMetadata("InheritSubstitutedMethod.kt") + public void testInheritSubstitutedMethod() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); + doTest(fileName); + } + + @TestMetadata("InheritTraitWithFunctionParam.kt") + public void testInheritTraitWithFunctionParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); + doTest(fileName); + } + + @TestMetadata("InheritTraitWithParam.kt") + public void testInheritTraitWithParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); + doTest(fileName); + } + + @TestMetadata("InnerClassExtendInnerClass.kt") + public void testInnerClassExtendInnerClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); + doTest(fileName); + } + + @TestMetadata("InnerGenericClass.kt") + public void testInnerGenericClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); + doTest(fileName); + } + + @TestMetadata("NamedObject.kt") + public void testNamedObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); + doTest(fileName); + } + + @TestMetadata("NamedObjectInClass.kt") + public void testNamedObjectInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); + doTest(fileName); + } + + @TestMetadata("NamedObjectInClassObject.kt") + public void testNamedObjectInClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); + doTest(fileName); + } + + @TestMetadata("NamedObjectInNamedObject.kt") + public void testNamedObjectInNamedObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); + doTest(fileName); + } + + @TestMetadata("NamedObjectWithAnotherTopLevelProperty.kt") + public void testNamedObjectWithAnotherTopLevelProperty() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); doTest(fileName); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); doTest(fileName); } - @TestMetadata("Retention.kt") - public void testRetention() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); + @TestMetadata("NestedClassExtendNestedClass.kt") + public void testNestedClassExtendNestedClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); doTest(fileName); } - @TestMetadata("Simple.kt") - public void testSimple() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); + @TestMetadata("NestedGenericClass.kt") + public void testNestedGenericClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); doTest(fileName); } - @TestMetadata("WithArgument.kt") - public void testWithArgument() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); - doTest(fileName); - } - - @TestMetadata("WithMultipleArguments.kt") - public void testWithMultipleArguments() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class PackageMembers extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInPackageMembers() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("DelegatedProperty.kt") - public void testDelegatedProperty() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); - doTest(fileName); - } - - @TestMetadata("EnumArgument.kt") - public void testEnumArgument() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); - doTest(fileName); - } - - @TestMetadata("EnumArrayArgument.kt") - public void testEnumArrayArgument() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); - doTest(fileName); - } - - @TestMetadata("Function.kt") - public void testFunction() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); - doTest(fileName); - } - - @TestMetadata("Getter.kt") - public void testGetter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); - doTest(fileName); - } - - @TestMetadata("PropertyField.kt") - public void testPropertyField() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); - doTest(fileName); - } - - @TestMetadata("Setter.kt") - public void testSetter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); - doTest(fileName); - } - - @TestMetadata("StringArrayArgument.kt") - public void testStringArrayArgument() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Parameters extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInParameters() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/parameters"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("Constructor.kt") - public void testConstructor() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); - doTest(fileName); - } - - @TestMetadata("EnumConstructor.kt") - public void testEnumConstructor() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); - doTest(fileName); - } - - @TestMetadata("ExtensionFunction.kt") - public void testExtensionFunction() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); - doTest(fileName); - } - - @TestMetadata("ExtensionFunctionInClass.kt") - public void testExtensionFunctionInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtensionPropertySetter.kt") - public void testExtensionPropertySetter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); - doTest(fileName); - } - - @TestMetadata("FunctionInClass.kt") - public void testFunctionInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); - doTest(fileName); - } - - @TestMetadata("FunctionInTrait.kt") - public void testFunctionInTrait() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); - doTest(fileName); - } - - @TestMetadata("ManyAnnotations.kt") - public void testManyAnnotations() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); - doTest(fileName); - } - - @TestMetadata("PropertySetterInClass.kt") - public void testPropertySetterInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); - doTest(fileName); - } - - @TestMetadata("TopLevelFunction.kt") - public void testTopLevelFunction() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); - doTest(fileName); - } - - @TestMetadata("TopLevelPropertySetter.kt") - public void testTopLevelPropertySetter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class PropertiesWithoutBackingFields extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInPropertiesWithoutBackingFields() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("Class.kt") - public void testClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); - doTest(fileName); - } - - @TestMetadata("ClassObject.kt") - public void testClassObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); - doTest(fileName); - } - - @TestMetadata("ExtensionsWithSameNameClass.kt") - public void testExtensionsWithSameNameClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtensionsWithSameNamePackage.kt") - public void testExtensionsWithSameNamePackage() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); - doTest(fileName); - } - - @TestMetadata("NestedTrait.kt") - public void testNestedTrait() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); - doTest(fileName); - } - - @TestMetadata("TopLevel.kt") - public void testTopLevel() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); + @TestMetadata("SingleAbstractMethod.kt") + public void testSingleAbstractMethod() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); doTest(fileName); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); doTest(fileName); } - @TestMetadata("TraitClassObject.kt") - public void testTraitClassObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); - doTest(fileName); + @TestMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaBean extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInJavaBean() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class/javaBean"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("DifferentGetterAndSetter.kt") + public void testDifferentGetterAndSetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); + doTest(fileName); + } + + @TestMetadata("JavaBeanAbstractGetter.kt") + public void testJavaBeanAbstractGetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); + doTest(fileName); + } + + @TestMetadata("JavaBeanVal.kt") + public void testJavaBeanVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); + doTest(fileName); + } + + @TestMetadata("JavaBeanVar.kt") + public void testJavaBeanVar() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); + doTest(fileName); + } + + @TestMetadata("JavaBeanVarOfGenericType.kt") + public void testJavaBeanVarOfGenericType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); + doTest(fileName); + } + + @TestMetadata("TwoSetters.kt") + public void testTwoSetters() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); + doTest(fileName); + } } } - } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/class") - @TestDataPath("$PROJECT_ROOT") - @InnerTestClasses({ - Class.JavaBean.class, - }) - @RunWith(JUnit3RunnerWithInners.class) - public static class Class extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInClass() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("Class.kt") - public void testClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); - doTest(fileName); - } - - @TestMetadata("ClassInParam.kt") - public void testClassInParam() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); - doTest(fileName); - } - - @TestMetadata("ClassInnerClass.kt") - public void testClassInnerClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); - doTest(fileName); - } - - @TestMetadata("ClassMemberConflict.kt") - public void testClassMemberConflict() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); - doTest(fileName); - } - - @TestMetadata("ClassOutParam.kt") - public void testClassOutParam() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); - doTest(fileName); - } - - @TestMetadata("ClassParam.kt") - public void testClassParam() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); - doTest(fileName); - } - - @TestMetadata("ClassParamReferencesParam.kt") - public void testClassParamReferencesParam() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); - doTest(fileName); - } - - @TestMetadata("ClassParamReferencesParam2.kt") - public void testClassParamReferencesParam2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); - doTest(fileName); - } - - @TestMetadata("ClassParamReferencesSelf.kt") - public void testClassParamReferencesSelf() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); - doTest(fileName); - } - - @TestMetadata("ClassParamUpperClassBound.kt") - public void testClassParamUpperClassBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); - doTest(fileName); - } - - @TestMetadata("ClassParamUpperClassInterfaceBound.kt") - public void testClassParamUpperClassInterfaceBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); - doTest(fileName); - } - - @TestMetadata("ClassParamUpperInterfaceBound.kt") - public void testClassParamUpperInterfaceBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); - doTest(fileName); - } - - @TestMetadata("ClassTwoParams.kt") - public void testClassTwoParams() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); - doTest(fileName); - } - - @TestMetadata("ClassTwoParams2.kt") - public void testClassTwoParams2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); - doTest(fileName); - } - - @TestMetadata("EnumWithGenericConstructorParameter.kt") - public void testEnumWithGenericConstructorParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); - doTest(fileName); - } - - @TestMetadata("EnumWithPrimitiveConstructorParameter.kt") - public void testEnumWithPrimitiveConstructorParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); - doTest(fileName); - } - - @TestMetadata("InheritClassSimple.kt") - public void testInheritClassSimple() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); - doTest(fileName); - } - - @TestMetadata("InheritClassWithParam.kt") - public void testInheritClassWithParam() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); - doTest(fileName); - } - - @TestMetadata("InheritSubstitutedMethod.kt") - public void testInheritSubstitutedMethod() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); - doTest(fileName); - } - - @TestMetadata("InheritTraitWithFunctionParam.kt") - public void testInheritTraitWithFunctionParam() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); - doTest(fileName); - } - - @TestMetadata("InheritTraitWithParam.kt") - public void testInheritTraitWithParam() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); - doTest(fileName); - } - - @TestMetadata("InnerClassExtendInnerClass.kt") - public void testInnerClassExtendInnerClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); - doTest(fileName); - } - - @TestMetadata("InnerGenericClass.kt") - public void testInnerGenericClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); - doTest(fileName); - } - - @TestMetadata("NamedObject.kt") - public void testNamedObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); - doTest(fileName); - } - - @TestMetadata("NamedObjectInClass.kt") - public void testNamedObjectInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); - doTest(fileName); - } - - @TestMetadata("NamedObjectInClassObject.kt") - public void testNamedObjectInClassObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); - doTest(fileName); - } - - @TestMetadata("NamedObjectInNamedObject.kt") - public void testNamedObjectInNamedObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); - doTest(fileName); - } - - @TestMetadata("NamedObjectWithAnotherTopLevelProperty.kt") - public void testNamedObjectWithAnotherTopLevelProperty() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); - doTest(fileName); - } - - @TestMetadata("NestedClass.kt") - public void testNestedClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); - doTest(fileName); - } - - @TestMetadata("NestedClassExtendNestedClass.kt") - public void testNestedClassExtendNestedClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); - doTest(fileName); - } - - @TestMetadata("NestedGenericClass.kt") - public void testNestedGenericClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); - doTest(fileName); - } - - @TestMetadata("SingleAbstractMethod.kt") - public void testSingleAbstractMethod() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); - doTest(fileName); - } - - @TestMetadata("Trait.kt") - public void testTrait() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); - doTest(fileName); - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/classFun") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class JavaBean extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInJavaBean() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class/javaBean"), Pattern.compile("^(.+)\\.kt$"), true); + public static class ClassFun extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInClassFun() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classFun"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("DifferentGetterAndSetter.kt") - public void testDifferentGetterAndSetter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); + @TestMetadata("ClassInParamUsedInFun.kt") + public void testClassInParamUsedInFun() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); doTest(fileName); } - @TestMetadata("JavaBeanAbstractGetter.kt") - public void testJavaBeanAbstractGetter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); + @TestMetadata("ClassParamUsedInFun.kt") + public void testClassParamUsedInFun() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); doTest(fileName); } - @TestMetadata("JavaBeanVal.kt") - public void testJavaBeanVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); + @TestMetadata("FunDelegationToTraitImpl.kt") + public void testFunDelegationToTraitImpl() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); doTest(fileName); } - @TestMetadata("JavaBeanVar.kt") - public void testJavaBeanVar() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); + @TestMetadata("FunInParamSuper.kt") + public void testFunInParamSuper() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); doTest(fileName); } - @TestMetadata("JavaBeanVarOfGenericType.kt") - public void testJavaBeanVarOfGenericType() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); + @TestMetadata("TraitFinalFun.kt") + public void testTraitFinalFun() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/TraitFinalFun.kt"); doTest(fileName); } - @TestMetadata("TwoSetters.kt") - public void testTwoSetters() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); + @TestMetadata("TraitOpenFun.kt") + public void testTraitOpenFun() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); doTest(fileName); } } - } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/classFun") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ClassFun extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInClassFun() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classFun"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("ClassInParamUsedInFun.kt") - public void testClassInParamUsedInFun() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); - doTest(fileName); - } - - @TestMetadata("ClassParamUsedInFun.kt") - public void testClassParamUsedInFun() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); - doTest(fileName); - } - - @TestMetadata("FunDelegationToTraitImpl.kt") - public void testFunDelegationToTraitImpl() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); - doTest(fileName); - } - - @TestMetadata("FunInParamSuper.kt") - public void testFunInParamSuper() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); - doTest(fileName); - } - - @TestMetadata("TraitFinalFun.kt") - public void testTraitFinalFun() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/TraitFinalFun.kt"); - doTest(fileName); - } - - @TestMetadata("TraitOpenFun.kt") - public void testTraitOpenFun() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/classObject") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ClassObject extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInClassObject() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classObject"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("ClassObjectDeclaresVal.kt") - public void testClassObjectDeclaresVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); - doTest(fileName); - } - - @TestMetadata("ClassObjectDeclaresVar.kt") - public void testClassObjectDeclaresVar() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); - doTest(fileName); - } - - @TestMetadata("ClassObjectDefaultVisibility.kt") - public void testClassObjectDefaultVisibility() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); - doTest(fileName); - } - - @TestMetadata("ClassObjectExplicitVisibility.kt") - public void testClassObjectExplicitVisibility() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); - doTest(fileName); - } - - @TestMetadata("ClassObjectExtendsTrait.kt") - public void testClassObjectExtendsTrait() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); - doTest(fileName); - } - - @TestMetadata("ClassObjectExtendsTraitWithTP.kt") - public void testClassObjectExtendsTraitWithTP() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); - doTest(fileName); - } - - @TestMetadata("classObjectInClassStaticFields.kt") - public void testClassObjectInClassStaticFields() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); - doTest(fileName); - } - - @TestMetadata("classObjectInTraitStaticFields.kt") - public void testClassObjectInTraitStaticFields() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); - doTest(fileName); - } - - @TestMetadata("ClassObjectPropertyInClass.kt") - public void testClassObjectPropertyInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); - doTest(fileName); - } - - @TestMetadata("Delegation.kt") - public void testDelegation() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); - doTest(fileName); - } - - @TestMetadata("InnerClassInClassObject.kt") - public void testInnerClassInClassObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); - doTest(fileName); - } - - @TestMetadata("NamedClassObject.kt") - public void testNamedClassObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); - doTest(fileName); - } - - @TestMetadata("SimpleClassObject.kt") - public void testSimpleClassObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/constructor") - @TestDataPath("$PROJECT_ROOT") - @InnerTestClasses({ - Constructor.Vararg.class, - }) - @RunWith(JUnit3RunnerWithInners.class) - public static class Constructor extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInConstructor() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("Constructor0.kt") - public void testConstructor0() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); - doTest(fileName); - } - - @TestMetadata("Constructor1.kt") - public void testConstructor1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); - doTest(fileName); - } - - @TestMetadata("Constructor1WithParamDefaultValue.kt") - public void testConstructor1WithParamDefaultValue() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); - doTest(fileName); - } - - @TestMetadata("Constructor2WithOneParamDefaultValue.kt") - public void testConstructor2WithOneParamDefaultValue() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); - doTest(fileName); - } - - @TestMetadata("ConstructorCollectionParameter.kt") - public void testConstructorCollectionParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); - doTest(fileName); - } - - @TestMetadata("ConstructorGenericDeep.kt") - public void testConstructorGenericDeep() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); - doTest(fileName); - } - - @TestMetadata("ConstructorGenericSimple.kt") - public void testConstructorGenericSimple() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); - doTest(fileName); - } - - @TestMetadata("ConstructorGenericUpperBound.kt") - public void testConstructorGenericUpperBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); - doTest(fileName); - } - - @TestMetadata("ConstructorWithTwoDefArgs.kt") - public void testConstructorWithTwoDefArgs() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); - doTest(fileName); - } - - @TestMetadata("ConstructorWithTwoTypeParameters.kt") - public void testConstructorWithTwoTypeParameters() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); - doTest(fileName); - } - - @TestMetadata("ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt") - public void testConstructorWithTwoTypeParametersAndOneIntValueParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); - doTest(fileName); - } - - @TestMetadata("ConstructorWithTwoTypeParametersAndOnePValueParameter.kt") - public void testConstructorWithTwoTypeParametersAndOnePValueParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); - doTest(fileName); - } - - @TestMetadata("ConstructorWithTypeParameter.kt") - public void testConstructorWithTypeParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); - doTest(fileName); - } - - @TestMetadata("ConstructorWithTypeParametersEAndOnePValueParameter.kt") - public void testConstructorWithTypeParametersEAndOnePValueParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); - doTest(fileName); - } - - @TestMetadata("InnerClassConstructorWithDefArgs.kt") - public void testInnerClassConstructorWithDefArgs() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); - doTest(fileName); - } - - @TestMetadata("PrivateConstructor1WithParamDefaultValue.kt") - public void testPrivateConstructor1WithParamDefaultValue() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); - doTest(fileName); - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/classObject") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Vararg extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInVararg() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor/vararg"), Pattern.compile("^(.+)\\.kt$"), true); + public static class ClassObject extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInClassObject() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classObject"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("ConstructorNonLastVararg.kt") - public void testConstructorNonLastVararg() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); + @TestMetadata("ClassObjectDeclaresVal.kt") + public void testClassObjectDeclaresVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); doTest(fileName); } - @TestMetadata("ConstructorVararg.kt") - public void testConstructorVararg() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); + @TestMetadata("ClassObjectDeclaresVar.kt") + public void testClassObjectDeclaresVar() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); + doTest(fileName); + } + + @TestMetadata("ClassObjectDefaultVisibility.kt") + public void testClassObjectDefaultVisibility() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); + doTest(fileName); + } + + @TestMetadata("ClassObjectExplicitVisibility.kt") + public void testClassObjectExplicitVisibility() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); + doTest(fileName); + } + + @TestMetadata("ClassObjectExtendsTrait.kt") + public void testClassObjectExtendsTrait() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); + doTest(fileName); + } + + @TestMetadata("ClassObjectExtendsTraitWithTP.kt") + public void testClassObjectExtendsTraitWithTP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); + doTest(fileName); + } + + @TestMetadata("classObjectInClassStaticFields.kt") + public void testClassObjectInClassStaticFields() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); + doTest(fileName); + } + + @TestMetadata("classObjectInTraitStaticFields.kt") + public void testClassObjectInTraitStaticFields() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); + doTest(fileName); + } + + @TestMetadata("ClassObjectPropertyInClass.kt") + public void testClassObjectPropertyInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); + doTest(fileName); + } + + @TestMetadata("Delegation.kt") + public void testDelegation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); + doTest(fileName); + } + + @TestMetadata("InnerClassInClassObject.kt") + public void testInnerClassInClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); + doTest(fileName); + } + + @TestMetadata("NamedClassObject.kt") + public void testNamedClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); + doTest(fileName); + } + + @TestMetadata("SimpleClassObject.kt") + public void testSimpleClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); doTest(fileName); } } - } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/dataClass") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DataClass extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInDataClass() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/dataClass"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("MixedComponents.kt") - public void testMixedComponents() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); - doTest(fileName); - } - - @TestMetadata("NoComponents.kt") - public void testNoComponents() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/NoComponents.kt"); - doTest(fileName); - } - - @TestMetadata("OneVal.kt") - public void testOneVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); - doTest(fileName); - } - - @TestMetadata("OpenDataClass.kt") - public void testOpenDataClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OpenDataClass.kt"); - doTest(fileName); - } - - @TestMetadata("OpenPropertyFinalComponent.kt") - public void testOpenPropertyFinalComponent() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OpenPropertyFinalComponent.kt"); - doTest(fileName); - } - - @TestMetadata("ParamNameSameToField.kt") - public void testParamNameSameToField() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/ParamNameSameToField.kt"); - doTest(fileName); - } - - @TestMetadata("TwoVals.kt") - public void testTwoVals() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); - doTest(fileName); - } - - @TestMetadata("TwoVars.kt") - public void testTwoVars() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/enum") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Enum extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInEnum() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("enumVisibility.kt") - public void testEnumVisibility() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); - doTest(fileName); - } - - @TestMetadata("enumWithConstuctor.kt") - public void testEnumWithConstuctor() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); - doTest(fileName); - } - - @TestMetadata("enumWithInnerClasses.kt") - public void testEnumWithInnerClasses() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); - doTest(fileName); - } - - @TestMetadata("innerEnum.kt") - public void testInnerEnum() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); - doTest(fileName); - } - - @TestMetadata("innerEnumExistingClassObject.kt") - public void testInnerEnumExistingClassObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); - doTest(fileName); - } - - @TestMetadata("simpleEnum.kt") - public void testSimpleEnum() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava") - @TestDataPath("$PROJECT_ROOT") - @InnerTestClasses({ - FromLoadJava.KotlinSignature.class, - FromLoadJava.Library.class, - FromLoadJava.Modality.class, - FromLoadJava.NotNull.class, - }) - @RunWith(JUnit3RunnerWithInners.class) - public static class FromLoadJava extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInFromLoadJava() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("ArrayTypeVariance.kt") - public void testArrayTypeVariance() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); - doTest(fileName); - } - - @TestMetadata("ClassDoesNotOverrideMethod.kt") - public void testClassDoesNotOverrideMethod() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); - doTest(fileName); - } - - @TestMetadata("ClassObject.kt") - public void testClassObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); - doTest(fileName); - } - - @TestMetadata("classObjectAnnotation.kt") - public void testClassObjectAnnotation() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); - doTest(fileName); - } - - @TestMetadata("ClassWithConstVal.kt") - public void testClassWithConstVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); - doTest(fileName); - } - - @TestMetadata("ClassWithTypeP.kt") - public void testClassWithTypeP() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); - doTest(fileName); - } - - @TestMetadata("ClassWithTypePExtendsIterableP.kt") - public void testClassWithTypePExtendsIterableP() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); - doTest(fileName); - } - - @TestMetadata("ClassWithTypePP.kt") - public void testClassWithTypePP() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); - doTest(fileName); - } - - @TestMetadata("ClassWithTypePRefNext.kt") - public void testClassWithTypePRefNext() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); - doTest(fileName); - } - - @TestMetadata("ClassWithTypePRefSelf.kt") - public void testClassWithTypePRefSelf() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); - doTest(fileName); - } - - @TestMetadata("ClassWithTypePRefSelfAndClass.kt") - public void testClassWithTypePRefSelfAndClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); - doTest(fileName); - } - - @TestMetadata("enum.kt") - public void testEnum() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); - doTest(fileName); - } - - @TestMetadata("FieldAsVar.kt") - public void testFieldAsVar() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); - doTest(fileName); - } - - @TestMetadata("FieldOfArrayType.kt") - public void testFieldOfArrayType() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); - doTest(fileName); - } - - @TestMetadata("FinalFieldAsVal.kt") - public void testFinalFieldAsVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); - doTest(fileName); - } - - @TestMetadata("genericFunction.kt") - public void testGenericFunction() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); - doTest(fileName); - } - - @TestMetadata("InheritMethodsDifferentReturnTypes.kt") - public void testInheritMethodsDifferentReturnTypes() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); - doTest(fileName); - } - - @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.kt") - public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); - doTest(fileName); - } - - @TestMetadata("InnerClass.kt") - public void testInnerClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); - doTest(fileName); - } - - @TestMetadata("MethodTypePOneUpperBound.kt") - public void testMethodTypePOneUpperBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); - doTest(fileName); - } - - @TestMetadata("MethodTypePTwoUpperBounds.kt") - public void testMethodTypePTwoUpperBounds() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); - doTest(fileName); - } - - @TestMetadata("MethodWithTypeP.kt") - public void testMethodWithTypeP() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); - doTest(fileName); - } - - @TestMetadata("MethodWithTypePP.kt") - public void testMethodWithTypePP() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); - doTest(fileName); - } - - @TestMetadata("MethodWithTypePRefClassP.kt") - public void testMethodWithTypePRefClassP() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); - doTest(fileName); - } - - @TestMetadata("MethosWithPRefTP.kt") - public void testMethosWithPRefTP() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); - doTest(fileName); - } - - @TestMetadata("MyException.kt") - public void testMyException() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); - doTest(fileName); - } - - @TestMetadata("NestedClass.kt") - public void testNestedClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); - doTest(fileName); - } - - @TestMetadata("objectInClass.kt") - public void testObjectInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); - doTest(fileName); - } - - @TestMetadata("objectMembers.kt") - public void testObjectMembers() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); - doTest(fileName); - } - - @TestMetadata("packageLevelObject.kt") - public void testPackageLevelObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); - doTest(fileName); - } - - @TestMetadata("RemoveRedundantProjectionKind.kt") - public void testRemoveRedundantProjectionKind() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); - doTest(fileName); - } - - @TestMetadata("Simple.kt") - public void testSimple() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); - doTest(fileName); - } - - @TestMetadata("TwoFields.kt") - public void testTwoFields() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); - doTest(fileName); - } - - @TestMetadata("UnboundWildcard.kt") - public void testUnboundWildcard() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); - doTest(fileName); - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/constructor") @TestDataPath("$PROJECT_ROOT") @InnerTestClasses({ - KotlinSignature.Error.class, - KotlinSignature.Propagation.class, + Constructor.Vararg.class, }) @RunWith(JUnit3RunnerWithInners.class) - public static class KotlinSignature extends AbstractJvmRuntimeDescriptorLoaderTest { - @TestMetadata("AllBoundsInWhen.kt") - public void testAllBoundsInWhen() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); + public static class Constructor extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInConstructor() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("Constructor0.kt") + public void testConstructor0() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); doTest(fileName); } - public void testAllFilesPresentInKotlinSignature() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("ArrayType.kt") - public void testArrayType() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); + @TestMetadata("Constructor1.kt") + public void testConstructor1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); doTest(fileName); } - @TestMetadata("ConstructorWithNewTypeParams.kt") - public void testConstructorWithNewTypeParams() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); + @TestMetadata("Constructor1WithParamDefaultValue.kt") + public void testConstructor1WithParamDefaultValue() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); doTest(fileName); } - @TestMetadata("ConstructorWithParentTypeParams.kt") - public void testConstructorWithParentTypeParams() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); + @TestMetadata("Constructor2WithOneParamDefaultValue.kt") + public void testConstructor2WithOneParamDefaultValue() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); doTest(fileName); } - @TestMetadata("ConstructorWithSeveralParams.kt") - public void testConstructorWithSeveralParams() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); + @TestMetadata("ConstructorCollectionParameter.kt") + public void testConstructorCollectionParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); doTest(fileName); } - @TestMetadata("ConstructorWithoutParams.kt") - public void testConstructorWithoutParams() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); + @TestMetadata("ConstructorGenericDeep.kt") + public void testConstructorGenericDeep() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); doTest(fileName); } - @TestMetadata("CustomProjectionKind.kt") - public void testCustomProjectionKind() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); + @TestMetadata("ConstructorGenericSimple.kt") + public void testConstructorGenericSimple() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); doTest(fileName); } - @TestMetadata("MethodWithFunctionTypes.kt") - public void testMethodWithFunctionTypes() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); + @TestMetadata("ConstructorGenericUpperBound.kt") + public void testConstructorGenericUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); doTest(fileName); } - @TestMetadata("MethodWithGenerics.kt") - public void testMethodWithGenerics() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); + @TestMetadata("ConstructorWithTwoDefArgs.kt") + public void testConstructorWithTwoDefArgs() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); doTest(fileName); } - @TestMetadata("MethodWithMappedClasses.kt") - public void testMethodWithMappedClasses() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); + @TestMetadata("ConstructorWithTwoTypeParameters.kt") + public void testConstructorWithTwoTypeParameters() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); doTest(fileName); } - @TestMetadata("MethodWithTypeParameters.kt") - public void testMethodWithTypeParameters() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); + @TestMetadata("ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt") + public void testConstructorWithTwoTypeParametersAndOneIntValueParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); doTest(fileName); } - @TestMetadata("MethodWithVararg.kt") - public void testMethodWithVararg() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); + @TestMetadata("ConstructorWithTwoTypeParametersAndOnePValueParameter.kt") + public void testConstructorWithTwoTypeParametersAndOnePValueParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); doTest(fileName); } - @TestMetadata("PropertyArrayTypes.kt") - public void testPropertyArrayTypes() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); + @TestMetadata("ConstructorWithTypeParameter.kt") + public void testConstructorWithTypeParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); doTest(fileName); } - @TestMetadata("PropertyComplexTypes.kt") - public void testPropertyComplexTypes() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); + @TestMetadata("ConstructorWithTypeParametersEAndOnePValueParameter.kt") + public void testConstructorWithTypeParametersEAndOnePValueParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); doTest(fileName); } - @TestMetadata("PropertySimpleType.kt") - public void testPropertySimpleType() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); + @TestMetadata("InnerClassConstructorWithDefArgs.kt") + public void testInnerClassConstructorWithDefArgs() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); doTest(fileName); } - @TestMetadata("StarProjection.kt") - public void testStarProjection() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); + @TestMetadata("PrivateConstructor1WithParamDefaultValue.kt") + public void testPrivateConstructor1WithParamDefaultValue() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); doTest(fileName); } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Error extends AbstractJvmRuntimeDescriptorLoaderTest { - @TestMetadata("AddingNullability.kt") - public void testAddingNullability() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); + public static class Vararg extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInVararg() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor/vararg"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("ConstructorNonLastVararg.kt") + public void testConstructorNonLastVararg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); doTest(fileName); } - public void testAllFilesPresentInError() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("ConflictingProjectionKind.kt") - public void testConflictingProjectionKind() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); - doTest(fileName); - } - - @TestMetadata("ExplicitFieldGettersAndSetters.kt") - public void testExplicitFieldGettersAndSetters() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); - doTest(fileName); - } - - @TestMetadata("ExtraUpperBound.kt") - public void testExtraUpperBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); - doTest(fileName); - } - - @TestMetadata("MissingUpperBound.kt") - public void testMissingUpperBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); - doTest(fileName); - } - - @TestMetadata("NoFieldTypeRef.kt") - public void testNoFieldTypeRef() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); - doTest(fileName); - } - - @TestMetadata("NotVarargReplacedWithVararg.kt") - public void testNotVarargReplacedWithVararg() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); - doTest(fileName); - } - - @TestMetadata("RedundantProjectionKind.kt") - public void testRedundantProjectionKind() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); - doTest(fileName); - } - - @TestMetadata("ReturnTypeMissing.kt") - public void testReturnTypeMissing() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); - doTest(fileName); - } - - @TestMetadata("SyntaxError.kt") - public void testSyntaxError() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); - doTest(fileName); - } - - @TestMetadata("SyntaxErrorInFieldAnnotation.kt") - public void testSyntaxErrorInFieldAnnotation() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); - doTest(fileName); - } - - @TestMetadata("VarargReplacedWithNotVararg.kt") - public void testVarargReplacedWithNotVararg() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); - doTest(fileName); - } - - @TestMetadata("WrongFieldInitializer.kt") - public void testWrongFieldInitializer() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); - doTest(fileName); - } - - @TestMetadata("WrongFieldMutability.kt") - public void testWrongFieldMutability() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); - doTest(fileName); - } - - @TestMetadata("WrongFieldName.kt") - public void testWrongFieldName() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); - doTest(fileName); - } - - @TestMetadata("WrongMethodName.kt") - public void testWrongMethodName() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); - doTest(fileName); - } - - @TestMetadata("WrongProjectionKind.kt") - public void testWrongProjectionKind() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); - doTest(fileName); - } - - @TestMetadata("WrongReturnTypeStructure.kt") - public void testWrongReturnTypeStructure() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); - doTest(fileName); - } - - @TestMetadata("WrongTypeName1.kt") - public void testWrongTypeName1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); - doTest(fileName); - } - - @TestMetadata("WrongTypeName2.kt") - public void testWrongTypeName2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); - doTest(fileName); - } - - @TestMetadata("WrongTypeName3.kt") - public void testWrongTypeName3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); - doTest(fileName); - } - - @TestMetadata("WrongTypeParameterBoundStructure1.kt") - public void testWrongTypeParameterBoundStructure1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); - doTest(fileName); - } - - @TestMetadata("WrongTypeParameterBoundStructure2.kt") - public void testWrongTypeParameterBoundStructure2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); - doTest(fileName); - } - - @TestMetadata("WrongTypeParametersCount.kt") - public void testWrongTypeParametersCount() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); - doTest(fileName); - } - - @TestMetadata("WrongValueParameterStructure1.kt") - public void testWrongValueParameterStructure1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); - doTest(fileName); - } - - @TestMetadata("WrongValueParameterStructure2.kt") - public void testWrongValueParameterStructure2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); - doTest(fileName); - } - - @TestMetadata("WrongValueParametersCount.kt") - public void testWrongValueParametersCount() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); + @TestMetadata("ConstructorVararg.kt") + public void testConstructorVararg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); doTest(fileName); } } + } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/dataClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DataClass extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInDataClass() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/dataClass"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("MixedComponents.kt") + public void testMixedComponents() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); + doTest(fileName); + } + + @TestMetadata("NoComponents.kt") + public void testNoComponents() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/NoComponents.kt"); + doTest(fileName); + } + + @TestMetadata("OneVal.kt") + public void testOneVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); + doTest(fileName); + } + + @TestMetadata("OpenDataClass.kt") + public void testOpenDataClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OpenDataClass.kt"); + doTest(fileName); + } + + @TestMetadata("OpenPropertyFinalComponent.kt") + public void testOpenPropertyFinalComponent() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OpenPropertyFinalComponent.kt"); + doTest(fileName); + } + + @TestMetadata("ParamNameSameToField.kt") + public void testParamNameSameToField() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/ParamNameSameToField.kt"); + doTest(fileName); + } + + @TestMetadata("TwoVals.kt") + public void testTwoVals() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); + doTest(fileName); + } + + @TestMetadata("TwoVars.kt") + public void testTwoVars() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/enum") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Enum extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInEnum() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("enumVisibility.kt") + public void testEnumVisibility() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); + doTest(fileName); + } + + @TestMetadata("enumWithConstuctor.kt") + public void testEnumWithConstuctor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); + doTest(fileName); + } + + @TestMetadata("enumWithInnerClasses.kt") + public void testEnumWithInnerClasses() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); + doTest(fileName); + } + + @TestMetadata("innerEnum.kt") + public void testInnerEnum() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); + doTest(fileName); + } + + @TestMetadata("innerEnumExistingClassObject.kt") + public void testInnerEnumExistingClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); + doTest(fileName); + } + + @TestMetadata("simpleEnum.kt") + public void testSimpleEnum() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava") + @TestDataPath("$PROJECT_ROOT") + @InnerTestClasses({ + FromLoadJava.KotlinSignature.class, + FromLoadJava.Library.class, + FromLoadJava.Modality.class, + FromLoadJava.NotNull.class, + }) + @RunWith(JUnit3RunnerWithInners.class) + public static class FromLoadJava extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInFromLoadJava() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("ArrayTypeVariance.kt") + public void testArrayTypeVariance() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); + doTest(fileName); + } + + @TestMetadata("ClassDoesNotOverrideMethod.kt") + public void testClassDoesNotOverrideMethod() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); + doTest(fileName); + } + + @TestMetadata("ClassObject.kt") + public void testClassObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); + doTest(fileName); + } + + @TestMetadata("classObjectAnnotation.kt") + public void testClassObjectAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); + doTest(fileName); + } + + @TestMetadata("ClassWithConstVal.kt") + public void testClassWithConstVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); + doTest(fileName); + } + + @TestMetadata("ClassWithTypeP.kt") + public void testClassWithTypeP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); + doTest(fileName); + } + + @TestMetadata("ClassWithTypePExtendsIterableP.kt") + public void testClassWithTypePExtendsIterableP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); + doTest(fileName); + } + + @TestMetadata("ClassWithTypePP.kt") + public void testClassWithTypePP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); + doTest(fileName); + } + + @TestMetadata("ClassWithTypePRefNext.kt") + public void testClassWithTypePRefNext() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); + doTest(fileName); + } + + @TestMetadata("ClassWithTypePRefSelf.kt") + public void testClassWithTypePRefSelf() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); + doTest(fileName); + } + + @TestMetadata("ClassWithTypePRefSelfAndClass.kt") + public void testClassWithTypePRefSelfAndClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); + doTest(fileName); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); + doTest(fileName); + } + + @TestMetadata("FieldAsVar.kt") + public void testFieldAsVar() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); + doTest(fileName); + } + + @TestMetadata("FieldOfArrayType.kt") + public void testFieldOfArrayType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); + doTest(fileName); + } + + @TestMetadata("FinalFieldAsVal.kt") + public void testFinalFieldAsVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); + doTest(fileName); + } + + @TestMetadata("genericFunction.kt") + public void testGenericFunction() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); + doTest(fileName); + } + + @TestMetadata("InheritMethodsDifferentReturnTypes.kt") + public void testInheritMethodsDifferentReturnTypes() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); + doTest(fileName); + } + + @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.kt") + public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); + doTest(fileName); + } + + @TestMetadata("InnerClass.kt") + public void testInnerClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); + doTest(fileName); + } + + @TestMetadata("MethodTypePOneUpperBound.kt") + public void testMethodTypePOneUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); + doTest(fileName); + } + + @TestMetadata("MethodTypePTwoUpperBounds.kt") + public void testMethodTypePTwoUpperBounds() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); + doTest(fileName); + } + + @TestMetadata("MethodWithTypeP.kt") + public void testMethodWithTypeP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); + doTest(fileName); + } + + @TestMetadata("MethodWithTypePP.kt") + public void testMethodWithTypePP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); + doTest(fileName); + } + + @TestMetadata("MethodWithTypePRefClassP.kt") + public void testMethodWithTypePRefClassP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); + doTest(fileName); + } + + @TestMetadata("MethosWithPRefTP.kt") + public void testMethosWithPRefTP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); + doTest(fileName); + } + + @TestMetadata("MyException.kt") + public void testMyException() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); + doTest(fileName); + } + + @TestMetadata("NestedClass.kt") + public void testNestedClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); + doTest(fileName); + } + + @TestMetadata("objectInClass.kt") + public void testObjectInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); + doTest(fileName); + } + + @TestMetadata("objectMembers.kt") + public void testObjectMembers() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); + doTest(fileName); + } + + @TestMetadata("packageLevelObject.kt") + public void testPackageLevelObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); + doTest(fileName); + } + + @TestMetadata("RemoveRedundantProjectionKind.kt") + public void testRemoveRedundantProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); + doTest(fileName); + } + + @TestMetadata("Simple.kt") + public void testSimple() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); + doTest(fileName); + } + + @TestMetadata("TwoFields.kt") + public void testTwoFields() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); + doTest(fileName); + } + + @TestMetadata("UnboundWildcard.kt") + public void testUnboundWildcard() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); + doTest(fileName); + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature") @TestDataPath("$PROJECT_ROOT") @InnerTestClasses({ - Propagation.Parameter.class, - Propagation.Return.class, - Propagation.TypeParameter.class, + KotlinSignature.Error.class, + KotlinSignature.Propagation.class, }) @RunWith(JUnit3RunnerWithInners.class) - public static class Propagation extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInPropagation() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("PropagateTypeArgumentNullable.kt") - public void testPropagateTypeArgumentNullable() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); + public static class KotlinSignature extends AbstractJvmRuntimeDescriptorLoaderTest { + @TestMetadata("AllBoundsInWhen.kt") + public void testAllBoundsInWhen() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); doTest(fileName); } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter") + public void testAllFilesPresentInKotlinSignature() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("ArrayType.kt") + public void testArrayType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); + doTest(fileName); + } + + @TestMetadata("ConstructorWithNewTypeParams.kt") + public void testConstructorWithNewTypeParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); + doTest(fileName); + } + + @TestMetadata("ConstructorWithParentTypeParams.kt") + public void testConstructorWithParentTypeParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); + doTest(fileName); + } + + @TestMetadata("ConstructorWithSeveralParams.kt") + public void testConstructorWithSeveralParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); + doTest(fileName); + } + + @TestMetadata("ConstructorWithoutParams.kt") + public void testConstructorWithoutParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); + doTest(fileName); + } + + @TestMetadata("CustomProjectionKind.kt") + public void testCustomProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); + doTest(fileName); + } + + @TestMetadata("MethodWithFunctionTypes.kt") + public void testMethodWithFunctionTypes() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); + doTest(fileName); + } + + @TestMetadata("MethodWithGenerics.kt") + public void testMethodWithGenerics() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); + doTest(fileName); + } + + @TestMetadata("MethodWithMappedClasses.kt") + public void testMethodWithMappedClasses() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); + doTest(fileName); + } + + @TestMetadata("MethodWithTypeParameters.kt") + public void testMethodWithTypeParameters() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); + doTest(fileName); + } + + @TestMetadata("MethodWithVararg.kt") + public void testMethodWithVararg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); + doTest(fileName); + } + + @TestMetadata("PropertyArrayTypes.kt") + public void testPropertyArrayTypes() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); + doTest(fileName); + } + + @TestMetadata("PropertyComplexTypes.kt") + public void testPropertyComplexTypes() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); + doTest(fileName); + } + + @TestMetadata("PropertySimpleType.kt") + public void testPropertySimpleType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); + doTest(fileName); + } + + @TestMetadata("StarProjection.kt") + public void testStarProjection() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); + doTest(fileName); + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Parameter extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInParameter() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("ChangeProjectionKind1.kt") - public void testChangeProjectionKind1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); + public static class Error extends AbstractJvmRuntimeDescriptorLoaderTest { + @TestMetadata("AddingNullability.kt") + public void testAddingNullability() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); doTest(fileName); } - @TestMetadata("ChangeProjectionKind2.kt") - public void testChangeProjectionKind2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); + public void testAllFilesPresentInError() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("ConflictingProjectionKind.kt") + public void testConflictingProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); doTest(fileName); } - @TestMetadata("DeeplySubstitutedClassParameter.kt") - public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); + @TestMetadata("ExplicitFieldGettersAndSetters.kt") + public void testExplicitFieldGettersAndSetters() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); doTest(fileName); } - @TestMetadata("DeeplySubstitutedClassParameter2.kt") - public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); + @TestMetadata("ExtraUpperBound.kt") + public void testExtraUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); doTest(fileName); } - @TestMetadata("InheritMutability.kt") - public void testInheritMutability() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); + @TestMetadata("MissingUpperBound.kt") + public void testMissingUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); doTest(fileName); } - @TestMetadata("InheritNotVararg.kt") - public void testInheritNotVararg() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); + @TestMetadata("NoFieldTypeRef.kt") + public void testNoFieldTypeRef() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); doTest(fileName); } - @TestMetadata("InheritNotVarargInteger.kt") - public void testInheritNotVarargInteger() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); + @TestMetadata("NotVarargReplacedWithVararg.kt") + public void testNotVarargReplacedWithVararg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); doTest(fileName); } - @TestMetadata("InheritNotVarargNotNull.kt") - public void testInheritNotVarargNotNull() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); + @TestMetadata("RedundantProjectionKind.kt") + public void testRedundantProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); doTest(fileName); } - @TestMetadata("InheritNotVarargPrimitive.kt") - public void testInheritNotVarargPrimitive() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); + @TestMetadata("ReturnTypeMissing.kt") + public void testReturnTypeMissing() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); doTest(fileName); } - @TestMetadata("InheritNullability.kt") - public void testInheritNullability() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); + @TestMetadata("SyntaxError.kt") + public void testSyntaxError() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); doTest(fileName); } - @TestMetadata("InheritProjectionKind.kt") - public void testInheritProjectionKind() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); + @TestMetadata("SyntaxErrorInFieldAnnotation.kt") + public void testSyntaxErrorInFieldAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); doTest(fileName); } - @TestMetadata("InheritReadOnliness.kt") - public void testInheritReadOnliness() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); + @TestMetadata("VarargReplacedWithNotVararg.kt") + public void testVarargReplacedWithNotVararg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); doTest(fileName); } - @TestMetadata("InheritVararg.kt") - public void testInheritVararg() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); + @TestMetadata("WrongFieldInitializer.kt") + public void testWrongFieldInitializer() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); doTest(fileName); } - @TestMetadata("InheritVarargInteger.kt") - public void testInheritVarargInteger() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); + @TestMetadata("WrongFieldMutability.kt") + public void testWrongFieldMutability() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); doTest(fileName); } - @TestMetadata("InheritVarargNotNull.kt") - public void testInheritVarargNotNull() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); + @TestMetadata("WrongFieldName.kt") + public void testWrongFieldName() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); doTest(fileName); } - @TestMetadata("InheritVarargPrimitive.kt") - public void testInheritVarargPrimitive() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); + @TestMetadata("WrongMethodName.kt") + public void testWrongMethodName() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); doTest(fileName); } - @TestMetadata("Kt3302.kt") - public void testKt3302() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); + @TestMetadata("WrongProjectionKind.kt") + public void testWrongProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); doTest(fileName); } - @TestMetadata("MutableToReadOnly.kt") - public void testMutableToReadOnly() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); + @TestMetadata("WrongReturnTypeStructure.kt") + public void testWrongReturnTypeStructure() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); doTest(fileName); } - @TestMetadata("NotNullToNullable.kt") - public void testNotNullToNullable() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); + @TestMetadata("WrongTypeName1.kt") + public void testWrongTypeName1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); doTest(fileName); } - @TestMetadata("NullableToNotNull.kt") - public void testNullableToNotNull() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); + @TestMetadata("WrongTypeName2.kt") + public void testWrongTypeName2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); doTest(fileName); } - @TestMetadata("NullableToNotNullKotlinSignature.kt") - public void testNullableToNotNullKotlinSignature() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); + @TestMetadata("WrongTypeName3.kt") + public void testWrongTypeName3() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); doTest(fileName); } - @TestMetadata("OverrideWithErasedParameter.kt") - public void testOverrideWithErasedParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); + @TestMetadata("WrongTypeParameterBoundStructure1.kt") + public void testWrongTypeParameterBoundStructure1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); doTest(fileName); } - @TestMetadata("ReadOnlyToMutable.kt") - public void testReadOnlyToMutable() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); + @TestMetadata("WrongTypeParameterBoundStructure2.kt") + public void testWrongTypeParameterBoundStructure2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); doTest(fileName); } - @TestMetadata("SubclassFromGenericAndNot.kt") - public void testSubclassFromGenericAndNot() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); + @TestMetadata("WrongTypeParametersCount.kt") + public void testWrongTypeParametersCount() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); doTest(fileName); } - @TestMetadata("SubstitutedClassParameter.kt") - public void testSubstitutedClassParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); + @TestMetadata("WrongValueParameterStructure1.kt") + public void testWrongValueParameterStructure1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); doTest(fileName); } - @TestMetadata("SubstitutedClassParameters.kt") - public void testSubstitutedClassParameters() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); + @TestMetadata("WrongValueParameterStructure2.kt") + public void testWrongValueParameterStructure2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); + doTest(fileName); + } + + @TestMetadata("WrongValueParametersCount.kt") + public void testWrongValueParametersCount() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); doTest(fileName); } } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation") @TestDataPath("$PROJECT_ROOT") + @InnerTestClasses({ + Propagation.Parameter.class, + Propagation.Return.class, + Propagation.TypeParameter.class, + }) @RunWith(JUnit3RunnerWithInners.class) - public static class Return extends AbstractJvmRuntimeDescriptorLoaderTest { - @TestMetadata("AddNotNullJavaSubtype.kt") - public void testAddNotNullJavaSubtype() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); + public static class Propagation extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInPropagation() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("PropagateTypeArgumentNullable.kt") + public void testPropagateTypeArgumentNullable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); doTest(fileName); } - @TestMetadata("AddNotNullSameJavaType.kt") - public void testAddNotNullSameJavaType() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); - doTest(fileName); + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Parameter extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInParameter() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("ChangeProjectionKind1.kt") + public void testChangeProjectionKind1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); + doTest(fileName); + } + + @TestMetadata("ChangeProjectionKind2.kt") + public void testChangeProjectionKind2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); + doTest(fileName); + } + + @TestMetadata("DeeplySubstitutedClassParameter.kt") + public void testDeeplySubstitutedClassParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); + doTest(fileName); + } + + @TestMetadata("DeeplySubstitutedClassParameter2.kt") + public void testDeeplySubstitutedClassParameter2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); + doTest(fileName); + } + + @TestMetadata("InheritMutability.kt") + public void testInheritMutability() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); + doTest(fileName); + } + + @TestMetadata("InheritNotVararg.kt") + public void testInheritNotVararg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); + doTest(fileName); + } + + @TestMetadata("InheritNotVarargInteger.kt") + public void testInheritNotVarargInteger() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); + doTest(fileName); + } + + @TestMetadata("InheritNotVarargNotNull.kt") + public void testInheritNotVarargNotNull() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); + doTest(fileName); + } + + @TestMetadata("InheritNotVarargPrimitive.kt") + public void testInheritNotVarargPrimitive() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); + doTest(fileName); + } + + @TestMetadata("InheritNullability.kt") + public void testInheritNullability() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); + doTest(fileName); + } + + @TestMetadata("InheritProjectionKind.kt") + public void testInheritProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); + doTest(fileName); + } + + @TestMetadata("InheritReadOnliness.kt") + public void testInheritReadOnliness() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); + doTest(fileName); + } + + @TestMetadata("InheritVararg.kt") + public void testInheritVararg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); + doTest(fileName); + } + + @TestMetadata("InheritVarargInteger.kt") + public void testInheritVarargInteger() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); + doTest(fileName); + } + + @TestMetadata("InheritVarargNotNull.kt") + public void testInheritVarargNotNull() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); + doTest(fileName); + } + + @TestMetadata("InheritVarargPrimitive.kt") + public void testInheritVarargPrimitive() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); + doTest(fileName); + } + + @TestMetadata("Kt3302.kt") + public void testKt3302() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); + doTest(fileName); + } + + @TestMetadata("MutableToReadOnly.kt") + public void testMutableToReadOnly() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); + doTest(fileName); + } + + @TestMetadata("NotNullToNullable.kt") + public void testNotNullToNullable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); + doTest(fileName); + } + + @TestMetadata("NullableToNotNull.kt") + public void testNullableToNotNull() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); + doTest(fileName); + } + + @TestMetadata("NullableToNotNullKotlinSignature.kt") + public void testNullableToNotNullKotlinSignature() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); + doTest(fileName); + } + + @TestMetadata("OverrideWithErasedParameter.kt") + public void testOverrideWithErasedParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); + doTest(fileName); + } + + @TestMetadata("ReadOnlyToMutable.kt") + public void testReadOnlyToMutable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); + doTest(fileName); + } + + @TestMetadata("SubclassFromGenericAndNot.kt") + public void testSubclassFromGenericAndNot() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); + doTest(fileName); + } + + @TestMetadata("SubstitutedClassParameter.kt") + public void testSubstitutedClassParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); + doTest(fileName); + } + + @TestMetadata("SubstitutedClassParameters.kt") + public void testSubstitutedClassParameters() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); + doTest(fileName); + } } - @TestMetadata("AddNullabilityJavaSubtype.kt") - public void testAddNullabilityJavaSubtype() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); - doTest(fileName); + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Return extends AbstractJvmRuntimeDescriptorLoaderTest { + @TestMetadata("AddNotNullJavaSubtype.kt") + public void testAddNotNullJavaSubtype() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); + doTest(fileName); + } + + @TestMetadata("AddNotNullSameJavaType.kt") + public void testAddNotNullSameJavaType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); + doTest(fileName); + } + + @TestMetadata("AddNullabilityJavaSubtype.kt") + public void testAddNullabilityJavaSubtype() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); + doTest(fileName); + } + + @TestMetadata("AddNullabilitySameGenericType1.kt") + public void testAddNullabilitySameGenericType1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); + doTest(fileName); + } + + @TestMetadata("AddNullabilitySameGenericType2.kt") + public void testAddNullabilitySameGenericType2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); + doTest(fileName); + } + + @TestMetadata("AddNullabilitySameJavaType.kt") + public void testAddNullabilitySameJavaType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); + doTest(fileName); + } + + public void testAllFilesPresentInReturn() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("CantMakeImmutableInSubclass.kt") + public void testCantMakeImmutableInSubclass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); + doTest(fileName); + } + + @TestMetadata("DeeplySubstitutedClassParameter.kt") + public void testDeeplySubstitutedClassParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); + doTest(fileName); + } + + @TestMetadata("DeeplySubstitutedClassParameter2.kt") + public void testDeeplySubstitutedClassParameter2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); + doTest(fileName); + } + + @TestMetadata("HalfSubstitutedTypeParameters.kt") + public void testHalfSubstitutedTypeParameters() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); + doTest(fileName); + } + + @TestMetadata("InheritNullabilityGenericSubclassSimple.kt") + public void testInheritNullabilityGenericSubclassSimple() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); + doTest(fileName); + } + + @TestMetadata("InheritNullabilityJavaSubtype.kt") + public void testInheritNullabilityJavaSubtype() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); + doTest(fileName); + } + + @TestMetadata("InheritNullabilitySameGenericType.kt") + public void testInheritNullabilitySameGenericType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); + doTest(fileName); + } + + @TestMetadata("InheritNullabilitySameJavaType.kt") + public void testInheritNullabilitySameJavaType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); + doTest(fileName); + } + + @TestMetadata("InheritProjectionKind.kt") + public void testInheritProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); + doTest(fileName); + } + + @TestMetadata("InheritReadOnlinessOfArgument.kt") + public void testInheritReadOnlinessOfArgument() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); + doTest(fileName); + } + + @TestMetadata("InheritReadOnlinessSameClass.kt") + public void testInheritReadOnlinessSameClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); + doTest(fileName); + } + + @TestMetadata("InheritReadOnlinessSubclass.kt") + public void testInheritReadOnlinessSubclass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); + doTest(fileName); + } + + @TestMetadata("SameProjectionKind.kt") + public void testSameProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); + doTest(fileName); + } + + @TestMetadata("SubclassFromGenericAndNot.kt") + public void testSubclassFromGenericAndNot() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); + doTest(fileName); + } + + @TestMetadata("SubclassOfCollection.kt") + public void testSubclassOfCollection() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); + doTest(fileName); + } + + @TestMetadata("SubclassOfMapEntry.kt") + public void testSubclassOfMapEntry() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); + doTest(fileName); + } + + @TestMetadata("SubstitutedClassParameter.kt") + public void testSubstitutedClassParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); + doTest(fileName); + } + + @TestMetadata("SubstitutedClassParameters.kt") + public void testSubstitutedClassParameters() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); + doTest(fileName); + } + + @TestMetadata("TwoSuperclassesConflictingProjectionKinds.kt") + public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); + doTest(fileName); + } + + @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.kt") + public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); + doTest(fileName); + } + + @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.kt") + public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); + doTest(fileName); + } + + @TestMetadata("TwoSuperclassesMutableAndNot.kt") + public void testTwoSuperclassesMutableAndNot() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); + doTest(fileName); + } + + @TestMetadata("TwoSuperclassesReturnJavaSubtype.kt") + public void testTwoSuperclassesReturnJavaSubtype() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); + doTest(fileName); + } + + @TestMetadata("TwoSuperclassesReturnSameJavaType.kt") + public void testTwoSuperclassesReturnSameJavaType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); + doTest(fileName); + } + + @TestMetadata("TwoSuperclassesSupplementNotNull.kt") + public void testTwoSuperclassesSupplementNotNull() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); + doTest(fileName); + } + + @TestMetadata("TypeParamOfClass.kt") + public void testTypeParamOfClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); + doTest(fileName); + } + + @TestMetadata("TypeParamOfClassSubstituted.kt") + public void testTypeParamOfClassSubstituted() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); + doTest(fileName); + } + + @TestMetadata("TypeParamOfFun.kt") + public void testTypeParamOfFun() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); + doTest(fileName); + } } - @TestMetadata("AddNullabilitySameGenericType1.kt") - public void testAddNullabilitySameGenericType1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); - doTest(fileName); - } + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeParameter extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInTypeParameter() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.kt$"), true); + } - @TestMetadata("AddNullabilitySameGenericType2.kt") - public void testAddNullabilitySameGenericType2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); - doTest(fileName); - } + @TestMetadata("InheritMutability.kt") + public void testInheritMutability() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); + doTest(fileName); + } - @TestMetadata("AddNullabilitySameJavaType.kt") - public void testAddNullabilitySameJavaType() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); - doTest(fileName); - } + @TestMetadata("InheritNullability.kt") + public void testInheritNullability() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); + doTest(fileName); + } - public void testAllFilesPresentInReturn() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return"), Pattern.compile("^(.+)\\.kt$"), true); - } + @TestMetadata("InheritReadOnliness.kt") + public void testInheritReadOnliness() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); + doTest(fileName); + } - @TestMetadata("CantMakeImmutableInSubclass.kt") - public void testCantMakeImmutableInSubclass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); - doTest(fileName); - } + @TestMetadata("TwoBounds.kt") + public void testTwoBounds() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); + doTest(fileName); + } - @TestMetadata("DeeplySubstitutedClassParameter.kt") - public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); - doTest(fileName); - } + @TestMetadata("TwoSuperclasses.kt") + public void testTwoSuperclasses() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); + doTest(fileName); + } - @TestMetadata("DeeplySubstitutedClassParameter2.kt") - public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); - doTest(fileName); - } + @TestMetadata("TwoTypeParameters.kt") + public void testTwoTypeParameters() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); + doTest(fileName); + } - @TestMetadata("HalfSubstitutedTypeParameters.kt") - public void testHalfSubstitutedTypeParameters() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); - doTest(fileName); - } + @TestMetadata("UseParameterAsUpperBound.kt") + public void testUseParameterAsUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); + doTest(fileName); + } - @TestMetadata("InheritNullabilityGenericSubclassSimple.kt") - public void testInheritNullabilityGenericSubclassSimple() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); - doTest(fileName); - } + @TestMetadata("UseParameterInUpperBound.kt") + public void testUseParameterInUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); + doTest(fileName); + } - @TestMetadata("InheritNullabilityJavaSubtype.kt") - public void testInheritNullabilityJavaSubtype() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); - doTest(fileName); - } - - @TestMetadata("InheritNullabilitySameGenericType.kt") - public void testInheritNullabilitySameGenericType() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); - doTest(fileName); - } - - @TestMetadata("InheritNullabilitySameJavaType.kt") - public void testInheritNullabilitySameJavaType() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); - doTest(fileName); - } - - @TestMetadata("InheritProjectionKind.kt") - public void testInheritProjectionKind() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); - doTest(fileName); - } - - @TestMetadata("InheritReadOnlinessOfArgument.kt") - public void testInheritReadOnlinessOfArgument() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); - doTest(fileName); - } - - @TestMetadata("InheritReadOnlinessSameClass.kt") - public void testInheritReadOnlinessSameClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); - doTest(fileName); - } - - @TestMetadata("InheritReadOnlinessSubclass.kt") - public void testInheritReadOnlinessSubclass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); - doTest(fileName); - } - - @TestMetadata("SameProjectionKind.kt") - public void testSameProjectionKind() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); - doTest(fileName); - } - - @TestMetadata("SubclassFromGenericAndNot.kt") - public void testSubclassFromGenericAndNot() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); - doTest(fileName); - } - - @TestMetadata("SubclassOfCollection.kt") - public void testSubclassOfCollection() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); - doTest(fileName); - } - - @TestMetadata("SubclassOfMapEntry.kt") - public void testSubclassOfMapEntry() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); - doTest(fileName); - } - - @TestMetadata("SubstitutedClassParameter.kt") - public void testSubstitutedClassParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); - doTest(fileName); - } - - @TestMetadata("SubstitutedClassParameters.kt") - public void testSubstitutedClassParameters() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); - doTest(fileName); - } - - @TestMetadata("TwoSuperclassesConflictingProjectionKinds.kt") - public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); - doTest(fileName); - } - - @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.kt") - public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); - doTest(fileName); - } - - @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.kt") - public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); - doTest(fileName); - } - - @TestMetadata("TwoSuperclassesMutableAndNot.kt") - public void testTwoSuperclassesMutableAndNot() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); - doTest(fileName); - } - - @TestMetadata("TwoSuperclassesReturnJavaSubtype.kt") - public void testTwoSuperclassesReturnJavaSubtype() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); - doTest(fileName); - } - - @TestMetadata("TwoSuperclassesReturnSameJavaType.kt") - public void testTwoSuperclassesReturnSameJavaType() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); - doTest(fileName); - } - - @TestMetadata("TwoSuperclassesSupplementNotNull.kt") - public void testTwoSuperclassesSupplementNotNull() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); - doTest(fileName); - } - - @TestMetadata("TypeParamOfClass.kt") - public void testTypeParamOfClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); - doTest(fileName); - } - - @TestMetadata("TypeParamOfClassSubstituted.kt") - public void testTypeParamOfClassSubstituted() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); - doTest(fileName); - } - - @TestMetadata("TypeParamOfFun.kt") - public void testTypeParamOfFun() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); - doTest(fileName); + @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.kt") + public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); + doTest(fileName); + } } } + } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeParameter extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInTypeParameter() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.kt$"), true); - } + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Library extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInLibrary() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library"), Pattern.compile("^(.+)\\.kt$"), true); + } - @TestMetadata("InheritMutability.kt") - public void testInheritMutability() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); - doTest(fileName); - } + @TestMetadata("LoadIterable.kt") + public void testLoadIterable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); + doTest(fileName); + } - @TestMetadata("InheritNullability.kt") - public void testInheritNullability() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); - doTest(fileName); - } + @TestMetadata("LoadIterator.kt") + public void testLoadIterator() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); + doTest(fileName); + } - @TestMetadata("InheritReadOnliness.kt") - public void testInheritReadOnliness() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); - doTest(fileName); - } + @TestMetadata("Max.kt") + public void testMax() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); + doTest(fileName); + } + } - @TestMetadata("TwoBounds.kt") - public void testTwoBounds() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); - doTest(fileName); - } + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Modality extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInModality() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality"), Pattern.compile("^(.+)\\.kt$"), true); + } - @TestMetadata("TwoSuperclasses.kt") - public void testTwoSuperclasses() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); - doTest(fileName); - } + @TestMetadata("ModalityOfFakeOverrides.kt") + public void testModalityOfFakeOverrides() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); + doTest(fileName); + } + } - @TestMetadata("TwoTypeParameters.kt") - public void testTwoTypeParameters() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); - doTest(fileName); - } + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotNull extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInNotNull() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull"), Pattern.compile("^(.+)\\.kt$"), true); + } - @TestMetadata("UseParameterAsUpperBound.kt") - public void testUseParameterAsUpperBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); - doTest(fileName); - } + @TestMetadata("NotNullField.kt") + public void testNotNullField() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); + doTest(fileName); + } - @TestMetadata("UseParameterInUpperBound.kt") - public void testUseParameterInUpperBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); - doTest(fileName); - } + @TestMetadata("NotNullIntArray.kt") + public void testNotNullIntArray() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); + doTest(fileName); + } - @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.kt") - public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); - doTest(fileName); - } + @TestMetadata("NotNullMethod.kt") + public void testNotNullMethod() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); + doTest(fileName); + } + + @TestMetadata("NotNullObjectArray.kt") + public void testNotNullObjectArray() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); + doTest(fileName); + } + + @TestMetadata("NotNullParameter.kt") + public void testNotNullParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); + doTest(fileName); } } } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun") + @TestDataPath("$PROJECT_ROOT") + @InnerTestClasses({ + Fun.GenericWithTypeVariables.class, + Fun.GenericWithoutTypeVariables.class, + Fun.NonGeneric.class, + Fun.Vararg.class, + }) + @RunWith(JUnit3RunnerWithInners.class) + public static class Fun extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInFun() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("Assert.kt") + public void testAssert() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); + doTest(fileName); + } + + @TestMetadata("DeclaredMemberOverridesDelegated.kt") + public void testDeclaredMemberOverridesDelegated() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); + doTest(fileName); + } + + @TestMetadata("InheritMethodsDifferentReturnTypesAndVisibilities.kt") + public void testInheritMethodsDifferentReturnTypesAndVisibilities() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); + doTest(fileName); + } + + @TestMetadata("InheritValAndVar.kt") + public void testInheritValAndVar() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); + doTest(fileName); + } + + @TestMetadata("InheritValsDifferentTypes.kt") + public void testInheritValsDifferentTypes() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); + doTest(fileName); + } + + @TestMetadata("NoDelegationForFunctionInheritedFromTraitSuperClass.kt") + public void testNoDelegationForFunctionInheritedFromTraitSuperClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoDelegationForFunctionInheritedFromTraitSuperClass.kt"); + doTest(fileName); + } + + @TestMetadata("NoSamAdapter.kt") + public void testNoSamAdapter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); + doTest(fileName); + } + + @TestMetadata("NoSamConstructor.kt") + public void testNoSamConstructor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); + doTest(fileName); + } + + @TestMetadata("PropagateDeepSubclass.kt") + public void testPropagateDeepSubclass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); + doTest(fileName); + } + + @TestMetadata("PropagateSubclassOfComparable.kt") + public void testPropagateSubclassOfComparable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); + doTest(fileName); + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class GenericWithTypeVariables extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInGenericWithTypeVariables() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("FunGenericParam.kt") + public void testFunGenericParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); + doTest(fileName); + } + + @TestMetadata("FunParamParam.kt") + public void testFunParamParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); + doTest(fileName); + } + + @TestMetadata("FunParamParamErased.kt") + public void testFunParamParamErased() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); + doTest(fileName); + } + + @TestMetadata("FunParamReferencesParam.kt") + public void testFunParamReferencesParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); + doTest(fileName); + } + + @TestMetadata("FunParamTwoUpperBounds.kt") + public void testFunParamTwoUpperBounds() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); + doTest(fileName); + } + + @TestMetadata("FunParamUpperClassBound.kt") + public void testFunParamUpperClassBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); + doTest(fileName); + } + + @TestMetadata("FunParamUpperClassInterfaceBound.kt") + public void testFunParamUpperClassInterfaceBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); + doTest(fileName); + } + + @TestMetadata("FunParamUpperInterfaceBound.kt") + public void testFunParamUpperInterfaceBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); + doTest(fileName); + } + + @TestMetadata("FunParamVaragParam.kt") + public void testFunParamVaragParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); + doTest(fileName); + } + + @TestMetadata("FunTwoTypeParams.kt") + public void testFunTwoTypeParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class GenericWithoutTypeVariables extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInGenericWithoutTypeVariables() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("FunClassParamNotNull.kt") + public void testFunClassParamNotNull() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); + doTest(fileName); + } + + @TestMetadata("FunClassParamNullable.kt") + public void testFunClassParamNullable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); + doTest(fileName); + } + + @TestMetadata("FunParamNullable.kt") + public void testFunParamNullable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); + doTest(fileName); + } + + @TestMetadata("ReturnTypeClassParamNotNull.kt") + public void testReturnTypeClassParamNotNull() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); + doTest(fileName); + } + + @TestMetadata("ReturnTypeClassParamNullable.kt") + public void testReturnTypeClassParamNullable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NonGeneric extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInNonGeneric() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("ClassFun.kt") + public void testClassFun() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); + doTest(fileName); + } + + @TestMetadata("ClassFunGetFoo.kt") + public void testClassFunGetFoo() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); + doTest(fileName); + } + + @TestMetadata("ClassFunGetFooSetFoo.kt") + public void testClassFunGetFooSetFoo() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); + doTest(fileName); + } + + @TestMetadata("ClassFunSetFoo.kt") + public void testClassFunSetFoo() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); + doTest(fileName); + } + + @TestMetadata("ExtFun.kt") + public void testExtFun() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); + doTest(fileName); + } + + @TestMetadata("ExtFunInClass.kt") + public void testExtFunInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); + doTest(fileName); + } + + @TestMetadata("FunDefaultArg.kt") + public void testFunDefaultArg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); + doTest(fileName); + } + + @TestMetadata("FunParamNotNull.kt") + public void testFunParamNotNull() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); + doTest(fileName); + } + + @TestMetadata("FunVarargInt.kt") + public void testFunVarargInt() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); + doTest(fileName); + } + + @TestMetadata("FunVarargInteger.kt") + public void testFunVarargInteger() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); + doTest(fileName); + } + + @TestMetadata("ModifierAbstract.kt") + public void testModifierAbstract() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); + doTest(fileName); + } + + @TestMetadata("ModifierOpen.kt") + public void testModifierOpen() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); + doTest(fileName); + } + + @TestMetadata("NsFun.kt") + public void testNsFun() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); + doTest(fileName); + } + + @TestMetadata("NsFunGetFoo.kt") + public void testNsFunGetFoo() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); + doTest(fileName); + } + + @TestMetadata("ReturnTypeNotNull.kt") + public void testReturnTypeNotNull() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); + doTest(fileName); + } + + @TestMetadata("ReturnTypeNullable.kt") + public void testReturnTypeNullable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Vararg extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInVararg() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/vararg"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("nonLastVararg.kt") + public void testNonLastVararg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); + doTest(fileName); + } + + @TestMetadata("VarargInt.kt") + public void testVarargInt() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); + doTest(fileName); + } + + @TestMetadata("VarargString.kt") + public void testVarargString() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); + doTest(fileName); + } + } + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/inline") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Library extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInLibrary() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library"), Pattern.compile("^(.+)\\.kt$"), true); + public static class Inline extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInInline() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/inline"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("LoadIterable.kt") - public void testLoadIterable() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); - doTest(fileName); - } - - @TestMetadata("LoadIterator.kt") - public void testLoadIterator() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); - doTest(fileName); - } - - @TestMetadata("Max.kt") - public void testMax() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); + @TestMetadata("inlineFunction.kt") + public void testInlineFunction() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); doTest(fileName); } } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Modality extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInModality() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality"), Pattern.compile("^(.+)\\.kt$"), true); + public static class MemberOrder extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInMemberOrder() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/memberOrder"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("ModalityOfFakeOverrides.kt") - public void testModalityOfFakeOverrides() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); + @TestMetadata("callablesNameClash.kt") + public void testCallablesNameClash() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); + doTest(fileName); + } + + @TestMetadata("enumEntries.kt") + public void testEnumEntries() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); + doTest(fileName); + } + + @TestMetadata("extensionMembers.kt") + public void testExtensionMembers() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); + doTest(fileName); + } + + @TestMetadata("extensionPropertiesNameClash.kt") + public void testExtensionPropertiesNameClash() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); + doTest(fileName); + } + + @TestMetadata("innerClasses.kt") + public void testInnerClasses() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); + doTest(fileName); + } + + @TestMetadata("topLevelCallables.kt") + public void testTopLevelCallables() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); doTest(fileName); } } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/nested") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class NotNull extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInNotNull() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull"), Pattern.compile("^(.+)\\.kt$"), true); + public static class Nested extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInNested() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/nested"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("NotNullField.kt") - public void testNotNullField() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); + @TestMetadata("deepInnerGeneric.kt") + public void testDeepInnerGeneric() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); doTest(fileName); } - @TestMetadata("NotNullIntArray.kt") - public void testNotNullIntArray() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); + @TestMetadata("innerClassReferencesOuterTP.kt") + public void testInnerClassReferencesOuterTP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); doTest(fileName); } - @TestMetadata("NotNullMethod.kt") - public void testNotNullMethod() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); - doTest(fileName); - } - - @TestMetadata("NotNullObjectArray.kt") - public void testNotNullObjectArray() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); - doTest(fileName); - } - - @TestMetadata("NotNullParameter.kt") - public void testNotNullParameter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); + @TestMetadata("membersReferenceOuterTP.kt") + public void testMembersReferenceOuterTP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); doTest(fileName); } } - } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun") - @TestDataPath("$PROJECT_ROOT") - @InnerTestClasses({ - Fun.GenericWithTypeVariables.class, - Fun.GenericWithoutTypeVariables.class, - Fun.NonGeneric.class, - Fun.Vararg.class, - }) - @RunWith(JUnit3RunnerWithInners.class) - public static class Fun extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInFun() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("Assert.kt") - public void testAssert() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); - doTest(fileName); - } - - @TestMetadata("DeclaredMemberOverridesDelegated.kt") - public void testDeclaredMemberOverridesDelegated() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); - doTest(fileName); - } - - @TestMetadata("InheritMethodsDifferentReturnTypesAndVisibilities.kt") - public void testInheritMethodsDifferentReturnTypesAndVisibilities() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); - doTest(fileName); - } - - @TestMetadata("InheritValAndVar.kt") - public void testInheritValAndVar() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); - doTest(fileName); - } - - @TestMetadata("InheritValsDifferentTypes.kt") - public void testInheritValsDifferentTypes() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); - doTest(fileName); - } - - @TestMetadata("NoDelegationForFunctionInheritedFromTraitSuperClass.kt") - public void testNoDelegationForFunctionInheritedFromTraitSuperClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoDelegationForFunctionInheritedFromTraitSuperClass.kt"); - doTest(fileName); - } - - @TestMetadata("NoSamAdapter.kt") - public void testNoSamAdapter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); - doTest(fileName); - } - - @TestMetadata("NoSamConstructor.kt") - public void testNoSamConstructor() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); - doTest(fileName); - } - - @TestMetadata("PropagateDeepSubclass.kt") - public void testPropagateDeepSubclass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); - doTest(fileName); - } - - @TestMetadata("PropagateSubclassOfComparable.kt") - public void testPropagateSubclassOfComparable() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); - doTest(fileName); - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class GenericWithTypeVariables extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInGenericWithTypeVariables() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables"), Pattern.compile("^(.+)\\.kt$"), true); + public static class PlatformTypes extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInPlatformTypes() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/platformTypes"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("FunGenericParam.kt") - public void testFunGenericParam() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); + @TestMetadata("notnullTypeArgument.kt") + public void testNotnullTypeArgument() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); doTest(fileName); } - @TestMetadata("FunParamParam.kt") - public void testFunParamParam() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); - doTest(fileName); - } - - @TestMetadata("FunParamParamErased.kt") - public void testFunParamParamErased() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); - doTest(fileName); - } - - @TestMetadata("FunParamReferencesParam.kt") - public void testFunParamReferencesParam() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); - doTest(fileName); - } - - @TestMetadata("FunParamTwoUpperBounds.kt") - public void testFunParamTwoUpperBounds() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); - doTest(fileName); - } - - @TestMetadata("FunParamUpperClassBound.kt") - public void testFunParamUpperClassBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); - doTest(fileName); - } - - @TestMetadata("FunParamUpperClassInterfaceBound.kt") - public void testFunParamUpperClassInterfaceBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); - doTest(fileName); - } - - @TestMetadata("FunParamUpperInterfaceBound.kt") - public void testFunParamUpperInterfaceBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); - doTest(fileName); - } - - @TestMetadata("FunParamVaragParam.kt") - public void testFunParamVaragParam() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); - doTest(fileName); - } - - @TestMetadata("FunTwoTypeParams.kt") - public void testFunTwoTypeParams() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); + @TestMetadata("nullableTypeArgument.kt") + public void testNullableTypeArgument() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); doTest(fileName); } } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables") + @TestMetadata("compiler/testData/loadJava/compiledKotlin/prop") @TestDataPath("$PROJECT_ROOT") + @InnerTestClasses({ + Prop.DefaultAccessors.class, + }) @RunWith(JUnit3RunnerWithInners.class) - public static class GenericWithoutTypeVariables extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInGenericWithoutTypeVariables() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("FunClassParamNotNull.kt") - public void testFunClassParamNotNull() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); - doTest(fileName); - } - - @TestMetadata("FunClassParamNullable.kt") - public void testFunClassParamNullable() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); - doTest(fileName); - } - - @TestMetadata("FunParamNullable.kt") - public void testFunParamNullable() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); - doTest(fileName); - } - - @TestMetadata("ReturnTypeClassParamNotNull.kt") - public void testReturnTypeClassParamNotNull() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); - doTest(fileName); - } - - @TestMetadata("ReturnTypeClassParamNullable.kt") - public void testReturnTypeClassParamNullable() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NonGeneric extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInNonGeneric() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("ClassFun.kt") - public void testClassFun() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); - doTest(fileName); - } - - @TestMetadata("ClassFunGetFoo.kt") - public void testClassFunGetFoo() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); - doTest(fileName); - } - - @TestMetadata("ClassFunGetFooSetFoo.kt") - public void testClassFunGetFooSetFoo() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); - doTest(fileName); - } - - @TestMetadata("ClassFunSetFoo.kt") - public void testClassFunSetFoo() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); - doTest(fileName); - } - - @TestMetadata("ExtFun.kt") - public void testExtFun() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); - doTest(fileName); - } - - @TestMetadata("ExtFunInClass.kt") - public void testExtFunInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); - doTest(fileName); - } - - @TestMetadata("FunDefaultArg.kt") - public void testFunDefaultArg() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); - doTest(fileName); - } - - @TestMetadata("FunParamNotNull.kt") - public void testFunParamNotNull() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); - doTest(fileName); - } - - @TestMetadata("FunVarargInt.kt") - public void testFunVarargInt() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); - doTest(fileName); - } - - @TestMetadata("FunVarargInteger.kt") - public void testFunVarargInteger() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); - doTest(fileName); - } - - @TestMetadata("ModifierAbstract.kt") - public void testModifierAbstract() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); - doTest(fileName); - } - - @TestMetadata("ModifierOpen.kt") - public void testModifierOpen() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); - doTest(fileName); - } - - @TestMetadata("NsFun.kt") - public void testNsFun() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); - doTest(fileName); - } - - @TestMetadata("NsFunGetFoo.kt") - public void testNsFunGetFoo() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); - doTest(fileName); - } - - @TestMetadata("ReturnTypeNotNull.kt") - public void testReturnTypeNotNull() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); - doTest(fileName); - } - - @TestMetadata("ReturnTypeNullable.kt") - public void testReturnTypeNullable() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Vararg extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInVararg() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/vararg"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("nonLastVararg.kt") - public void testNonLastVararg() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); - doTest(fileName); - } - - @TestMetadata("VarargInt.kt") - public void testVarargInt() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); - doTest(fileName); - } - - @TestMetadata("VarargString.kt") - public void testVarargString() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); - doTest(fileName); - } - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/inline") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Inline extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInInline() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/inline"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("inlineFunction.kt") - public void testInlineFunction() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MemberOrder extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInMemberOrder() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/memberOrder"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("callablesNameClash.kt") - public void testCallablesNameClash() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); - doTest(fileName); - } - - @TestMetadata("enumEntries.kt") - public void testEnumEntries() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); - doTest(fileName); - } - - @TestMetadata("extensionMembers.kt") - public void testExtensionMembers() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); - doTest(fileName); - } - - @TestMetadata("extensionPropertiesNameClash.kt") - public void testExtensionPropertiesNameClash() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); - doTest(fileName); - } - - @TestMetadata("innerClasses.kt") - public void testInnerClasses() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); - doTest(fileName); - } - - @TestMetadata("topLevelCallables.kt") - public void testTopLevelCallables() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/nested") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Nested extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInNested() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/nested"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("deepInnerGeneric.kt") - public void testDeepInnerGeneric() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); - doTest(fileName); - } - - @TestMetadata("innerClassReferencesOuterTP.kt") - public void testInnerClassReferencesOuterTP() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); - doTest(fileName); - } - - @TestMetadata("membersReferenceOuterTP.kt") - public void testMembersReferenceOuterTP() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class PlatformTypes extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInPlatformTypes() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/platformTypes"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("notnullTypeArgument.kt") - public void testNotnullTypeArgument() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); - doTest(fileName); - } - - @TestMetadata("nullableTypeArgument.kt") - public void testNullableTypeArgument() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/prop") - @TestDataPath("$PROJECT_ROOT") - @InnerTestClasses({ - Prop.DefaultAccessors.class, - }) - @RunWith(JUnit3RunnerWithInners.class) - public static class Prop extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInProp() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("ClassVal.kt") - public void testClassVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); - doTest(fileName); - } - - @TestMetadata("ClassValAbstract.kt") - public void testClassValAbstract() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); - doTest(fileName); - } - - @TestMetadata("ClassVar.kt") - public void testClassVar() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); - doTest(fileName); - } - - @TestMetadata("CollectionSize.kt") - public void testCollectionSize() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); - doTest(fileName); - } - - @TestMetadata("Constants.kt") - public void testConstants() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); - doTest(fileName); - } - - @TestMetadata("ExtValClass.kt") - public void testExtValClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtValInClass.kt") - public void testExtValInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtValInt.kt") - public void testExtValInt() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); - doTest(fileName); - } - - @TestMetadata("ExtValIntCharSequence.kt") - public void testExtValIntCharSequence() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); - doTest(fileName); - } - - @TestMetadata("ExtValIntCharSequenceQ.kt") - public void testExtValIntCharSequenceQ() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); - doTest(fileName); - } - - @TestMetadata("ExtValIntListQOfIntInClass.kt") - public void testExtValIntListQOfIntInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtValIntTInClass.kt") - public void testExtValIntTInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtValIntTQInClass.kt") - public void testExtValIntTQInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtValTIntInClass.kt") - public void testExtValTIntInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtVarClass.kt") - public void testExtVarClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtVarInClass.kt") - public void testExtVarInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtVarInt.kt") - public void testExtVarInt() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); - doTest(fileName); - } - - @TestMetadata("ExtVarIntTInClass.kt") - public void testExtVarIntTInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtVarIntTQInClass.kt") - public void testExtVarIntTQInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtVarMapPQInt.kt") - public void testExtVarMapPQInt() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); - doTest(fileName); - } - - @TestMetadata("ExtVarTIntInClass.kt") - public void testExtVarTIntInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtVarTQIntInClass.kt") - public void testExtVarTQIntInClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); - doTest(fileName); - } - - @TestMetadata("ExtVarl.kt") - public void testExtVarl() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); - doTest(fileName); - } - - @TestMetadata("NsVal.kt") - public void testNsVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); - doTest(fileName); - } - - @TestMetadata("NsVar.kt") - public void testNsVar() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); - doTest(fileName); - } - - @TestMetadata("OverrideClassVal.kt") - public void testOverrideClassVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); - doTest(fileName); - } - - @TestMetadata("OverrideTraitVal.kt") - public void testOverrideTraitVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); - doTest(fileName); - } - - @TestMetadata("PropFromSuperclass.kt") - public void testPropFromSuperclass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); - doTest(fileName); - } - - @TestMetadata("TraitFinalVar.kt") - public void testTraitFinalVar() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); - doTest(fileName); - } - - @TestMetadata("TraitOpenVal.kt") - public void testTraitOpenVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); - doTest(fileName); - } - - @TestMetadata("VarDelegationToTraitImpl.kt") - public void testVarDelegationToTraitImpl() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); - doTest(fileName); - } - - @TestMetadata("VarWithDelegated.kt") - public void testVarWithDelegated() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); - doTest(fileName); - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultAccessors extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInDefaultAccessors() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors"), Pattern.compile("^(.+)\\.kt$"), true); + public static class Prop extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInProp() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop"), Pattern.compile("^(.+)\\.kt$"), true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); doTest(fileName); } - @TestMetadata("ClassValParams.kt") - public void testClassValParams() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); - doTest(fileName); - } - - @TestMetadata("ClassValWithGet.kt") - public void testClassValWithGet() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); + @TestMetadata("ClassValAbstract.kt") + public void testClassValAbstract() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); doTest(fileName); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); doTest(fileName); } - @TestMetadata("ClassVarModality.kt") - public void testClassVarModality() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); + @TestMetadata("CollectionSize.kt") + public void testCollectionSize() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); doTest(fileName); } - @TestMetadata("ClassVarParams.kt") - public void testClassVarParams() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); + @TestMetadata("Constants.kt") + public void testConstants() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); doTest(fileName); } - @TestMetadata("ClassVarWithGet.kt") - public void testClassVarWithGet() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); + @TestMetadata("ExtValClass.kt") + public void testExtValClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); doTest(fileName); } - @TestMetadata("ClassVarWithSet.kt") - public void testClassVarWithSet() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); + @TestMetadata("ExtValInClass.kt") + public void testExtValInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); doTest(fileName); } - @TestMetadata("ExtValLong.kt") - public void testExtValLong() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); + @TestMetadata("ExtValInt.kt") + public void testExtValInt() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); doTest(fileName); } - @TestMetadata("ExtVarLong.kt") - public void testExtVarLong() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); + @TestMetadata("ExtValIntCharSequence.kt") + public void testExtValIntCharSequence() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); + doTest(fileName); + } + + @TestMetadata("ExtValIntCharSequenceQ.kt") + public void testExtValIntCharSequenceQ() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); + doTest(fileName); + } + + @TestMetadata("ExtValIntListQOfIntInClass.kt") + public void testExtValIntListQOfIntInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtValIntTInClass.kt") + public void testExtValIntTInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtValIntTQInClass.kt") + public void testExtValIntTQInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtValTIntInClass.kt") + public void testExtValTIntInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtVarClass.kt") + public void testExtVarClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtVarInClass.kt") + public void testExtVarInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtVarInt.kt") + public void testExtVarInt() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); + doTest(fileName); + } + + @TestMetadata("ExtVarIntTInClass.kt") + public void testExtVarIntTInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtVarIntTQInClass.kt") + public void testExtVarIntTQInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtVarMapPQInt.kt") + public void testExtVarMapPQInt() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); + doTest(fileName); + } + + @TestMetadata("ExtVarTIntInClass.kt") + public void testExtVarTIntInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtVarTQIntInClass.kt") + public void testExtVarTQIntInClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); + doTest(fileName); + } + + @TestMetadata("ExtVarl.kt") + public void testExtVarl() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); + doTest(fileName); + } + + @TestMetadata("NsVal.kt") + public void testNsVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); + doTest(fileName); + } + + @TestMetadata("NsVar.kt") + public void testNsVar() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); + doTest(fileName); + } + + @TestMetadata("OverrideClassVal.kt") + public void testOverrideClassVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); + doTest(fileName); + } + + @TestMetadata("OverrideTraitVal.kt") + public void testOverrideTraitVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); + doTest(fileName); + } + + @TestMetadata("PropFromSuperclass.kt") + public void testPropFromSuperclass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); + doTest(fileName); + } + + @TestMetadata("TraitFinalVar.kt") + public void testTraitFinalVar() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); + doTest(fileName); + } + + @TestMetadata("TraitOpenVal.kt") + public void testTraitOpenVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); + doTest(fileName); + } + + @TestMetadata("VarDelegationToTraitImpl.kt") + public void testVarDelegationToTraitImpl() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); + doTest(fileName); + } + + @TestMetadata("VarWithDelegated.kt") + public void testVarWithDelegated() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); + doTest(fileName); + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultAccessors extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInDefaultAccessors() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("ClassVal.kt") + public void testClassVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); + doTest(fileName); + } + + @TestMetadata("ClassValParams.kt") + public void testClassValParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); + doTest(fileName); + } + + @TestMetadata("ClassValWithGet.kt") + public void testClassValWithGet() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); + doTest(fileName); + } + + @TestMetadata("ClassVar.kt") + public void testClassVar() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); + doTest(fileName); + } + + @TestMetadata("ClassVarModality.kt") + public void testClassVarModality() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); + doTest(fileName); + } + + @TestMetadata("ClassVarParams.kt") + public void testClassVarParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); + doTest(fileName); + } + + @TestMetadata("ClassVarWithGet.kt") + public void testClassVarWithGet() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); + doTest(fileName); + } + + @TestMetadata("ClassVarWithSet.kt") + public void testClassVarWithSet() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); + doTest(fileName); + } + + @TestMetadata("ExtValLong.kt") + public void testExtValLong() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); + doTest(fileName); + } + + @TestMetadata("ExtVarLong.kt") + public void testExtVarLong() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); + doTest(fileName); + } + } + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/type") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Type extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInType() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/type"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("Any.kt") + public void testAny() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); + doTest(fileName); + } + + @TestMetadata("AnyQ.kt") + public void testAnyQ() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); + doTest(fileName); + } + + @TestMetadata("ArrayOfInNumber.kt") + public void testArrayOfInNumber() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); + doTest(fileName); + } + + @TestMetadata("ArrayOfInt.kt") + public void testArrayOfInt() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); + doTest(fileName); + } + + @TestMetadata("ArrayOfInteger.kt") + public void testArrayOfInteger() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); + doTest(fileName); + } + + @TestMetadata("ArrayOfOutNumber.kt") + public void testArrayOfOutNumber() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); + doTest(fileName); + } + + @TestMetadata("ArrayOfOutT.kt") + public void testArrayOfOutT() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); + doTest(fileName); + } + + @TestMetadata("ArrayOfString.kt") + public void testArrayOfString() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); + doTest(fileName); + } + + @TestMetadata("Function1IntString.kt") + public void testFunction1IntString() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); + doTest(fileName); + } + + @TestMetadata("Int.kt") + public void testInt() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); + doTest(fileName); + } + + @TestMetadata("IntArray.kt") + public void testIntArray() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); + doTest(fileName); + } + + @TestMetadata("IntQ.kt") + public void testIntQ() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); + doTest(fileName); + } + + @TestMetadata("jlInteger.kt") + public void testJlInteger() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); + doTest(fileName); + } + + @TestMetadata("jlIntegerQ.kt") + public void testJlIntegerQ() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); + doTest(fileName); + } + + @TestMetadata("jlNumber.kt") + public void testJlNumber() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); + doTest(fileName); + } + + @TestMetadata("jlObject.kt") + public void testJlObject() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); + doTest(fileName); + } + + @TestMetadata("jlObjectQ.kt") + public void testJlObjectQ() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); + doTest(fileName); + } + + @TestMetadata("jlString.kt") + public void testJlString() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); + doTest(fileName); + } + + @TestMetadata("jlStringQ.kt") + public void testJlStringQ() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); + doTest(fileName); + } + + @TestMetadata("ListOfAny.kt") + public void testListOfAny() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); + doTest(fileName); + } + + @TestMetadata("ListOfAnyQ.kt") + public void testListOfAnyQ() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); + doTest(fileName); + } + + @TestMetadata("ListOfStar.kt") + public void testListOfStar() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); + doTest(fileName); + } + + @TestMetadata("ListOfString.kt") + public void testListOfString() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); + doTest(fileName); + } + + @TestMetadata("ListOfjlString.kt") + public void testListOfjlString() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); + doTest(fileName); + } + + @TestMetadata("Nothing.kt") + public void testNothing() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); + doTest(fileName); + } + + @TestMetadata("NothingQ.kt") + public void testNothingQ() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); + doTest(fileName); + } + + @TestMetadata("platform.kt") + public void testPlatform() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); + doTest(fileName); + } + + @TestMetadata("String.kt") + public void testString() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/String.kt"); + doTest(fileName); + } + + @TestMetadata("StringQ.kt") + public void testStringQ() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); + doTest(fileName); + } + + @TestMetadata("Unit.kt") + public void testUnit() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledKotlin/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInVisibility() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/visibility"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("InternalAbstractTraitMembersOverridden.kt") + public void testInternalAbstractTraitMembersOverridden() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalAbstractTraitMembersOverridden.kt"); + doTest(fileName); + } + + @TestMetadata("InternalClass.kt") + public void testInternalClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); + doTest(fileName); + } + + @TestMetadata("InternalConstructor.kt") + public void testInternalConstructor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); + doTest(fileName); + } + + @TestMetadata("InternalTopLevelMembers.kt") + public void testInternalTopLevelMembers() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); + doTest(fileName); + } + + @TestMetadata("InternalTraitMembers.kt") + public void testInternalTraitMembers() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembers.kt"); + doTest(fileName); + } + + @TestMetadata("InternalTraitMembersInherited.kt") + public void testInternalTraitMembersInherited() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembersInherited.kt"); + doTest(fileName); + } + + @TestMetadata("PrivateClass.kt") + public void testPrivateClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); + doTest(fileName); + } + + @TestMetadata("PrivateClassMembers.kt") + public void testPrivateClassMembers() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); + doTest(fileName); + } + + @TestMetadata("PrivateToThis.kt") + public void testPrivateToThis() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); + doTest(fileName); + } + + @TestMetadata("PrivateTopLevelFun.kt") + public void testPrivateTopLevelFun() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); + doTest(fileName); + } + + @TestMetadata("PrivateTopLevelVal.kt") + public void testPrivateTopLevelVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); + doTest(fileName); + } + + @TestMetadata("PropertyInConstructor.kt") + public void testPropertyInConstructor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); + doTest(fileName); + } + + @TestMetadata("PropertyInConstructorExplicitVisibility.kt") + public void testPropertyInConstructorExplicitVisibility() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); + doTest(fileName); + } + + @TestMetadata("TopLevelVarWithPrivateSetter.kt") + public void testTopLevelVarWithPrivateSetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); doTest(fileName); } } } - @TestMetadata("compiler/testData/loadJava/compiledKotlin/type") + @TestMetadata("compiler/testData/loadJava/compiledJava") @TestDataPath("$PROJECT_ROOT") + @InnerTestClasses({ + CompiledJava.Annotations.class, + CompiledJava.Constructor.class, + CompiledJava.JavaBean.class, + CompiledJava.KotlinSignature.class, + CompiledJava.Library.class, + CompiledJava.Modality.class, + CompiledJava.Mutability.class, + CompiledJava.NotNull.class, + CompiledJava.ProtectedPackage.class, + CompiledJava.ProtectedStatic.class, + CompiledJava.Rendering.class, + CompiledJava.SignaturePropagation.class, + CompiledJava.Static.class, + CompiledJava.Vararg.class, + }) @RunWith(JUnit3RunnerWithInners.class) - public static class Type extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInType() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/type"), Pattern.compile("^(.+)\\.kt$"), true); + public static class CompiledJava extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInCompiledJava() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava"), Pattern.compile("^(.+)\\.java$"), true, "sam", "kotlinSignature/propagation"); } - @TestMetadata("Any.kt") - public void testAny() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); + @TestMetadata("ArrayTypeVariance.java") + public void testArrayTypeVariance() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ArrayTypeVariance.java"); doTest(fileName); } - @TestMetadata("AnyQ.kt") - public void testAnyQ() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); + @TestMetadata("ClassDoesNotOverrideMethod.java") + public void testClassDoesNotOverrideMethod() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.java"); doTest(fileName); } - @TestMetadata("ArrayOfInNumber.kt") - public void testArrayOfInNumber() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); + @TestMetadata("ClassWithConstVal.java") + public void testClassWithConstVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithConstVal.java"); doTest(fileName); } - @TestMetadata("ArrayOfInt.kt") - public void testArrayOfInt() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); + @TestMetadata("ClassWithTypeP.java") + public void testClassWithTypeP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypeP.java"); doTest(fileName); } - @TestMetadata("ArrayOfInteger.kt") - public void testArrayOfInteger() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); + @TestMetadata("ClassWithTypePExtendsIterableP.java") + public void testClassWithTypePExtendsIterableP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.java"); doTest(fileName); } - @TestMetadata("ArrayOfOutNumber.kt") - public void testArrayOfOutNumber() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); + @TestMetadata("ClassWithTypePP.java") + public void testClassWithTypePP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePP.java"); doTest(fileName); } - @TestMetadata("ArrayOfOutT.kt") - public void testArrayOfOutT() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); + @TestMetadata("ClassWithTypePRefNext.java") + public void testClassWithTypePRefNext() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.java"); doTest(fileName); } - @TestMetadata("ArrayOfString.kt") - public void testArrayOfString() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); + @TestMetadata("ClassWithTypePRefSelf.java") + public void testClassWithTypePRefSelf() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.java"); doTest(fileName); } - @TestMetadata("Function1IntString.kt") - public void testFunction1IntString() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); + @TestMetadata("ClassWithTypePRefSelfAndClass.java") + public void testClassWithTypePRefSelfAndClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.java"); doTest(fileName); } - @TestMetadata("Int.kt") - public void testInt() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); + @TestMetadata("EnumMembers.java") + public void testEnumMembers() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/EnumMembers.java"); doTest(fileName); } - @TestMetadata("IntArray.kt") - public void testIntArray() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); + @TestMetadata("FieldAsVar.java") + public void testFieldAsVar() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldAsVar.java"); doTest(fileName); } - @TestMetadata("IntQ.kt") - public void testIntQ() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); + @TestMetadata("FieldOfArrayType.java") + public void testFieldOfArrayType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldOfArrayType.java"); doTest(fileName); } - @TestMetadata("jlInteger.kt") - public void testJlInteger() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); + @TestMetadata("FinalFieldAsVal.java") + public void testFinalFieldAsVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FinalFieldAsVal.java"); doTest(fileName); } - @TestMetadata("jlIntegerQ.kt") - public void testJlIntegerQ() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); + @TestMetadata("InheritMethodsDifferentReturnTypes.java") + public void testInheritMethodsDifferentReturnTypes() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.java"); doTest(fileName); } - @TestMetadata("jlNumber.kt") - public void testJlNumber() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); + @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.java") + public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.java"); doTest(fileName); } - @TestMetadata("jlObject.kt") - public void testJlObject() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); + @TestMetadata("InnerClass.java") + public void testInnerClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClass.java"); doTest(fileName); } - @TestMetadata("jlObjectQ.kt") - public void testJlObjectQ() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); + @TestMetadata("InnerClassReferencesOuterTP.java") + public void testInnerClassReferencesOuterTP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.java"); doTest(fileName); } - @TestMetadata("jlString.kt") - public void testJlString() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); + @TestMetadata("InnerClassesInGeneric.java") + public void testInnerClassesInGeneric() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.java"); doTest(fileName); } - @TestMetadata("jlStringQ.kt") - public void testJlStringQ() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); + @TestMetadata("InnerOfGeneric.java") + public void testInnerOfGeneric() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerOfGeneric.java"); doTest(fileName); } - @TestMetadata("ListOfAny.kt") - public void testListOfAny() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); + @TestMetadata("JavaEnum.java") + public void testJavaEnum() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/JavaEnum.java"); doTest(fileName); } - @TestMetadata("ListOfAnyQ.kt") - public void testListOfAnyQ() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); + @TestMetadata("MethodReferencesOuterClassTP.java") + public void testMethodReferencesOuterClassTP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.java"); doTest(fileName); } - @TestMetadata("ListOfStar.kt") - public void testListOfStar() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); + @TestMetadata("MethodTypePOneUpperBound.java") + public void testMethodTypePOneUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.java"); doTest(fileName); } - @TestMetadata("ListOfString.kt") - public void testListOfString() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); + @TestMetadata("MethodTypePTwoUpperBounds.java") + public void testMethodTypePTwoUpperBounds() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.java"); doTest(fileName); } - @TestMetadata("ListOfjlString.kt") - public void testListOfjlString() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); + @TestMetadata("MethodWithTypeP.java") + public void testMethodWithTypeP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypeP.java"); doTest(fileName); } - @TestMetadata("Nothing.kt") - public void testNothing() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); + @TestMetadata("MethodWithTypePP.java") + public void testMethodWithTypePP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypePP.java"); doTest(fileName); } - @TestMetadata("NothingQ.kt") - public void testNothingQ() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); + @TestMetadata("MethodWithTypePRefClassP.java") + public void testMethodWithTypePRefClassP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.java"); doTest(fileName); } - @TestMetadata("platform.kt") - public void testPlatform() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); + @TestMetadata("MethosWithPRefTP.java") + public void testMethosWithPRefTP() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethosWithPRefTP.java"); doTest(fileName); } - @TestMetadata("String.kt") - public void testString() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/String.kt"); + @TestMetadata("MyException.java") + public void testMyException() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MyException.java"); doTest(fileName); } - @TestMetadata("StringQ.kt") - public void testStringQ() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); + @TestMetadata("NestedClass.java") + public void testNestedClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/NestedClass.java"); doTest(fileName); } - @TestMetadata("Unit.kt") - public void testUnit() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); - doTest(fileName); - } - } - - @TestMetadata("compiler/testData/loadJava/compiledKotlin/visibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Visibility extends AbstractJvmRuntimeDescriptorLoaderTest { - public void testAllFilesPresentInVisibility() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/visibility"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("InternalAbstractTraitMembersOverridden.kt") - public void testInternalAbstractTraitMembersOverridden() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalAbstractTraitMembersOverridden.kt"); + @TestMetadata("OverrideMethod.java") + public void testOverrideMethod() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/OverrideMethod.java"); doTest(fileName); } - @TestMetadata("InternalClass.kt") - public void testInternalClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); + @TestMetadata("PackageLocalVisibility.java") + public void testPackageLocalVisibility() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PackageLocalVisibility.java"); doTest(fileName); } - @TestMetadata("InternalConstructor.kt") - public void testInternalConstructor() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); + @TestMetadata("PrivateMembers.java") + public void testPrivateMembers() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PrivateMembers.java"); doTest(fileName); } - @TestMetadata("InternalTopLevelMembers.kt") - public void testInternalTopLevelMembers() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); + @TestMetadata("PrivateMembersInHierarchy.java") + public void testPrivateMembersInHierarchy() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PrivateMembersInHierarchy.java"); doTest(fileName); } - @TestMetadata("InternalTraitMembers.kt") - public void testInternalTraitMembers() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembers.kt"); + @TestMetadata("RawTypeWithUpperBound.java") + public void testRawTypeWithUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.java"); doTest(fileName); } - @TestMetadata("InternalTraitMembersInherited.kt") - public void testInternalTraitMembersInherited() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTraitMembersInherited.kt"); + @TestMetadata("RawUpperBound.java") + public void testRawUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawUpperBound.java"); doTest(fileName); } - @TestMetadata("PrivateClass.kt") - public void testPrivateClass() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); + @TestMetadata("RecursiveRawUpperBound.java") + public void testRecursiveRawUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RecursiveRawUpperBound.java"); doTest(fileName); } - @TestMetadata("PrivateClassMembers.kt") - public void testPrivateClassMembers() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); + @TestMetadata("RecursiveWildcardUpperBound.java") + public void testRecursiveWildcardUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RecursiveWildcardUpperBound.java"); doTest(fileName); } - @TestMetadata("PrivateToThis.kt") - public void testPrivateToThis() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); + @TestMetadata("RemoveRedundantProjectionKind.java") + public void testRemoveRedundantProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.java"); doTest(fileName); } - @TestMetadata("PrivateTopLevelFun.kt") - public void testPrivateTopLevelFun() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); + @TestMetadata("Simple.java") + public void testSimple() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/Simple.java"); doTest(fileName); } - @TestMetadata("PrivateTopLevelVal.kt") - public void testPrivateTopLevelVal() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); + @TestMetadata("SubclassFromNested.java") + public void testSubclassFromNested() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/SubclassFromNested.java"); doTest(fileName); } - @TestMetadata("PropertyInConstructor.kt") - public void testPropertyInConstructor() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); + @TestMetadata("TwoFields.java") + public void testTwoFields() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/TwoFields.java"); doTest(fileName); } - @TestMetadata("PropertyInConstructorExplicitVisibility.kt") - public void testPropertyInConstructorExplicitVisibility() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); + @TestMetadata("UnboundWildcard.java") + public void testUnboundWildcard() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/UnboundWildcard.java"); doTest(fileName); } - @TestMetadata("TopLevelVarWithPrivateSetter.kt") - public void testTopLevelVarWithPrivateSetter() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); - doTest(fileName); + @TestMetadata("compiler/testData/loadJava/compiledJava/annotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Annotations extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInAnnotations() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/annotations"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("AnnotatedAnnotation.java") + public void testAnnotatedAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedAnnotation.java"); + doTest(fileName); + } + + @TestMetadata("AnnotatedConstructor.java") + public void testAnnotatedConstructor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.java"); + doTest(fileName); + } + + @TestMetadata("AnnotatedField.java") + public void testAnnotatedField() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.java"); + doTest(fileName); + } + + @TestMetadata("AnnotatedMethod.java") + public void testAnnotatedMethod() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.java"); + doTest(fileName); + } + + @TestMetadata("AnnotatedValueParameter.java") + public void testAnnotatedValueParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.java"); + doTest(fileName); + } + + @TestMetadata("AnnotationInParam.java") + public void testAnnotationInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.java"); + doTest(fileName); + } + + @TestMetadata("ArithmeticExpressionInParam.java") + public void testArithmeticExpressionInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.java"); + doTest(fileName); + } + + @TestMetadata("ArrayOfEnumInParam.java") + public void testArrayOfEnumInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.java"); + doTest(fileName); + } + + @TestMetadata("ArrayOfStringInParam.java") + public void testArrayOfStringInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.java"); + doTest(fileName); + } + + @TestMetadata("ClassObjectArrayInParam.java") + public void testClassObjectArrayInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.java"); + doTest(fileName); + } + + @TestMetadata("ClassObjectInParam.java") + public void testClassObjectInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.java"); + doTest(fileName); + } + + @TestMetadata("CustomAnnotation.java") + public void testCustomAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java"); + doTest(fileName); + } + + @TestMetadata("CustomAnnotationWithDefaultParameter.java") + public void testCustomAnnotationWithDefaultParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java"); + doTest(fileName); + } + + @TestMetadata("EmptyArrayInParam.java") + public void testEmptyArrayInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.java"); + doTest(fileName); + } + + @TestMetadata("EnumInParam.java") + public void testEnumInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumInParam.java"); + doTest(fileName); + } + + @TestMetadata("NestedEnumArgument.java") + public void testNestedEnumArgument() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.java"); + doTest(fileName); + } + + @TestMetadata("PrimitiveValueInParam.java") + public void testPrimitiveValueInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.java"); + doTest(fileName); + } + + @TestMetadata("RecursiveAnnotation.java") + public void testRecursiveAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java"); + doTest(fileName); + } + + @TestMetadata("RecursiveAnnotation2.java") + public void testRecursiveAnnotation2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java"); + doTest(fileName); + } + + @TestMetadata("SimpleAnnotation.java") + public void testSimpleAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/SimpleAnnotation.java"); + doTest(fileName); + } + + @TestMetadata("StringConcatenationInParam.java") + public void testStringConcatenationInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.java"); + doTest(fileName); + } + + @TestMetadata("StringConstantInParam.java") + public void testStringConstantInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.java"); + doTest(fileName); + } + + @TestMetadata("StringInParam.java") + public void testStringInParam() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringInParam.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/constructor") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constructor extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInConstructor() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/constructor"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ConstructorGenericDeep.java") + public void testConstructorGenericDeep() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.java"); + doTest(fileName); + } + + @TestMetadata("ConstructorGenericSimple.java") + public void testConstructorGenericSimple() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.java"); + doTest(fileName); + } + + @TestMetadata("ConstructorGenericUpperBound.java") + public void testConstructorGenericUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/javaBean") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaBean extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInJavaBean() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/javaBean"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("DifferentGetterAndSetter.java") + public void testDifferentGetterAndSetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.java"); + doTest(fileName); + } + + @TestMetadata("JavaBeanAbstractGetter.java") + public void testJavaBeanAbstractGetter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanAbstractGetter.java"); + doTest(fileName); + } + + @TestMetadata("JavaBeanVal.java") + public void testJavaBeanVal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.java"); + doTest(fileName); + } + + @TestMetadata("JavaBeanVar.java") + public void testJavaBeanVar() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.java"); + doTest(fileName); + } + + @TestMetadata("JavaBeanVarOfGenericType.java") + public void testJavaBeanVarOfGenericType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.java"); + doTest(fileName); + } + + @TestMetadata("TwoSetters.java") + public void testTwoSetters() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature") + @TestDataPath("$PROJECT_ROOT") + @InnerTestClasses({ + KotlinSignature.Error.class, + }) + @RunWith(JUnit3RunnerWithInners.class) + public static class KotlinSignature extends AbstractJvmRuntimeDescriptorLoaderTest { + @TestMetadata("AllBoundsInWhen.java") + public void testAllBoundsInWhen() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.java"); + doTest(fileName); + } + + public void testAllFilesPresentInKotlinSignature() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature"), Pattern.compile("^(.+)\\.java$"), true, "propagation"); + } + + @TestMetadata("ArrayType.java") + public void testArrayType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.java"); + doTest(fileName); + } + + @TestMetadata("ConstructorWithNewTypeParams.java") + public void testConstructorWithNewTypeParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.java"); + doTest(fileName); + } + + @TestMetadata("ConstructorWithParentTypeParams.java") + public void testConstructorWithParentTypeParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.java"); + doTest(fileName); + } + + @TestMetadata("ConstructorWithSeveralParams.java") + public void testConstructorWithSeveralParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.java"); + doTest(fileName); + } + + @TestMetadata("ConstructorWithoutParams.java") + public void testConstructorWithoutParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithoutParams.java"); + doTest(fileName); + } + + @TestMetadata("CustomProjectionKind.java") + public void testCustomProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.java"); + doTest(fileName); + } + + @TestMetadata("MethodWithFunctionTypes.java") + public void testMethodWithFunctionTypes() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.java"); + doTest(fileName); + } + + @TestMetadata("MethodWithGenerics.java") + public void testMethodWithGenerics() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.java"); + doTest(fileName); + } + + @TestMetadata("MethodWithMappedClasses.java") + public void testMethodWithMappedClasses() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.java"); + doTest(fileName); + } + + @TestMetadata("MethodWithTypeParameters.java") + public void testMethodWithTypeParameters() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.java"); + doTest(fileName); + } + + @TestMetadata("MethodWithVararg.java") + public void testMethodWithVararg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.java"); + doTest(fileName); + } + + @TestMetadata("PropertyArrayTypes.java") + public void testPropertyArrayTypes() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.java"); + doTest(fileName); + } + + @TestMetadata("PropertyComplexTypes.java") + public void testPropertyComplexTypes() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.java"); + doTest(fileName); + } + + @TestMetadata("PropertySimpleType.java") + public void testPropertySimpleType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.java"); + doTest(fileName); + } + + @TestMetadata("StarProjection.java") + public void testStarProjection() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.java"); + doTest(fileName); + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Error extends AbstractJvmRuntimeDescriptorLoaderTest { + @TestMetadata("AddingNullability.java") + public void testAddingNullability() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/AddingNullability.java"); + doTest(fileName); + } + + public void testAllFilesPresentInError() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/error"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ConflictingProjectionKind.java") + public void testConflictingProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ConflictingProjectionKind.java"); + doTest(fileName); + } + + @TestMetadata("ExplicitFieldGettersAndSetters.java") + public void testExplicitFieldGettersAndSetters() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.java"); + doTest(fileName); + } + + @TestMetadata("ExtraUpperBound.java") + public void testExtraUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ExtraUpperBound.java"); + doTest(fileName); + } + + @TestMetadata("MissingUpperBound.java") + public void testMissingUpperBound() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/MissingUpperBound.java"); + doTest(fileName); + } + + @TestMetadata("NoFieldTypeRef.java") + public void testNoFieldTypeRef() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/NoFieldTypeRef.java"); + doTest(fileName); + } + + @TestMetadata("NotVarargReplacedWithVararg.java") + public void testNotVarargReplacedWithVararg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/NotVarargReplacedWithVararg.java"); + doTest(fileName); + } + + @TestMetadata("RedundantProjectionKind.java") + public void testRedundantProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/RedundantProjectionKind.java"); + doTest(fileName); + } + + @TestMetadata("ReturnTypeMissing.java") + public void testReturnTypeMissing() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/ReturnTypeMissing.java"); + doTest(fileName); + } + + @TestMetadata("SyntaxError.java") + public void testSyntaxError() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxError.java"); + doTest(fileName); + } + + @TestMetadata("SyntaxErrorInFieldAnnotation.java") + public void testSyntaxErrorInFieldAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.java"); + doTest(fileName); + } + + @TestMetadata("VarargReplacedWithNotVararg.java") + public void testVarargReplacedWithNotVararg() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/VarargReplacedWithNotVararg.java"); + doTest(fileName); + } + + @TestMetadata("WrongFieldInitializer.java") + public void testWrongFieldInitializer() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldInitializer.java"); + doTest(fileName); + } + + @TestMetadata("WrongFieldMutability.java") + public void testWrongFieldMutability() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldMutability.java"); + doTest(fileName); + } + + @TestMetadata("WrongFieldName.java") + public void testWrongFieldName() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongFieldName.java"); + doTest(fileName); + } + + @TestMetadata("WrongMethodName.java") + public void testWrongMethodName() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongMethodName.java"); + doTest(fileName); + } + + @TestMetadata("WrongProjectionKind.java") + public void testWrongProjectionKind() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.java"); + doTest(fileName); + } + + @TestMetadata("WrongReturnTypeStructure.java") + public void testWrongReturnTypeStructure() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.java"); + doTest(fileName); + } + + @TestMetadata("WrongTypeName1.java") + public void testWrongTypeName1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName1.java"); + doTest(fileName); + } + + @TestMetadata("WrongTypeName2.java") + public void testWrongTypeName2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName2.java"); + doTest(fileName); + } + + @TestMetadata("WrongTypeName3.java") + public void testWrongTypeName3() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeName3.java"); + doTest(fileName); + } + + @TestMetadata("WrongTypeParameterBoundStructure1.java") + public void testWrongTypeParameterBoundStructure1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.java"); + doTest(fileName); + } + + @TestMetadata("WrongTypeParameterBoundStructure2.java") + public void testWrongTypeParameterBoundStructure2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.java"); + doTest(fileName); + } + + @TestMetadata("WrongTypeParametersCount.java") + public void testWrongTypeParametersCount() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParametersCount.java"); + doTest(fileName); + } + + @TestMetadata("WrongValueParameterStructure1.java") + public void testWrongValueParameterStructure1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.java"); + doTest(fileName); + } + + @TestMetadata("WrongValueParameterStructure2.java") + public void testWrongValueParameterStructure2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure2.java"); + doTest(fileName); + } + + @TestMetadata("WrongValueParametersCount.java") + public void testWrongValueParametersCount() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParametersCount.java"); + doTest(fileName); + } + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/library") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Library extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInLibrary() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/library"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("LoadIterable.java") + public void testLoadIterable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/LoadIterable.java"); + doTest(fileName); + } + + @TestMetadata("LoadIterator.java") + public void testLoadIterator() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/LoadIterator.java"); + doTest(fileName); + } + + @TestMetadata("Max.java") + public void testMax() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/Max.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/modality") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Modality extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInModality() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/modality"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ModalityOfFakeOverrides.java") + public void testModalityOfFakeOverrides() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/mutability") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Mutability extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInMutability() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/mutability"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("LoadIterable.java") + public void testLoadIterable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterable.java"); + doTest(fileName); + } + + @TestMetadata("LoadIterableWithConflict.java") + public void testLoadIterableWithConflict() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.java"); + doTest(fileName); + } + + @TestMetadata("LoadIterableWithNullability.java") + public void testLoadIterableWithNullability() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.java"); + doTest(fileName); + } + + @TestMetadata("LoadIterableWithPropagation.java") + public void testLoadIterableWithPropagation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/notNull") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotNull extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInNotNull() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/notNull"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("NotNullField.java") + public void testNotNullField() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullField.java"); + doTest(fileName); + } + + @TestMetadata("NotNullIntArray.java") + public void testNotNullIntArray() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullIntArray.java"); + doTest(fileName); + } + + @TestMetadata("NotNullMethod.java") + public void testNotNullMethod() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullMethod.java"); + doTest(fileName); + } + + @TestMetadata("NotNullObjectArray.java") + public void testNotNullObjectArray() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.java"); + doTest(fileName); + } + + @TestMetadata("NotNullParameter.java") + public void testNotNullParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullParameter.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/protectedPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedPackage extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInProtectedPackage() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/protectedPackage"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ProtectedPackageConstructor.java") + public void testProtectedPackageConstructor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java"); + doTest(fileName); + } + + @TestMetadata("ProtectedPackageFun.java") + public void testProtectedPackageFun() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java"); + doTest(fileName); + } + + @TestMetadata("ProtectedPackageProperty.java") + public void testProtectedPackageProperty() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/protectedStatic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedStatic extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInProtectedStatic() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/protectedStatic"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ConstructorInProtectedStaticNestedClass.java") + public void testConstructorInProtectedStaticNestedClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/rendering") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Rendering extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInRendering() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/rendering"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("Rendering.java") + public void testRendering() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/rendering/Rendering.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SignaturePropagation extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInSignaturePropagation() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signaturePropagation"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("ArraysInSubtypes.java") + public void testArraysInSubtypes() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java"); + doTest(fileName); + } + + @TestMetadata("MethodTypeParameterErased.java") + public void testMethodTypeParameterErased() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java"); + doTest(fileName); + } + + @TestMetadata("RawSuperType.java") + public void testRawSuperType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java"); + doTest(fileName); + } + + @TestMetadata("ReturnInnerSubclassOfSupersInner.java") + public void testReturnInnerSubclassOfSupersInner() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java"); + doTest(fileName); + } + + @TestMetadata("SubclassWithRawType.java") + public void testSubclassWithRawType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java"); + doTest(fileName); + } + + @TestMetadata("TwoSuperclassesInconsistentGenericTypes.java") + public void testTwoSuperclassesInconsistentGenericTypes() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java"); + doTest(fileName); + } + + @TestMetadata("TwoSuperclassesVarargAndNot.java") + public void testTwoSuperclassesVarargAndNot() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesVarargAndNot.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/static") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Static extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInStatic() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/static"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("DeeplyInnerClass.java") + public void testDeeplyInnerClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/DeeplyInnerClass.java"); + doTest(fileName); + } + + @TestMetadata("DeeplyNestedStatic.java") + public void testDeeplyNestedStatic() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/DeeplyNestedStatic.java"); + doTest(fileName); + } + + @TestMetadata("Enum.java") + public void testEnum() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/Enum.java"); + doTest(fileName); + } + + @TestMetadata("InnerClass.java") + public void testInnerClass() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/InnerClass.java"); + doTest(fileName); + } + + @TestMetadata("Simple.java") + public void testSimple() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/Simple.java"); + doTest(fileName); + } + + @TestMetadata("StaticFinal.java") + public void testStaticFinal() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticFinal.java"); + doTest(fileName); + } + + @TestMetadata("StaticMembersInEnum.java") + public void testStaticMembersInEnum() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.java"); + doTest(fileName); + } + } + + @TestMetadata("compiler/testData/loadJava/compiledJava/vararg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Vararg extends AbstractJvmRuntimeDescriptorLoaderTest { + public void testAllFilesPresentInVararg() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/vararg"), Pattern.compile("^(.+)\\.java$"), true); + } + + @TestMetadata("VarargInt.java") + public void testVarargInt() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/vararg/VarargInt.java"); + doTest(fileName); + } + + @TestMetadata("VarargString.java") + public void testVarargString() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/vararg/VarargString.java"); + doTest(fileName); + } } } } diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/reflect/ReflectJavaClassFinder.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/reflect/ReflectJavaClassFinder.kt index ffd387160c8..0762ac4c29e 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/reflect/ReflectJavaClassFinder.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/reflect/ReflectJavaClassFinder.kt @@ -26,7 +26,13 @@ import org.jetbrains.kotlin.name.ClassId public class ReflectJavaClassFinder(private val classLoader: ClassLoader) : JavaClassFinder { override fun findClass(classId: ClassId): JavaClass? { - val klass = classLoader.tryLoadClass(classId.asSingleFqName().asString()) + val packageFqName = classId.getPackageFqName() + val relativeClassName = classId.getRelativeClassName().asString().replace('.', '$') + val name = + if (packageFqName.isRoot()) relativeClassName + else packageFqName.asString() + "." + relativeClassName + + val klass = classLoader.tryLoadClass(name) return if (klass != null) ReflectJavaClass(klass) else null } diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaAnnotation.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaAnnotation.kt new file mode 100644 index 00000000000..0f080cc3d66 --- /dev/null +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaAnnotation.kt @@ -0,0 +1,40 @@ +/* + * Copyright 2010-2015 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.load.java.structure.reflect + +import org.jetbrains.kotlin.load.java.structure.JavaAnnotation +import org.jetbrains.kotlin.load.java.structure.JavaAnnotationArgument +import org.jetbrains.kotlin.name.Name +import java.lang.reflect.Method + +public class ReflectJavaAnnotation(private val annotation: Annotation) : ReflectJavaElement(), JavaAnnotation { + override fun findArgument(name: Name): JavaAnnotationArgument? { + return getArgumentValue(annotation.annotationType().getDeclaredMethod(name.asString())) + } + + override fun getArguments(): Collection { + return annotation.annotationType().getDeclaredMethods().map { getArgumentValue(it) } + } + + private fun getArgumentValue(argument: Method): ReflectJavaAnnotationArgument { + return argument.invoke(annotation).let { ReflectJavaAnnotationArgument.create(it, Name.identifier(argument.getName())) } + } + + override fun resolve() = ReflectJavaClass(annotation.annotationType()) + + override fun getClassId() = annotation.annotationType().classId +} diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaAnnotationArguments.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaAnnotationArguments.kt new file mode 100644 index 00000000000..3600ecde408 --- /dev/null +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaAnnotationArguments.kt @@ -0,0 +1,69 @@ +/* + * Copyright 2010-2015 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.load.java.structure.reflect + +import org.jetbrains.kotlin.load.java.structure.* +import org.jetbrains.kotlin.name.Name + +abstract class ReflectJavaAnnotationArgument( + override val name: Name? +) : JavaAnnotationArgument { + class object { + fun create(value: Any, name: Name?): ReflectJavaAnnotationArgument { + return when { + value.javaClass.isEnum() -> ReflectJavaEnumValueAnnotationArgument(name, value) + value is Annotation -> ReflectJavaAnnotationAsAnnotationArgument(name, value) + value is Array -> ReflectJavaArrayAnnotationArgument(name, value) + value is Class<*> -> ReflectJavaClassObjectAnnotationArgument(name, value) + else -> ReflectJavaLiteralAnnotationArgument(name, value) + } + } + } +} + +class ReflectJavaLiteralAnnotationArgument( + name: Name?, + override val value: Any +) : ReflectJavaAnnotationArgument(name), JavaLiteralAnnotationArgument + +class ReflectJavaArrayAnnotationArgument( + name: Name?, + private val values: Array +) : ReflectJavaAnnotationArgument(name), JavaArrayAnnotationArgument { + override fun getElements() = values.map { ReflectJavaAnnotationArgument.create(it, null) } +} + +class ReflectJavaEnumValueAnnotationArgument( + name: Name?, + private val value: Any +) : ReflectJavaAnnotationArgument(name), JavaEnumValueAnnotationArgument { + override fun resolve() = ReflectJavaField(value.javaClass.getDeclaredField(value.toString())) +} + +class ReflectJavaClassObjectAnnotationArgument( + name: Name?, + private val klass: Class<*> +) : ReflectJavaAnnotationArgument(name), JavaClassObjectAnnotationArgument { + override fun getReferencedType(): JavaType = ReflectJavaType.create(klass) +} + +class ReflectJavaAnnotationAsAnnotationArgument( + name: Name?, + private val annotation: Annotation +) : ReflectJavaAnnotationArgument(name), JavaAnnotationAsAnnotationArgument { + override fun getAnnotation(): JavaAnnotation = ReflectJavaAnnotation(annotation) +} diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaArrayType.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaArrayType.kt index 5005d9548bc..b950c361aa4 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaArrayType.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaArrayType.kt @@ -16,9 +16,9 @@ package org.jetbrains.kotlin.load.java.structure.reflect -import java.lang.reflect.GenericArrayType import org.jetbrains.kotlin.load.java.structure.JavaArrayType +import java.lang.reflect.Type -public class ReflectJavaArrayType(private val arrayType: GenericArrayType) : ReflectJavaType(), JavaArrayType { - override fun getComponentType() = ReflectJavaType.create(arrayType.getGenericComponentType()!!) +public class ReflectJavaArrayType(private val componentType: Type) : ReflectJavaType(), JavaArrayType { + override fun getComponentType() = ReflectJavaType.create(componentType) } diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaClass.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaClass.kt index f11fddeb5e6..63481553395 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaClass.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaClass.kt @@ -16,69 +16,88 @@ package org.jetbrains.kotlin.load.java.structure.reflect -import java.lang.reflect.Modifier import org.jetbrains.kotlin.load.java.structure.* import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.utils.emptyOrSingletonList +import java.lang.reflect.Method +import java.lang.reflect.Modifier +import java.util.Arrays public class ReflectJavaClass(private val klass: Class<*>) : ReflectJavaElement(), JavaClass { - override fun getInnerClasses() = - klass.getDeclaredClasses() - .filter { it.getSimpleName().isNotEmpty() } - .map { ReflectJavaClass(it) } + override fun getInnerClasses() = klass.getDeclaredClasses() + .stream() + .filterNot { + // getDeclaredClasses() returns anonymous classes sometimes, for example enums with specialized entries (which are in fact + // anonymous classes) or in case of a special anonymous class created for the synthetic accessor to a private nested class + // constructor accessed from the outer class + it.getSimpleName().isEmpty() + } + .map(::ReflectJavaClass) + .toList() - override fun getFqName(): FqName? { - // TODO: can there be primitive types, arrays? - return getOuterClass()?.getFqName()?.child(Name.identifier(klass.getSimpleName())) ?: FqName(klass.getName()) - } + override fun getFqName() = klass.fqName - override fun getOuterClass(): JavaClass? { - val container = klass.getDeclaringClass() - return if (container != null) ReflectJavaClass(container) else null - } + override fun getOuterClass() = klass.getDeclaringClass()?.let(::ReflectJavaClass) override fun getSupertypes(): Collection { - // TODO: also call getSuperclass() / getInterfaces() for classes without generic signature - val supertypes = emptyOrSingletonList(klass.getGenericSuperclass()) + klass.getGenericInterfaces() - return supertypes.map { supertype -> ReflectJavaType.create(supertype) as JavaClassifierType } + val supertype = klass.getGenericSuperclass() + val superClassName = (supertype as? Class<*>)?.getName() + val supertypes = + (if (superClassName == "java.lang.Object") emptyList() else emptyOrSingletonList(supertype)) + + klass.getGenericInterfaces() + return supertypes.map(::ReflectJavaClassifierType) } - override fun getMethods() = klass.getDeclaredMethods().map { method -> ReflectJavaMethod(method) } + override fun getMethods() = klass.getDeclaredMethods() + .stream() + .filter { method -> + when { + method.isSynthetic() -> false + isEnum() -> !isEnumValuesOrValueOf(method) + else -> true + } + } + .map(::ReflectJavaMethod) + .toList() - override fun getFields() = klass.getDeclaredFields().map { field -> ReflectJavaField(field) } - - override fun getConstructors(): Collection { - // TODO - return listOf() + private fun isEnumValuesOrValueOf(method: Method): Boolean { + return when (method.getName()) { + "values" -> method.getParameterTypes().isEmpty() + "valueOf" -> Arrays.equals(method.getParameterTypes(), array(javaClass())) + else -> false + } } - override fun getDefaultType() = ReflectJavaClassifierType(klass) + override fun getFields() = klass.getDeclaredFields() + .stream() + .filter { field -> !field.isSynthetic() } + .map(::ReflectJavaField) + .toList() - // TODO: drop OriginKind? + override fun getConstructors() = klass.getDeclaredConstructors().map(::ReflectJavaConstructor) + + override fun getDefaultType(): ReflectJavaClassifierType = throw UnsupportedOperationException() + + // TODO: drop OriginKind override fun getOriginKind() = JavaClass.OriginKind.COMPILED - override fun createImmediateType(substitutor: JavaTypeSubstitutor): JavaType { - // TODO - throw UnsupportedOperationException() - } + override fun createImmediateType(substitutor: JavaTypeSubstitutor): JavaType = throw UnsupportedOperationException() - override fun getName(): Name { - // TODO: can there be primitive types, arrays? - return Name.identifier(klass.getSimpleName()) - } + override fun getName(): Name = Name.identifier(klass.getSimpleName()) - override fun getAnnotations(): Collection { - // TODO - return listOf() - } + override fun getAnnotations() = klass.getDeclaredAnnotations().map { ReflectJavaAnnotation(it) } override fun findAnnotation(fqName: FqName): JavaAnnotation? { - // TODO + for (annotation in klass.getDeclaredAnnotations()) { + if (annotation.annotationType().fqName == fqName) { + return ReflectJavaAnnotation(annotation) + } + } return null } - override fun getTypeParameters() = klass.getTypeParameters().map { ReflectJavaTypeParameter(it!!) } + override fun getTypeParameters() = klass.getTypeParameters().map { ReflectJavaTypeParameter(it) } override fun isInterface() = klass.isInterface() override fun isAnnotationType() = klass.isAnnotation() diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaClassifierType.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaClassifierType.kt index a1694e15572..c8618d1e352 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaClassifierType.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaClassifierType.kt @@ -25,15 +25,18 @@ import java.lang.reflect.Type import java.lang.reflect.TypeVariable public class ReflectJavaClassifierType(val classifierType: Type) : ReflectJavaType(), JavaClassifierType { - override fun getClassifier(): JavaClassifier? { - return when (classifierType) { - is Class<*> -> ReflectJavaClass(classifierType) - is TypeVariable<*> -> ReflectJavaTypeParameter(classifierType) - is ParameterizedType -> ReflectJavaClass(classifierType.getRawType() as Class<*>) - else -> throw IllegalStateException("Not a classifier type (${classifierType.javaClass}): $classifierType") - } + private val classifier: JavaClassifier = run { + val type = classifierType + when (type) { + is Class<*> -> ReflectJavaClass(type) + is TypeVariable<*> -> ReflectJavaTypeParameter(type) + is ParameterizedType -> ReflectJavaClass(type.getRawType() as Class<*>) + else -> throw IllegalStateException("Not a classifier type (${type.javaClass}): $type") + } : JavaClassifier } + override fun getClassifier(): JavaClassifier = classifier + override fun getSubstitutor(): JavaTypeSubstitutor = throw UnsupportedOperationException() override fun getSupertypes(): Collection = throw UnsupportedOperationException() diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaConstructor.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaConstructor.kt new file mode 100644 index 00000000000..f603bb93017 --- /dev/null +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaConstructor.kt @@ -0,0 +1,63 @@ +/* + * Copyright 2010-2015 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.load.java.structure.reflect + +import org.jetbrains.kotlin.load.java.structure.JavaAnnotation +import org.jetbrains.kotlin.load.java.structure.JavaConstructor +import org.jetbrains.kotlin.load.java.structure.JavaTypeParameter +import org.jetbrains.kotlin.load.java.structure.JavaValueParameter +import org.jetbrains.kotlin.name.FqName +import java.lang.reflect.Constructor +import java.lang.reflect.Modifier +import java.util.Arrays + +public class ReflectJavaConstructor(constructor: Constructor<*>) : ReflectJavaMember(constructor), JavaConstructor { + private val constructor: Constructor<*> + get() = member as Constructor<*> + + override fun getAnnotations(): Collection { + // TODO + return listOf() + } + + override fun findAnnotation(fqName: FqName): JavaAnnotation? { + // TODO + return null + } + + override fun getValueParameters(): List = + getValueParameters( + dropSynthetic(constructor.getGenericParameterTypes()), + dropSynthetic(constructor.getParameterAnnotations()), + constructor.isVarArgs() + ) + + // Constructors of inner classes have one additional synthetic parameter + // TODO: test this code with annotations on constructor parameters of enums and inner classes + private inline fun dropSynthetic(array: Array): Array { + val klass = constructor.getDeclaringClass() + return if (klass.getDeclaringClass() != null && !Modifier.isStatic(klass.getModifiers())) { + Arrays.copyOfRange(array, 1, array.size()) + } + else array + } + + override fun getTypeParameters(): List { + // TODO + return listOf() + } +} diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaField.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaField.kt index 84c9a220b98..a03fa3bd8b4 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaField.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaField.kt @@ -20,7 +20,6 @@ import java.lang.reflect.Field import org.jetbrains.kotlin.load.java.structure.JavaField import org.jetbrains.kotlin.load.java.structure.JavaAnnotation import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.load.java.structure.JavaType public class ReflectJavaField(field: Field) : ReflectJavaMember(field), JavaField { val field: Field @@ -38,8 +37,5 @@ public class ReflectJavaField(field: Field) : ReflectJavaMember(field), JavaFiel override fun isEnumEntry() = field.isEnumConstant() - override fun getType(): JavaType { - // TODO - throw UnsupportedOperationException() - } + override fun getType() = ReflectJavaType.create(field.getGenericType()!!) } diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaMember.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaMember.kt index df985582a59..bfac1f6b8c4 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaMember.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaMember.kt @@ -16,11 +16,14 @@ package org.jetbrains.kotlin.load.java.structure.reflect -import java.lang.reflect.Member -import java.lang.reflect.Modifier import org.jetbrains.kotlin.load.java.structure.JavaMember +import org.jetbrains.kotlin.load.java.structure.JavaValueParameter import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.SpecialNames +import java.lang.reflect.Member +import java.lang.reflect.Modifier +import java.lang.reflect.Type +import java.util.ArrayList public abstract class ReflectJavaMember(protected val member: Member) : ReflectJavaElement(), JavaMember { override fun getName() = member.getName()?.let { Name.identifier(it) } ?: SpecialNames.NO_NAME_PROVIDED @@ -32,4 +35,17 @@ public abstract class ReflectJavaMember(protected val member: Member) : ReflectJ override fun isFinal() = Modifier.isFinal(member.getModifiers()) override fun getVisibility() = calculateVisibility(member.getModifiers()) + + protected fun getValueParameters( + parameterTypes: Array, + parameterAnnotations: Array>, + isVararg: Boolean + ): List { + val result = ArrayList(parameterTypes.size()) + for (i in parameterTypes.indices) { + val isParamVararg = isVararg && i == parameterTypes.lastIndex + result.add(ReflectJavaValueParameter(ReflectJavaType.create(parameterTypes[i]), parameterAnnotations[i], isParamVararg)) + } + return result + } } diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaMethod.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaMethod.kt index f574916dff2..68891b0e4ca 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaMethod.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaMethod.kt @@ -16,13 +16,12 @@ package org.jetbrains.kotlin.load.java.structure.reflect -import java.lang.reflect.Method -import java.util.ArrayList -import org.jetbrains.kotlin.load.java.structure.JavaMethod import org.jetbrains.kotlin.load.java.structure.JavaAnnotation -import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.load.java.structure.JavaValueParameter +import org.jetbrains.kotlin.load.java.structure.JavaMethod import org.jetbrains.kotlin.load.java.structure.JavaType +import org.jetbrains.kotlin.load.java.structure.JavaValueParameter +import org.jetbrains.kotlin.name.FqName +import java.lang.reflect.Method public class ReflectJavaMethod(method: Method) : ReflectJavaMember(method), JavaMethod { private val method: Method @@ -38,17 +37,8 @@ public class ReflectJavaMethod(method: Method) : ReflectJavaMember(method), Java return null } - override fun getValueParameters(): List { - val types = method.getGenericParameterTypes()!! - val annotations = method.getParameterAnnotations() - val result = ArrayList() - val methodIsVararg = method.isVarArgs() - for (i in types.indices) { - val isVararg = methodIsVararg && i == types.lastIndex - result.add(ReflectJavaValueParameter(ReflectJavaType.create(types[i]), annotations[i], isVararg)) - } - return result - } + override fun getValueParameters(): List = + getValueParameters(method.getGenericParameterTypes(), method.getParameterAnnotations(), method.isVarArgs()) override fun getReturnType(): JavaType? { // TODO diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaType.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaType.kt index 303ff554100..db0cf58d1c7 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaType.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaType.kt @@ -33,8 +33,12 @@ public abstract class ReflectJavaType : JavaType { fun create(reflectType: Type): ReflectJavaType { return when (reflectType) { in PRIMITIVE_TYPES -> ReflectJavaPrimitiveType(reflectType as Class<*>) - is Class<*>, is TypeVariable<*>, is ParameterizedType -> ReflectJavaClassifierType(reflectType) - is GenericArrayType -> ReflectJavaArrayType(reflectType) + is GenericArrayType -> ReflectJavaArrayType(reflectType.getGenericComponentType()!!) + is Class<*> -> { + if (reflectType.isArray()) ReflectJavaArrayType(reflectType.getComponentType()!!) + else ReflectJavaClassifierType(reflectType) + } + is TypeVariable<*>, is ParameterizedType -> ReflectJavaClassifierType(reflectType) is WildcardType -> ReflectJavaWildcardType(reflectType) else -> throw UnsupportedOperationException("Unsupported type (${reflectType.javaClass}): $reflectType") } diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaTypeParameter.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaTypeParameter.kt index 5de27e60db2..03a8b33bd6e 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaTypeParameter.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/ReflectJavaTypeParameter.kt @@ -20,6 +20,7 @@ import org.jetbrains.kotlin.load.java.structure.JavaType import org.jetbrains.kotlin.load.java.structure.JavaTypeParameter import org.jetbrains.kotlin.load.java.structure.JavaTypeParameterListOwner import org.jetbrains.kotlin.name.Name +import java.lang.reflect.Constructor import java.lang.reflect.Method import java.lang.reflect.TypeVariable @@ -35,8 +36,9 @@ public class ReflectJavaTypeParameter( override fun getOwner(): JavaTypeParameterListOwner? { val owner = typeVariable.getGenericDeclaration() return when (owner) { - is Method -> ReflectJavaMethod(owner) is Class<*> -> ReflectJavaClass(owner) + is Method -> ReflectJavaMethod(owner) + is Constructor<*> -> ReflectJavaConstructor(owner) else -> throw UnsupportedOperationException("Unsupported type parameter list owner (${owner.javaClass}): $owner") } } diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/reflectStructureUtil.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/reflectStructureUtil.kt index d2e7524bc58..2a33983d2b2 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/reflectStructureUtil.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/java/structure/reflect/reflectStructureUtil.kt @@ -16,13 +16,13 @@ package org.jetbrains.kotlin.load.java.structure.reflect -import java.lang.reflect.Modifier -import org.jetbrains.kotlin.descriptors.Visibility import org.jetbrains.kotlin.descriptors.Visibilities +import org.jetbrains.kotlin.descriptors.Visibility import org.jetbrains.kotlin.load.java.JavaVisibilities import org.jetbrains.kotlin.name.ClassId -import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.FqName +import org.jetbrains.kotlin.name.Name +import java.lang.reflect.Modifier private fun calculateVisibility(modifiers: Int): Visibility { return when { @@ -34,5 +34,8 @@ private fun calculateVisibility(modifiers: Int): Visibility { } } -val Class<*>.classId: ClassId +public val Class<*>.fqName: FqName + get() = classId.asSingleFqName().toSafe() + +public val Class<*>.classId: ClassId get() = getDeclaringClass()?.classId?.createNestedClassId(Name.identifier(getSimpleName())) ?: ClassId.topLevel(FqName(getName())) diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index a50ae06da3d..00960d82f40 100644 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -221,6 +221,7 @@ fun main(args: Array) { testClass(javaClass()) { model("loadJava/compiledKotlin") + model("loadJava/compiledJava", extension = "java", excludeDirs = listOf("sam", "kotlinSignature/propagation")) } testClass(javaClass()) {