[KLIB tool] Migrate 'dump-metadata' tests to K/N test infra
This commit is contained in:
committed by
Space Team
parent
57e004e2b0
commit
aa9b901926
+3
-1
@@ -1,3 +1,4 @@
|
||||
package test {
|
||||
annotation class Anno constructor(value: String = ..., x: Int = ...) : Annotation {
|
||||
val value: String
|
||||
val x: Int
|
||||
@@ -8,4 +9,5 @@
|
||||
enum entry Entry2
|
||||
@Anno(value = "3") @Bnno enum entry Entry3
|
||||
@Anno(value = "4", x = 4) enum entry Entry4
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -1,3 +1,4 @@
|
||||
package test {
|
||||
annotation class AnnotationArray constructor(annotationArray: Array<JustAnnotation>) : Annotation {
|
||||
val annotationArray: Array<JustAnnotation>
|
||||
}
|
||||
@@ -6,4 +7,5 @@
|
||||
annotation class Empty constructor() : Annotation
|
||||
annotation class JustAnnotation constructor(annotation: Empty) : Annotation {
|
||||
val annotation: Empty
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-1
@@ -1,3 +1,4 @@
|
||||
package test {
|
||||
@JustEnum(weapon = Weapon.SCISSORS) @EnumArray(enumArray = {}) class C1 constructor()
|
||||
@EnumArray(enumArray = {Weapon.PAPER, Weapon.ROCK}) class C2 constructor()
|
||||
annotation class EnumArray constructor(enumArray: Array<Weapon>) : Annotation {
|
||||
@@ -10,4 +11,5 @@
|
||||
enum entry ROCK
|
||||
enum entry PAPER
|
||||
enum entry SCISSORS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,4 @@
|
||||
package test {
|
||||
@PrimitiveArrays(booleanArray = {true, false, true}, byteArray = {-7.toByte(), 7.toByte()}, charArray = {\u0025 ('%'), \u007A ('z')}, doubleArray = {-3.14.toDouble()}, floatArray = {2.72.toFloat(), 0.0.toFloat()}, intArray = {239017, -1}, longArray = {123456789123456789.toLong()}, shortArray = {239.toShort()}) class C1 constructor()
|
||||
@PrimitiveArrays(booleanArray = {}, byteArray = {}, charArray = {}, doubleArray = {}, floatArray = {}, intArray = {}, longArray = {}, shortArray = {}) class C2 constructor()
|
||||
annotation class PrimitiveArrays constructor(byteArray: ByteArray, charArray: CharArray, shortArray: ShortArray, intArray: IntArray, longArray: LongArray, floatArray: FloatArray, doubleArray: DoubleArray, booleanArray: BooleanArray) : Annotation {
|
||||
@@ -10,3 +11,4 @@
|
||||
val longArray: LongArray
|
||||
val shortArray: ShortArray
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,4 @@
|
||||
package test {
|
||||
@Primitives(boolean = true, byte = 7.toByte(), char = \u0025 ('%'), double = -3.14.toDouble(), float = 2.72.toFloat(), int = 239017, long = 123456789123456789.toLong(), short = 239.toShort()) class C constructor()
|
||||
annotation class Primitives constructor(byte: Byte, char: Char, short: Short, int: Int, long: Long, float: Float, double: Double, boolean: Boolean) : Annotation {
|
||||
val boolean: Boolean
|
||||
@@ -9,3 +10,4 @@
|
||||
val long: Long
|
||||
val short: Short
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-1
@@ -1,3 +1,4 @@
|
||||
package test {
|
||||
@JustString(string = "kotlin") @StringArray(stringArray = {}) class C1 constructor()
|
||||
@StringArray(stringArray = {"java", ""}) class C2 constructor()
|
||||
annotation class JustString constructor(string: String) : Annotation {
|
||||
@@ -5,4 +6,5 @@
|
||||
}
|
||||
annotation class StringArray constructor(stringArray: Array<String>) : Annotation {
|
||||
val stringArray: Array<String>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-1
@@ -1,3 +1,4 @@
|
||||
package test {
|
||||
enum class My private constructor() : Enum<My> {
|
||||
enum entry ALPHA
|
||||
enum entry BETA
|
||||
@@ -6,4 +7,5 @@
|
||||
annotation class ann constructor(vararg m: My) : Annotation {
|
||||
val m: Array<out My>
|
||||
}
|
||||
@ann(m = {My.ALPHA, My.BETA}) annotation class annotated constructor() : Annotation
|
||||
@ann(m = {My.ALPHA, My.BETA}) annotation class annotated constructor() : Annotation
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,3 +1,4 @@
|
||||
package test {
|
||||
@anno(x = "top level class") class C1 @anno(x = "constructor") constructor() {
|
||||
@anno(x = "member property") val p3: Nothing?
|
||||
@anno(x = "member extension property") val Int.v4: Int
|
||||
@@ -12,4 +13,5 @@
|
||||
@anno(x = "top level function") fun f1(@anno(x = "top level function parameter") p: Int)
|
||||
@anno(x = "extension function") fun Long.f2(@anno(x = "extension function parameter") p: Int)
|
||||
@anno(x = "top level property") val p1: Nothing?
|
||||
@anno(x = "extension property") val Double.p2: Double
|
||||
@anno(x = "extension property") val Double.p2: Double
|
||||
}
|
||||
Vendored
+3
-1
@@ -1,7 +1,9 @@
|
||||
package test {
|
||||
@Retention(value = AnnotationRetention.BINARY) @Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.TYPE, AnnotationTarget.TYPE_PARAMETER}) annotation class A constructor() : Annotation
|
||||
enum class Enum private constructor() : Enum<Enum> {
|
||||
@A enum entry ENTRY
|
||||
}
|
||||
@A class Klass @A constructor()
|
||||
@A fun <@A T> function(@A param: Unit)
|
||||
@A val property: Unit
|
||||
@A val property: Unit
|
||||
}
|
||||
Vendored
+2
@@ -1,3 +1,4 @@
|
||||
package test {
|
||||
class Class constructor() {
|
||||
val arrayConst: Any = {1.toByte(), 2.toByte()}
|
||||
val booleanConst: Boolean = true
|
||||
@@ -27,3 +28,4 @@
|
||||
val longConst: Long = 40.toLong()
|
||||
val shortConst: Short = 20.toShort()
|
||||
val stringConst: String = "abcd"
|
||||
}
|
||||
Vendored
+2
@@ -1,3 +1,4 @@
|
||||
package test {
|
||||
class ClassA constructor() {
|
||||
class classB constructor() {
|
||||
fun memberFromB(): Int
|
||||
@@ -25,3 +26,4 @@
|
||||
val memberFromObjA: Int = 300
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+3
-1
@@ -1,7 +1,9 @@
|
||||
package test {
|
||||
annotation class Anno constructor(value: String) : Annotation {
|
||||
val value: String
|
||||
}
|
||||
@Anno(value = "property") val v1: String = ""
|
||||
var v2: String
|
||||
@Anno(value = "getter") get
|
||||
@Anno(value = "setter") set
|
||||
@Anno(value = "setter") set
|
||||
}
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
package test {
|
||||
class Class constructor() {
|
||||
fun member(): Nothing?
|
||||
}
|
||||
fun <T> T.extension(): T?
|
||||
fun function(int: Int, string: String = ...): Class
|
||||
val property: Unit
|
||||
val property: Unit
|
||||
}
|
||||
Vendored
+3
-1
@@ -1,7 +1,9 @@
|
||||
package test {
|
||||
@Retention(value = AnnotationRetention.SOURCE) @Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.TYPE, AnnotationTarget.TYPE_PARAMETER}) annotation class A constructor() : Annotation
|
||||
enum class Enum private constructor() : Enum<Enum> {
|
||||
enum entry ENTRY
|
||||
}
|
||||
class Klass constructor()
|
||||
fun <T> function(param: Unit)
|
||||
val property: Unit
|
||||
val property: Unit
|
||||
}
|
||||
+2
-1
@@ -3,4 +3,5 @@ package <root> {
|
||||
object Obj {
|
||||
const val O: String = "O"
|
||||
val concat: String = "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+3
-1
@@ -1,4 +1,6 @@
|
||||
package test {
|
||||
@Retention(value = AnnotationRetention.BINARY) @Target(allowedTargets = {AnnotationTarget.TYPE_PARAMETER}) annotation class Ann constructor(value: String) : Annotation {
|
||||
val value: String
|
||||
}
|
||||
inline fun <reified @Ann(value = "abc") T> foo()
|
||||
inline fun <reified @Ann(value = "abc") T> foo()
|
||||
}
|
||||
Reference in New Issue
Block a user