From 238340a14379d0b156465662fa1d0a56ac7a9d3c Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Fri, 16 Sep 2016 02:00:31 +0300 Subject: [PATCH] Kapt: Simplify wrapper tests (cherry picked from commit 1677984) --- .../kotlin/generators/tests/GenerateTests.kt | 11 +- .../testData/javaWrappers/common.kt | 1 - .../javaWrappers/EnumClass.kt} | 12 +- .../javaWrappers}/EnumClass.txt | 0 .../javaWrappers/MetaAnnotation.kt} | 8 +- .../javaWrappers}/MetaAnnotation.txt | 0 .../javaWrappers/Simple.kt} | 8 +- .../javaWrappers}/Simple.txt | 0 .../javaWrappers/WithNested.kt} | 8 +- .../javaWrappers}/WithNested.txt | 0 .../kotlinWrappers/annotations.kt | 16 ++- .../kotlinWrappers/annotations.txt | 0 .../{ => wrappers}/kotlinWrappers/enum.kt | 2 +- .../{ => wrappers}/kotlinWrappers/enum.txt | 0 .../kotlinWrappers/kotlinAnnotations.kt | 2 +- .../kotlinWrappers/kotlinAnnotations.txt | 0 .../kotlinWrappers/metaAnnotations.kt | 4 +- .../kotlinWrappers/metaAnnotations.txt | 2 +- .../kotlinWrappers/nestedClasses.kt | 2 +- .../kotlinWrappers/nestedClasses.txt | 0 .../kotlinWrappers/repeatableAnnotations.kt | 3 +- .../kotlinWrappers/repeatableAnnotations.txt | 0 .../{ => wrappers}/kotlinWrappers/simple.kt | 4 +- .../{ => wrappers}/kotlinWrappers/simple.txt | 0 .../AbstractAnnotationProcessingTest.kt | 56 ++++++++ .../AbstractJavaAnnotationProcessingTest.java | 89 ------------- ...bstractKotlinAnnotationProcessingTest.java | 90 ------------- .../AbstractKotlinModelWrappersTest.kt | 39 ------ .../AnnotationProcessingTestGenerated.java | 121 ++++++++++++++++++ .../JavaModelWrappersTestGenerated.java | 62 --------- .../KotlinModelWrappersTestGenerated.java | 79 ------------ 31 files changed, 225 insertions(+), 394 deletions(-) delete mode 100644 plugins/annotation-processing/testData/javaWrappers/common.kt rename plugins/annotation-processing/testData/{javaWrappers/EnumClass/EnumClass.java => wrappers/javaWrappers/EnumClass.kt} (68%) rename plugins/annotation-processing/testData/{javaWrappers/EnumClass => wrappers/javaWrappers}/EnumClass.txt (100%) rename plugins/annotation-processing/testData/{javaWrappers/MetaAnnotation/MetaAnnotation.java => wrappers/javaWrappers/MetaAnnotation.kt} (77%) rename plugins/annotation-processing/testData/{javaWrappers/MetaAnnotation => wrappers/javaWrappers}/MetaAnnotation.txt (100%) rename plugins/annotation-processing/testData/{javaWrappers/Simple/Simple.java => wrappers/javaWrappers/Simple.kt} (80%) rename plugins/annotation-processing/testData/{javaWrappers/Simple => wrappers/javaWrappers}/Simple.txt (100%) rename plugins/annotation-processing/testData/{javaWrappers/WithNested/WithNested.java => wrappers/javaWrappers/WithNested.kt} (80%) rename plugins/annotation-processing/testData/{javaWrappers/WithNested => wrappers/javaWrappers}/WithNested.txt (100%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/annotations.kt (64%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/annotations.txt (100%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/enum.kt (89%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/enum.txt (100%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/kotlinAnnotations.kt (95%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/kotlinAnnotations.txt (100%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/metaAnnotations.kt (83%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/metaAnnotations.txt (90%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/nestedClasses.kt (96%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/nestedClasses.txt (100%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/repeatableAnnotations.kt (61%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/repeatableAnnotations.txt (100%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/simple.kt (67%) rename plugins/annotation-processing/testData/{ => wrappers}/kotlinWrappers/simple.txt (100%) create mode 100755 plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractAnnotationProcessingTest.kt delete mode 100755 plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractJavaAnnotationProcessingTest.java delete mode 100755 plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractKotlinAnnotationProcessingTest.java delete mode 100755 plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractKotlinModelWrappersTest.kt create mode 100644 plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AnnotationProcessingTestGenerated.java delete mode 100644 plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/JavaModelWrappersTestGenerated.java delete mode 100644 plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/KotlinModelWrappersTestGenerated.java diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index ebaa1848b84..2803e9a1c35 100755 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -24,8 +24,7 @@ import org.jetbrains.kotlin.android.* import org.jetbrains.kotlin.android.configure.AbstractConfigureProjectTest import org.jetbrains.kotlin.annotation.AbstractAnnotationProcessorBoxTest import org.jetbrains.kotlin.annotation.processing.test.sourceRetention.AbstractBytecodeListingTestForSourceRetention -import org.jetbrains.kotlin.annotation.processing.test.wrappers.AbstractJavaModelWrappersTest -import org.jetbrains.kotlin.annotation.processing.test.wrappers.AbstractKotlinModelWrappersTest +import org.jetbrains.kotlin.annotation.processing.test.wrappers.AbstractAnnotationProcessingTest import org.jetbrains.kotlin.asJava.AbstractCompilerLightClassTest import org.jetbrains.kotlin.cfg.AbstractControlFlowTest import org.jetbrains.kotlin.cfg.AbstractDataFlowTest @@ -1092,12 +1091,8 @@ fun main(args: Array) { } testGroup("plugins/plugins-tests/tests", "plugins/annotation-processing/testData") { - testClass() { - model("javaWrappers", extension = null) - } - - testClass() { - model("kotlinWrappers", extension = "kt") + testClass() { + model("wrappers", recursive = true, extension = "kt") } testClass() { diff --git a/plugins/annotation-processing/testData/javaWrappers/common.kt b/plugins/annotation-processing/testData/javaWrappers/common.kt deleted file mode 100644 index 811fd455b8d..00000000000 --- a/plugins/annotation-processing/testData/javaWrappers/common.kt +++ /dev/null @@ -1 +0,0 @@ -annotation class KotlinAnnotation(val a: String, val b: Int) \ No newline at end of file diff --git a/plugins/annotation-processing/testData/javaWrappers/EnumClass/EnumClass.java b/plugins/annotation-processing/testData/wrappers/javaWrappers/EnumClass.kt similarity index 68% rename from plugins/annotation-processing/testData/javaWrappers/EnumClass/EnumClass.java rename to plugins/annotation-processing/testData/wrappers/javaWrappers/EnumClass.kt index e4c6008c13d..52c46914f47 100644 --- a/plugins/annotation-processing/testData/javaWrappers/EnumClass/EnumClass.java +++ b/plugins/annotation-processing/testData/wrappers/javaWrappers/EnumClass.kt @@ -1,13 +1,17 @@ -// EnumClass +// FQNAME: EnumClass +// FILE: EnumClass.java enum EnumClass { RED, GREEN, BLUE; - + void someMethod() { System.out.println("Hello, world!") } - + String getStringRepresentation() { return this.toString(); } -} \ No newline at end of file +} + +// FILE: Anno.kt +annotation class Anno \ No newline at end of file diff --git a/plugins/annotation-processing/testData/javaWrappers/EnumClass/EnumClass.txt b/plugins/annotation-processing/testData/wrappers/javaWrappers/EnumClass.txt similarity index 100% rename from plugins/annotation-processing/testData/javaWrappers/EnumClass/EnumClass.txt rename to plugins/annotation-processing/testData/wrappers/javaWrappers/EnumClass.txt diff --git a/plugins/annotation-processing/testData/javaWrappers/MetaAnnotation/MetaAnnotation.java b/plugins/annotation-processing/testData/wrappers/javaWrappers/MetaAnnotation.kt similarity index 77% rename from plugins/annotation-processing/testData/javaWrappers/MetaAnnotation/MetaAnnotation.java rename to plugins/annotation-processing/testData/wrappers/javaWrappers/MetaAnnotation.kt index a97b15eab44..b43f5e671b7 100644 --- a/plugins/annotation-processing/testData/javaWrappers/MetaAnnotation/MetaAnnotation.java +++ b/plugins/annotation-processing/testData/wrappers/javaWrappers/MetaAnnotation.kt @@ -1,5 +1,6 @@ -// MetaAnnotation +// FQNAME: MetaAnnotation +// FILE: MetaAnnotation.java import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -10,4 +11,7 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) public @interface MetaAnnotation { String strValue(); -} \ No newline at end of file +} + +// FILE: Anno.kt +annotation class Anno \ No newline at end of file diff --git a/plugins/annotation-processing/testData/javaWrappers/MetaAnnotation/MetaAnnotation.txt b/plugins/annotation-processing/testData/wrappers/javaWrappers/MetaAnnotation.txt similarity index 100% rename from plugins/annotation-processing/testData/javaWrappers/MetaAnnotation/MetaAnnotation.txt rename to plugins/annotation-processing/testData/wrappers/javaWrappers/MetaAnnotation.txt diff --git a/plugins/annotation-processing/testData/javaWrappers/Simple/Simple.java b/plugins/annotation-processing/testData/wrappers/javaWrappers/Simple.kt similarity index 80% rename from plugins/annotation-processing/testData/javaWrappers/Simple/Simple.java rename to plugins/annotation-processing/testData/wrappers/javaWrappers/Simple.kt index d6df663848c..60b6c437cf3 100644 --- a/plugins/annotation-processing/testData/javaWrappers/Simple/Simple.java +++ b/plugins/annotation-processing/testData/wrappers/javaWrappers/Simple.kt @@ -1,5 +1,6 @@ -// Simple +// FQNAME: Simple +// FILE: Simple.java @interface Anno { String[] numbers(); } @@ -29,4 +30,7 @@ public abstract class Simple { protected String strMethod(int param) { return "A"; } -} \ No newline at end of file +} + +// FILE: KotlinAnnotation.kt +annotation class KotlinAnnotation(val a: String, val b: Int) \ No newline at end of file diff --git a/plugins/annotation-processing/testData/javaWrappers/Simple/Simple.txt b/plugins/annotation-processing/testData/wrappers/javaWrappers/Simple.txt similarity index 100% rename from plugins/annotation-processing/testData/javaWrappers/Simple/Simple.txt rename to plugins/annotation-processing/testData/wrappers/javaWrappers/Simple.txt diff --git a/plugins/annotation-processing/testData/javaWrappers/WithNested/WithNested.java b/plugins/annotation-processing/testData/wrappers/javaWrappers/WithNested.kt similarity index 80% rename from plugins/annotation-processing/testData/javaWrappers/WithNested/WithNested.java rename to plugins/annotation-processing/testData/wrappers/javaWrappers/WithNested.kt index 52089063e52..37a65e82256 100644 --- a/plugins/annotation-processing/testData/javaWrappers/WithNested/WithNested.java +++ b/plugins/annotation-processing/testData/wrappers/javaWrappers/WithNested.kt @@ -1,5 +1,6 @@ -// WithNested +// FQNAME: WithNested +// FILE: WithNested.java class WithNested { void myClassFun() {} @@ -18,4 +19,7 @@ class WithNested { interface NestedInterface { void nestedInterfaceFun() {} } -} \ No newline at end of file +} + +// FILE: Anno.kt +annotation class Anno \ No newline at end of file diff --git a/plugins/annotation-processing/testData/javaWrappers/WithNested/WithNested.txt b/plugins/annotation-processing/testData/wrappers/javaWrappers/WithNested.txt similarity index 100% rename from plugins/annotation-processing/testData/javaWrappers/WithNested/WithNested.txt rename to plugins/annotation-processing/testData/wrappers/javaWrappers/WithNested.txt diff --git a/plugins/annotation-processing/testData/kotlinWrappers/annotations.kt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/annotations.kt similarity index 64% rename from plugins/annotation-processing/testData/kotlinWrappers/annotations.kt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/annotations.kt index bfa54ceee0a..720ad0e66d6 100644 --- a/plugins/annotation-processing/testData/kotlinWrappers/annotations.kt +++ b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/annotations.kt @@ -1,21 +1,23 @@ -// test.Main +// FQNAME: test.Main package test +import kotlin.reflect.KClass + @MainAnno("A", 5) class Main { @field:XAnno(color = Color.GREEN) - val x: String + val x: String = "" @get:YAnno(arrayOf("Mary", "Tom"), intArrayOf(1, 3, 5), arrayOf(Color.GREEN, Color.RED)) - val y: String + val y: String = "" @set:ZAnno(String::class, arrayOf(String::class, Long::class, Main::class)) - var z: String + var z: String = "" // Property annotations are lost here (we don't create Elements (javac API) for the synthetic propertyName$annotations() methods) @MainAnno("B", 6) - val zz: String + val zz: String = "" } enum class Color { @@ -26,6 +28,6 @@ annotation class MainAnno(val a: String, val b: Int) annotation class XAnno(val color: Color) -annotation class YAnno(val names: Array, val ints: Array, val colors: Array) +annotation class YAnno(val names: Array, val ints: IntArray, val colors: Array) -annotation class ZAnno(val clazz: Class<*>, val classes = Array>) \ No newline at end of file +annotation class ZAnno(val clazz: KClass<*>, val classes: Array>) \ No newline at end of file diff --git a/plugins/annotation-processing/testData/kotlinWrappers/annotations.txt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/annotations.txt similarity index 100% rename from plugins/annotation-processing/testData/kotlinWrappers/annotations.txt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/annotations.txt diff --git a/plugins/annotation-processing/testData/kotlinWrappers/enum.kt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/enum.kt similarity index 89% rename from plugins/annotation-processing/testData/kotlinWrappers/enum.kt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/enum.kt index a9bfad046ed..8cd46537f5d 100644 --- a/plugins/annotation-processing/testData/kotlinWrappers/enum.kt +++ b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/enum.kt @@ -1,4 +1,4 @@ -// EnumClass +// FQNAME: EnumClass enum class EnumClass { RED, GREEN, BLUE; diff --git a/plugins/annotation-processing/testData/kotlinWrappers/enum.txt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/enum.txt similarity index 100% rename from plugins/annotation-processing/testData/kotlinWrappers/enum.txt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/enum.txt diff --git a/plugins/annotation-processing/testData/kotlinWrappers/kotlinAnnotations.kt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/kotlinAnnotations.kt similarity index 95% rename from plugins/annotation-processing/testData/kotlinWrappers/kotlinAnnotations.kt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/kotlinAnnotations.kt index 9377d1948f7..4dede841b0b 100644 --- a/plugins/annotation-processing/testData/kotlinWrappers/kotlinAnnotations.kt +++ b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/kotlinAnnotations.kt @@ -1,4 +1,4 @@ -// Test +// FQNAME: Test class Test { @kotlin.jvm.Transient diff --git a/plugins/annotation-processing/testData/kotlinWrappers/kotlinAnnotations.txt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/kotlinAnnotations.txt similarity index 100% rename from plugins/annotation-processing/testData/kotlinWrappers/kotlinAnnotations.txt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/kotlinAnnotations.txt diff --git a/plugins/annotation-processing/testData/kotlinWrappers/metaAnnotations.kt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/metaAnnotations.kt similarity index 83% rename from plugins/annotation-processing/testData/kotlinWrappers/metaAnnotations.kt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/metaAnnotations.kt index 67dd760f843..fa5e50b9546 100644 --- a/plugins/annotation-processing/testData/kotlinWrappers/metaAnnotations.kt +++ b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/metaAnnotations.kt @@ -1,7 +1,7 @@ -// Anno +// FQNAME: Anno @Repeatable -@Deprecated +@Deprecated("") @Retention(AnnotationRetention.RUNTIME) @Target(AnnotationTarget.CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.EXPRESSION) annotation class Anno \ No newline at end of file diff --git a/plugins/annotation-processing/testData/kotlinWrappers/metaAnnotations.txt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/metaAnnotations.txt similarity index 90% rename from plugins/annotation-processing/testData/kotlinWrappers/metaAnnotations.txt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/metaAnnotations.txt index cdf362487e2..16b7578067a 100644 --- a/plugins/annotation-processing/testData/kotlinWrappers/metaAnnotations.txt +++ b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/metaAnnotations.txt @@ -1,5 +1,5 @@ @kotlin.annotation.Repeatable -@kotlin.Deprecated +@kotlin.Deprecated(message = "") @kotlin.annotation.Retention(value = RUNTIME) @kotlin.annotation.Target(allowedTargets = { CLASS, CONSTRUCTOR, EXPRESSION }) @java.lang.annotation.Retention(value = RUNTIME) diff --git a/plugins/annotation-processing/testData/kotlinWrappers/nestedClasses.kt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/nestedClasses.kt similarity index 96% rename from plugins/annotation-processing/testData/kotlinWrappers/nestedClasses.kt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/nestedClasses.kt index 80bca69fc9d..2bc666def8b 100644 --- a/plugins/annotation-processing/testData/kotlinWrappers/nestedClasses.kt +++ b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/nestedClasses.kt @@ -1,4 +1,4 @@ -// MyClass +// FQNAME: MyClass class MyClass { companion object { diff --git a/plugins/annotation-processing/testData/kotlinWrappers/nestedClasses.txt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/nestedClasses.txt similarity index 100% rename from plugins/annotation-processing/testData/kotlinWrappers/nestedClasses.txt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/nestedClasses.txt diff --git a/plugins/annotation-processing/testData/kotlinWrappers/repeatableAnnotations.kt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/repeatableAnnotations.kt similarity index 61% rename from plugins/annotation-processing/testData/kotlinWrappers/repeatableAnnotations.kt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/repeatableAnnotations.kt index 0fa9291edb5..352f56f8939 100644 --- a/plugins/annotation-processing/testData/kotlinWrappers/repeatableAnnotations.kt +++ b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/repeatableAnnotations.kt @@ -1,5 +1,6 @@ -// MyClass +// FQNAME: MyClass +@Retention(AnnotationRetention.SOURCE) @Repeatable annotation class Anno(val name: String) diff --git a/plugins/annotation-processing/testData/kotlinWrappers/repeatableAnnotations.txt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/repeatableAnnotations.txt similarity index 100% rename from plugins/annotation-processing/testData/kotlinWrappers/repeatableAnnotations.txt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/repeatableAnnotations.txt diff --git a/plugins/annotation-processing/testData/kotlinWrappers/simple.kt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/simple.kt similarity index 67% rename from plugins/annotation-processing/testData/kotlinWrappers/simple.kt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/simple.kt index 959cbb2ccde..18c72fd47d4 100644 --- a/plugins/annotation-processing/testData/kotlinWrappers/simple.kt +++ b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/simple.kt @@ -1,10 +1,10 @@ -// test.Simple +// FQNAME: test.Simple package test abstract class Simple(private val prop: String) { protected val anotherProp: Int = 5 - abstract fun strFun(val x: Long): String + abstract fun strFun(x: Long): String fun voidFun() {} } \ No newline at end of file diff --git a/plugins/annotation-processing/testData/kotlinWrappers/simple.txt b/plugins/annotation-processing/testData/wrappers/kotlinWrappers/simple.txt similarity index 100% rename from plugins/annotation-processing/testData/kotlinWrappers/simple.txt rename to plugins/annotation-processing/testData/wrappers/kotlinWrappers/simple.txt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractAnnotationProcessingTest.kt b/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractAnnotationProcessingTest.kt new file mode 100755 index 00000000000..5128c03a989 --- /dev/null +++ b/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractAnnotationProcessingTest.kt @@ -0,0 +1,56 @@ +/* + * Copyright 2010-2016 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.annotation.processing.test.wrappers + +import com.intellij.openapi.util.io.FileUtil +import com.intellij.psi.JavaPsiFacade +import com.intellij.psi.search.GlobalSearchScope +import org.jetbrains.kotlin.codegen.AbstractBytecodeTextTest +import org.jetbrains.kotlin.codegen.CodegenTestCase +import org.jetbrains.kotlin.codegen.CodegenTestUtil +import org.jetbrains.kotlin.java.model.elements.DefaultJeElementRenderer +import org.jetbrains.kotlin.java.model.toJeElement +import org.jetbrains.kotlin.test.ConfigurationKind +import org.jetbrains.kotlin.test.KotlinTestUtils + +import java.io.File +import java.util.regex.Pattern + +abstract class AbstractAnnotationProcessingTest : AbstractBytecodeTextTest() { + companion object { + private val SUBJECT_FQ_NAME_PATTERN = Pattern.compile("^// FQNAME: \\s*(.*)$", Pattern.MULTILINE) + private val RENDERER = DefaultJeElementRenderer() + } + + override fun doMultiFileTest(wholeFile: File, files: List, javaFilesDir: File?) { + createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.ALL, files, javaFilesDir) + loadMultiFiles(files) + + val text = FileUtil.loadFile(wholeFile, true) + val matcher = SUBJECT_FQ_NAME_PATTERN.matcher(text) + assertTrue("No FqName specified. First line of the form '// f.q.Name' expected", matcher.find()) + val fqName = matcher.group(1) + + CodegenTestUtil.generateFiles(myEnvironment, myFiles) + val project = myEnvironment.project + val psiClass = JavaPsiFacade.getInstance(project).findClass(fqName, GlobalSearchScope.projectScope(project))!! + + val modelFile = File(wholeFile.parent, wholeFile.nameWithoutExtension + ".txt") + val jeElement = psiClass.toJeElement() ?: error("JeElement is null") + KotlinTestUtils.assertEqualsToFile(modelFile, RENDERER.render(jeElement)) + } +} \ No newline at end of file diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractJavaAnnotationProcessingTest.java b/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractJavaAnnotationProcessingTest.java deleted file mode 100755 index ed58a9049a8..00000000000 --- a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractJavaAnnotationProcessingTest.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2010-2016 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.annotation.processing.test.wrappers; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.io.FileUtil; -import com.intellij.psi.JavaPsiFacade; -import com.intellij.psi.PsiClass; -import com.intellij.psi.search.GlobalSearchScope; -import junit.framework.TestCase; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.kotlin.checkers.KotlinMultiFileTestWithJava; -import org.jetbrains.kotlin.cli.jvm.config.JavaSourceRoot; -import org.jetbrains.kotlin.test.ConfigurationKind; -import org.jetbrains.kotlin.test.KotlinTestUtils; - -import java.io.File; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public abstract class AbstractJavaAnnotationProcessingTest extends KotlinMultiFileTestWithJava { - private final static Pattern SUBJECT_FQ_NAME_PATTERN = Pattern.compile("^//\\s*(.*)$", Pattern.MULTILINE); - - @NotNull - @Override - protected ConfigurationKind getConfigurationKind() { - return ConfigurationKind.ALL; - } - - @Override - protected boolean isKotlinSourceRootNeeded() { - return true; - } - - @Override - protected void doTest(String testDirPath) throws Exception { - File testDir = new File(testDirPath); - File javaFile = new File(testDirPath, testDir.getName() + ".java"); - - String text = FileUtil.loadFile(javaFile, true); - Matcher matcher = SUBJECT_FQ_NAME_PATTERN.matcher(text); - TestCase.assertTrue("No FqName specified. First line of the form '// f.q.Name' expected", matcher.find()); - String fqName = matcher.group(1); - - getEnvironment().tryUpdateClasspath(Collections.singletonList(testDir)); - - super.doTest(new File(testDir.getParentFile(), "common.kt").getCanonicalPath()); - - KotlinTestUtils.resolveAllKotlinFiles(getEnvironment()); - Project project = getEnvironment().getProject(); - - PsiClass javaClass = JavaPsiFacade.getInstance(project).findClass(fqName, GlobalSearchScope.allScope(project)); - TestCase.assertNotNull("Class $fqName was not found.", javaClass != null); - doTest(javaFile, javaClass); - } - - @Override - protected void doMultiFileTest(File testDataFile, Map modules, List files) throws IOException {} - - protected abstract void doTest(File testDataFile, PsiClass lightClass); - - @Override - protected Void createTestModule(@NotNull String name) { - return null; - } - - @Override - protected Void createTestFile(Void module, String fileName, String text, Map directives) { - return null; - } -} \ No newline at end of file diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractKotlinAnnotationProcessingTest.java b/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractKotlinAnnotationProcessingTest.java deleted file mode 100755 index b6ee77771d7..00000000000 --- a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractKotlinAnnotationProcessingTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2010-2016 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.annotation.processing.test.wrappers; - -import com.intellij.openapi.util.io.FileUtil; -import com.intellij.psi.PsiClass; -import com.intellij.psi.search.GlobalSearchScope; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.kotlin.asJava.finder.JavaElementFinder; -import org.jetbrains.kotlin.checkers.KotlinMultiFileTestWithJava; -import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment; -import org.jetbrains.kotlin.test.ConfigurationKind; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.utils.ExceptionUtilsKt; - -import java.io.File; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public abstract class AbstractKotlinAnnotationProcessingTest extends KotlinMultiFileTestWithJava { - private final static Pattern SUBJECT_FQ_NAME_PATTERN = Pattern.compile("^//\\s*(.*)$", Pattern.MULTILINE); - - @NotNull - @Override - protected ConfigurationKind getConfigurationKind() { - return ConfigurationKind.ALL; - } - - @Override - protected boolean isKotlinSourceRootNeeded() { - return true; - } - - @Override - protected void doMultiFileTest(File testDataFile, Map modules, List files) throws IOException { - String text = FileUtil.loadFile(testDataFile, true); - Matcher matcher = SUBJECT_FQ_NAME_PATTERN.matcher(text); - assertTrue("No FqName specified. First line of the form '// f.q.Name' expected", matcher.find()); - String fqName = matcher.group(1); - - PsiClass lightClass = findLightClass(fqName); - doTest(testDataFile, lightClass); - } - - protected abstract void doTest(File testDataFile, PsiClass lightClass); - - private PsiClass findLightClass(String fqName) { - try { - return createFinder(getEnvironment()).findClass(fqName, GlobalSearchScope.allScope(getEnvironment().getProject())); - } - catch (IOException e) { - throw ExceptionUtilsKt.rethrow(e); - } - } - - @Override - protected Void createTestModule(@NotNull String name) { - return null; - } - - @Override - protected Void createTestFile(Void module, String fileName, String text, Map directives) { - return null; - } - - @NotNull - private static JavaElementFinder createFinder(@NotNull KotlinCoreEnvironment environment) throws IOException { - // We need to resolve all the files in order too fill in the trace that sits inside LightClassGenerationSupport - KotlinTestUtils.resolveAllKotlinFiles(environment); - - return JavaElementFinder.getInstance(environment.getProject()); - } -} diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractKotlinModelWrappersTest.kt b/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractKotlinModelWrappersTest.kt deleted file mode 100755 index facffd53854..00000000000 --- a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AbstractKotlinModelWrappersTest.kt +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2010-2016 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.annotation.processing.test.wrappers - -import com.intellij.psi.PsiClass -import org.jetbrains.kotlin.java.model.elements.DefaultJeElementRenderer -import org.jetbrains.kotlin.java.model.toJeElement -import org.jetbrains.kotlin.test.KotlinTestUtils -import java.io.File - -private val RENDERER = DefaultJeElementRenderer() - -private fun runTest(testDataFile: File, lightClass: PsiClass) { - val modelFile = File(testDataFile.parent, testDataFile.nameWithoutExtension + ".txt") - val jeElement = lightClass.toJeElement() ?: error("JeElement is null") - KotlinTestUtils.assertEqualsToFile(modelFile, RENDERER.render(jeElement)) -} - -abstract class AbstractKotlinModelWrappersTest : AbstractKotlinAnnotationProcessingTest() { - override fun doTest(testDataFile: File, lightClass: PsiClass) = runTest(testDataFile, lightClass) -} - -abstract class AbstractJavaModelWrappersTest : AbstractJavaAnnotationProcessingTest() { - override fun doTest(testDataFile: File, lightClass: PsiClass) = runTest(testDataFile, lightClass) -} \ No newline at end of file diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AnnotationProcessingTestGenerated.java b/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AnnotationProcessingTestGenerated.java new file mode 100644 index 00000000000..d1d9b396321 --- /dev/null +++ b/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/AnnotationProcessingTestGenerated.java @@ -0,0 +1,121 @@ +/* + * Copyright 2010-2016 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.annotation.processing.test.wrappers; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; +import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.runner.RunWith; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("plugins/annotation-processing/testData/wrappers") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class AnnotationProcessingTestGenerated extends AbstractAnnotationProcessingTest { + public void testAllFilesPresentInWrappers() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/annotation-processing/testData/wrappers"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("plugins/annotation-processing/testData/wrappers/javaWrappers") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaWrappers extends AbstractAnnotationProcessingTest { + public void testAllFilesPresentInJavaWrappers() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/annotation-processing/testData/wrappers/javaWrappers"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("EnumClass.kt") + public void testEnumClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/wrappers/javaWrappers/EnumClass.kt"); + doTest(fileName); + } + + @TestMetadata("MetaAnnotation.kt") + public void testMetaAnnotation() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/wrappers/javaWrappers/MetaAnnotation.kt"); + doTest(fileName); + } + + @TestMetadata("Simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/wrappers/javaWrappers/Simple.kt"); + doTest(fileName); + } + + @TestMetadata("WithNested.kt") + public void testWithNested() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/wrappers/javaWrappers/WithNested.kt"); + doTest(fileName); + } + } + + @TestMetadata("plugins/annotation-processing/testData/wrappers/kotlinWrappers") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KotlinWrappers extends AbstractAnnotationProcessingTest { + public void testAllFilesPresentInKotlinWrappers() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/annotation-processing/testData/wrappers/kotlinWrappers"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("annotations.kt") + public void testAnnotations() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/wrappers/kotlinWrappers/annotations.kt"); + doTest(fileName); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/wrappers/kotlinWrappers/enum.kt"); + doTest(fileName); + } + + @TestMetadata("kotlinAnnotations.kt") + public void testKotlinAnnotations() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/wrappers/kotlinWrappers/kotlinAnnotations.kt"); + doTest(fileName); + } + + @TestMetadata("metaAnnotations.kt") + public void testMetaAnnotations() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/wrappers/kotlinWrappers/metaAnnotations.kt"); + doTest(fileName); + } + + @TestMetadata("nestedClasses.kt") + public void testNestedClasses() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/wrappers/kotlinWrappers/nestedClasses.kt"); + doTest(fileName); + } + + @TestMetadata("repeatableAnnotations.kt") + public void testRepeatableAnnotations() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/wrappers/kotlinWrappers/repeatableAnnotations.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/wrappers/kotlinWrappers/simple.kt"); + doTest(fileName); + } + } +} diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/JavaModelWrappersTestGenerated.java b/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/JavaModelWrappersTestGenerated.java deleted file mode 100644 index bc2ce9790d0..00000000000 --- a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/JavaModelWrappersTestGenerated.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2010-2016 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.annotation.processing.test.wrappers; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("plugins/annotation-processing/testData/javaWrappers") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class JavaModelWrappersTestGenerated extends AbstractJavaModelWrappersTest { - public void testAllFilesPresentInJavaWrappers() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/annotation-processing/testData/javaWrappers"), Pattern.compile("^([^\\.]+)$"), true); - } - - @TestMetadata("EnumClass") - public void testEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/javaWrappers/EnumClass/"); - doTest(fileName); - } - - @TestMetadata("MetaAnnotation") - public void testMetaAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/javaWrappers/MetaAnnotation/"); - doTest(fileName); - } - - @TestMetadata("Simple") - public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/javaWrappers/Simple/"); - doTest(fileName); - } - - @TestMetadata("WithNested") - public void testWithNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/javaWrappers/WithNested/"); - doTest(fileName); - } - -} diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/KotlinModelWrappersTestGenerated.java b/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/KotlinModelWrappersTestGenerated.java deleted file mode 100644 index f8b8ae1bab2..00000000000 --- a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/wrappers/KotlinModelWrappersTestGenerated.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2010-2016 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.annotation.processing.test.wrappers; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("plugins/annotation-processing/testData/kotlinWrappers") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class KotlinModelWrappersTestGenerated extends AbstractKotlinModelWrappersTest { - public void testAllFilesPresentInKotlinWrappers() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/annotation-processing/testData/kotlinWrappers"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("annotations.kt") - public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/kotlinWrappers/annotations.kt"); - doTest(fileName); - } - - @TestMetadata("enum.kt") - public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/kotlinWrappers/enum.kt"); - doTest(fileName); - } - - @TestMetadata("kotlinAnnotations.kt") - public void testKotlinAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/kotlinWrappers/kotlinAnnotations.kt"); - doTest(fileName); - } - - @TestMetadata("metaAnnotations.kt") - public void testMetaAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/kotlinWrappers/metaAnnotations.kt"); - doTest(fileName); - } - - @TestMetadata("nestedClasses.kt") - public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/kotlinWrappers/nestedClasses.kt"); - doTest(fileName); - } - - @TestMetadata("repeatableAnnotations.kt") - public void testRepeatableAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/kotlinWrappers/repeatableAnnotations.kt"); - doTest(fileName); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-processing/testData/kotlinWrappers/simple.kt"); - doTest(fileName); - } -}