a5e4e0284e
This patch mutes the following test categories:
* Tests with java dependencies (System class,
java stdlib, jvm-oriented annotations etc).
* Coroutines tests.
* Reflection tests.
* Tests with an inheritance from the standard
collections.
28 lines
678 B
Kotlin
Vendored
28 lines
678 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS, NATIVE
|
|
|
|
// WITH_RUNTIME
|
|
|
|
import kotlin.test.assertEquals
|
|
|
|
fun foo(block: () -> String) = block()
|
|
|
|
inline fun<reified T : Any> bar1(): String = foo() {
|
|
T::class.java.getName()
|
|
}
|
|
inline fun<reified T : Any> bar2(y: String): String = foo() {
|
|
T::class.java.getName() + "#" + y
|
|
}
|
|
|
|
inline fun<T1, T2, reified R1 : Any, reified R2 : Any> bar3(y: String) =
|
|
Pair(bar1<R1>(), bar2<R2>(y))
|
|
|
|
fun box(): String {
|
|
val x = bar3<Any, Double, Int, String>("OK")
|
|
|
|
assertEquals("java.lang.Integer", x.first)
|
|
assertEquals("java.lang.String#OK", x.second)
|
|
|
|
return "OK"
|
|
}
|