Kapt: add some JeElement tests

(cherry picked from commit 948a4b6)
This commit is contained in:
Yan Zhulanow
2016-08-02 22:47:18 +03:00
committed by Yan Zhulanow
parent 0fc92c784b
commit 927280f7ce
51 changed files with 1154 additions and 14 deletions
@@ -0,0 +1,31 @@
// test.Main
package test
@MainAnno("A", 5)
class Main {
@field:XAnno(color = Color.GREEN)
val x: String
@get:YAnno(arrayOf<String>("Mary", "Tom"), intArrayOf(1, 3, 5), arrayOf<Color>(Color.GREEN, Color.RED))
val y: String
@set:ZAnno(String::class, arrayOf(String::class, Long::class, Main::class))
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
}
enum class Color {
RED, GREEN, BLUE
}
annotation class MainAnno(val a: String, val b: Int)
annotation class XAnno(val color: Color)
annotation class YAnno(val names: Array<String>, val ints: Array<Int>, val colors: Array<Color>)
annotation class ZAnno(val clazz: Class<*>, val classes = Array<Class<*>>)