Fix UL-classes test renders and test data

This commit is contained in:
Igor Yakovlev
2019-07-01 18:07:12 +03:00
parent 4b1226e3d7
commit a9aa60491e
9 changed files with 105 additions and 38 deletions
+28 -9
View File
@@ -1,9 +1,29 @@
import kotlin.reflect.KClass
/** should load cls */
annotation class Anno(val p: String = "", val x: Array<Anno> = arrayOf(Anno(p="a"), Anno(p="b")))
@Target(*[AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION])
annotation class Anno2()
/** should load cls */
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION])
annotation class Anno3()
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION)
annotation class Anno4()
@Target(*arrayOf(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION))
annotation class Anno5()
@Target(allowedTargets = arrayOf(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION))
annotation class Anno6()
annotation class AnnoWithCompanion() {
companion object {
fun foo() {}
@JvmField
val x: Int = 42
}
}
annotation class Anno(val p: String = "", val x: Array<Anno> = arrayOf(Anno(p = "a"), Anno(p = "b")))
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION,
AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
@@ -11,15 +31,14 @@ annotation class Anno(val p: String = "", val x: Array<Anno> = arrayOf(Anno(p="a
@Deprecated("This anno is deprecated, use === instead", ReplaceWith("this === other"))
annotation class Fancy
/** should load cls */
annotation class ReplaceWith(val expression: String)
/** should load cls */
annotation class AnnotatedAttribute(@get:Anno val x: String)
annotation class Deprecated(
val message: String,
val replaceWith: ReplaceWith = ReplaceWith(""))
/** should load cls */
annotation class Ann(val arg1: KClass<*>, val arg2: KClass<out Any>)
@@ -39,6 +58,6 @@ class Foo @Anno constructor(dependency: MyDependency) {
@Ann(String::class, Int::class) class MyClass
class Example(@field:Ann val foo, // annotate Java field
@get:Ann val bar, // annotate Java getter
@param:Ann val quux) // annotate Java constructor parameter
class Example(@field:Ann val foo: String, // annotate Java field
@get:Ann val bar: String, // annotate Java getter
@param:Ann val quux: String) // annotate Java constructor parameter