APT: Add more compiler plugin tests
This commit is contained in:
+29
-11
@@ -27,53 +27,71 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
@TestMetadata("plugins/annotation-collector/testData/codegen/collectToFile")
|
@TestMetadata("plugins/annotation-collector/testData/collectToFile")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public class AnnotationProcessorBoxTestGenerated extends AbstractAnnotationProcessorBoxTest {
|
public class AnnotationProcessorBoxTestGenerated extends AbstractAnnotationProcessorBoxTest {
|
||||||
public void testAllFilesPresentInCollectToFile() throws Exception {
|
public void testAllFilesPresentInCollectToFile() throws Exception {
|
||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/annotation-collector/testData/codegen/collectToFile"), Pattern.compile("^([^\\.]+)$"), false);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/annotation-collector/testData/collectToFile"), Pattern.compile("^([^\\.]+)$"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("annotatedGettersSetters")
|
||||||
|
public void testAnnotatedGettersSetters() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/annotatedGettersSetters/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("annotationInSameFile")
|
||||||
|
public void testAnnotationInSameFile() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/annotationInSameFile/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousClasses")
|
||||||
|
public void testAnonymousClasses() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/anonymousClasses/");
|
||||||
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("classAnnotations")
|
@TestMetadata("classAnnotations")
|
||||||
public void testClassAnnotations() throws Exception {
|
public void testClassAnnotations() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/codegen/collectToFile/classAnnotations/");
|
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/classAnnotations/");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultPackage")
|
@TestMetadata("defaultPackage")
|
||||||
public void testDefaultPackage() throws Exception {
|
public void testDefaultPackage() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/codegen/collectToFile/defaultPackage/");
|
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/defaultPackage/");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("fieldAnnotations")
|
@TestMetadata("fieldAnnotations")
|
||||||
public void testFieldAnnotations() throws Exception {
|
public void testFieldAnnotations() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/codegen/collectToFile/fieldAnnotations/");
|
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/fieldAnnotations/");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("localClasses")
|
@TestMetadata("localClasses")
|
||||||
public void testLocalClasses() throws Exception {
|
public void testLocalClasses() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/codegen/collectToFile/localClasses/");
|
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/localClasses/");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("methodAnnotations")
|
@TestMetadata("methodAnnotations")
|
||||||
public void testMethodAnnotations() throws Exception {
|
public void testMethodAnnotations() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/codegen/collectToFile/methodAnnotations/");
|
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/methodAnnotations/");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("nestedClasses")
|
@TestMetadata("nestedClasses")
|
||||||
public void testNestedClasses() throws Exception {
|
public void testNestedClasses() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/codegen/collectToFile/nestedClasses/");
|
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/nestedClasses/");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("simple")
|
@TestMetadata("platformStatic")
|
||||||
public void testSimple() throws Exception {
|
public void testPlatformStatic() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/codegen/collectToFile/simple/");
|
String fileName = JetTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/platformStatic/");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package org.test
|
||||||
|
|
||||||
|
import javax.inject.*
|
||||||
|
|
||||||
|
public class SomeClass {
|
||||||
|
|
||||||
|
public val immutableProperty: Int = 5
|
||||||
|
[Inject] get
|
||||||
|
|
||||||
|
public var mutableProperty: String = "String"
|
||||||
|
[Inject] get
|
||||||
|
[Inject] set
|
||||||
|
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
a javax.inject.Inject 0
|
||||||
|
p org.test 0
|
||||||
|
m 0 0/SomeClass getImmutableProperty
|
||||||
|
a org.jetbrains.annotations.NotNull 1
|
||||||
|
f 1 0/SomeClass mutableProperty
|
||||||
|
m 0 0/SomeClass getMutableProperty
|
||||||
|
m 1 0/SomeClass getMutableProperty
|
||||||
|
m 0 0/SomeClass setMutableProperty
|
||||||
+3
-2
@@ -1,10 +1,11 @@
|
|||||||
package org.test
|
package org.test
|
||||||
|
|
||||||
import javax.inject.*
|
public annotation class SomeAnnotation
|
||||||
|
|
||||||
|
SomeAnnotation
|
||||||
public class SomeClass {
|
public class SomeClass {
|
||||||
|
|
||||||
Inject
|
SomeAnnotation
|
||||||
public fun annotatedFunction() {
|
public fun annotatedFunction() {
|
||||||
|
|
||||||
}
|
}
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
a org.test.SomeAnnotation 0
|
||||||
|
p org.test 0
|
||||||
|
c 0 0/SomeClass
|
||||||
|
m 0 0/SomeClass annotatedFunction
|
||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
a javax.inject.Inject 0
|
a javax.inject.Inject 0
|
||||||
p org.test 0
|
p org.test 0
|
||||||
m 0 0/SomeClass annotatedFunction
|
f 0 0/SomeClass$a$1 property
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package org.test
|
||||||
|
|
||||||
|
import javax.inject.*
|
||||||
|
|
||||||
|
public class SomeClass {
|
||||||
|
|
||||||
|
private fun a() {
|
||||||
|
object : Any() {
|
||||||
|
[Inject]
|
||||||
|
val property: Int = 5
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ a org.jetbrains.annotations.NotNull 1
|
|||||||
m 1 0/SomeClass$Companion access$init$0
|
m 1 0/SomeClass$Companion access$init$0
|
||||||
c 0 0/SomeClass$SomeInnerObject
|
c 0 0/SomeClass$SomeInnerObject
|
||||||
c 0 0/SomeClass$InnerClass
|
c 0 0/SomeClass$InnerClass
|
||||||
|
c 0 0/SomeClass$InnerClass$InnerClassInInnerClass
|
||||||
c 0 0/SomeClass$NestedClass
|
c 0 0/SomeClass$NestedClass
|
||||||
a java.lang.Deprecated 2
|
a java.lang.Deprecated 2
|
||||||
f 2 0/SomeClass OBJECT$
|
f 2 0/SomeClass OBJECT$
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ public class SomeClass {
|
|||||||
Named("InnerClass")
|
Named("InnerClass")
|
||||||
inner class InnerClass {
|
inner class InnerClass {
|
||||||
|
|
||||||
|
Named("InnerClassInInnerClass")
|
||||||
|
inner class InnerClassInInnerClass {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Named("NestedClass")
|
Named("NestedClass")
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
a kotlin.platform.platformStatic 0
|
||||||
|
p org.test 0
|
||||||
|
m 0 0/SomeClass$Companion a
|
||||||
|
a javax.inject.Inject 1
|
||||||
|
m 1 0/SomeClass$Companion a
|
||||||
|
a org.jetbrains.annotations.NotNull 2
|
||||||
|
m 2 0/SomeClass$Companion access$init$0
|
||||||
|
a java.lang.Deprecated 3
|
||||||
|
f 3 0/SomeClass OBJECT$
|
||||||
|
m 0 0/SomeClass a
|
||||||
|
m 1 0/SomeClass a
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package org.test
|
||||||
|
|
||||||
|
import javax.inject.*
|
||||||
|
import kotlin.platform.platformStatic
|
||||||
|
|
||||||
|
public class SomeClass {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
platformStatic Inject fun a() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user