Analysis API: add tests to check annotations on declarations

This commit is contained in:
Ilya Kirillov
2021-11-19 15:44:13 +01:00
parent fff8eb244c
commit 02adb1924b
25 changed files with 361 additions and 0 deletions
@@ -0,0 +1,4 @@
annotation class A(val a: Int, val c: KClass<*>)
@A(1, Int::class)
class F<caret>oo
@@ -0,0 +1,5 @@
KtDeclaration: KtClass Foo
annotations: [
A(a = 1, c = KtUnsupportedConstantValue)
psi: KtAnnotationEntry
]
@@ -0,0 +1,4 @@
annotation class A(val a: Int, val c: KClass<*>)
@A(1, Int::class)
fun fo<caret>o(): Int = 10
@@ -0,0 +1,5 @@
KtDeclaration: KtNamedFunction foo
annotations: [
A(a = 1, c = KtUnsupportedConstantValue)
psi: KtAnnotationEntry
]
@@ -0,0 +1,4 @@
annotation class A(val a: Int, val c: KClass<*>)
@A(1, Int::class)
val f<caret>oo: Int = 10
@@ -0,0 +1,5 @@
KtDeclaration: KtProperty foo
annotations: [
A(a = 1, c = KtUnsupportedConstantValue)
psi: KtAnnotationEntry
]
@@ -0,0 +1,4 @@
annotation class A(val a: Int, val c: KClass<*>)
@A(1, Int::class)
typealias F<caret>oo = String
@@ -0,0 +1,5 @@
KtDeclaration: KtTypeAlias Foo
annotations: [
A(a = 1, c = KtUnsupportedConstantValue)
psi: KtAnnotationEntry
]