Minor. Update tests to support them on Android
This commit is contained in:
Vendored
+3
-2
@@ -1,6 +1,7 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.test.assertEquals
|
||||
@@ -16,10 +17,10 @@ fun f(): @Anno(String::class, CharSequence::class, [Double::class, Long::class,
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(
|
||||
"[@Anno(k1=class java.lang.String, k2=interface java.lang.CharSequence, " +
|
||||
"[@test.Anno(k1=class java.lang.String, k2=interface java.lang.CharSequence, " +
|
||||
"ka=[class java.lang.Double, class java.lang.Long, class java.lang.Integer])]",
|
||||
::f.returnType.annotations.toString()
|
||||
)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
+4
-3
@@ -1,6 +1,7 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.test.assertEquals
|
||||
@@ -66,11 +67,11 @@ fun f(): @Anno(
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(
|
||||
"[@Anno(b=1, c=x, d=3.14, f=-2.72, i=42424242, j=239239239239239, s=42, z=true, " +
|
||||
"[@test.Anno(b=1, c=x, d=3.14, f=-2.72, i=42424242, j=239239239239239, s=42, z=true, " +
|
||||
"ba=[-1], ca=[y], da=[-3.14159], fa=[2.7218], ia=[424242], ja=[239239239239], sa=[-43], za=[false, true], " +
|
||||
"str=lol, k=class java.lang.Number, k2=class [I, e=EXPRESSION, a=@Nested(value=1), stra=[lmao], " +
|
||||
"str=lol, k=class java.lang.Number, k2=class [I, e=EXPRESSION, a=@test.Nested(value=1), stra=[lmao], " +
|
||||
"ka=[class java.lang.Double, class kotlin.Unit, class [J, class [Ljava.lang.String;], " +
|
||||
"ea=[TYPEALIAS, FIELD], aa=[@Nested(value=2), @Nested(value=3)])]",
|
||||
"ea=[TYPEALIAS, FIELD], aa=[@test.Nested(value=2), @test.Nested(value=3)])]",
|
||||
::f.returnType.annotations.toString()
|
||||
)
|
||||
|
||||
|
||||
+5
-5
@@ -4,7 +4,7 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
// WITH_REFLECT
|
||||
|
||||
package test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertNotEquals
|
||||
import kotlin.test.assertTrue
|
||||
@@ -58,10 +58,10 @@ fun box(): String {
|
||||
val dpz = D::class.constructors.single().call(+0.0)
|
||||
val fmz = F::class.constructors.single().call(-0.0f)
|
||||
val fpz = F::class.constructors.single().call(+0.0f)
|
||||
check(::dMinusZero.annotations.single() as D, dmz, "@D\\(d=-0.0\\)")
|
||||
check(::dPlusZero.annotations.single() as D, dpz, "@D\\(d=0.0\\)")
|
||||
check(::fMinusZero.annotations.single() as F, fmz, "@F\\(f=-0.0f?\\)")
|
||||
check(::fPlusZero.annotations.single() as F, fpz, "@F\\(f=0.0f?\\)")
|
||||
check(::dMinusZero.annotations.single() as D, dmz, "@test.D\\(d=-0.0\\)")
|
||||
check(::dPlusZero.annotations.single() as D, dpz, "@test.D\\(d=0.0\\)")
|
||||
check(::fMinusZero.annotations.single() as F, fmz, "@test.F\\(f=-0.0f?\\)")
|
||||
check(::fPlusZero.annotations.single() as F, fpz, "@test.F\\(f=0.0f?\\)")
|
||||
|
||||
checkNot(dmz, dpz)
|
||||
checkNot(fmz, fpz)
|
||||
|
||||
Reference in New Issue
Block a user