mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
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.
36 lines
716 B
Kotlin
Vendored
36 lines
716 B
Kotlin
Vendored
// TODO: investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS, NATIVE
|
|
|
|
// WITH_REFLECT
|
|
|
|
import kotlin.reflect.*
|
|
import kotlin.reflect.jvm.*
|
|
import kotlin.test.*
|
|
|
|
class C {
|
|
fun foo() {}
|
|
var bar = "OK"
|
|
}
|
|
|
|
fun C.extFun(i: Int) {}
|
|
|
|
fun KParameter.check(name: String) {
|
|
assertEquals(name, this.name!!)
|
|
assertEquals(KParameter.Kind.VALUE, this.kind)
|
|
}
|
|
|
|
fun box(): String {
|
|
val cFoo = C()::foo
|
|
val cBar = C()::bar
|
|
val cExtFun = C()::extFun
|
|
|
|
assertEquals(0, cFoo.parameters.size)
|
|
assertEquals(0, cBar.getter.parameters.size)
|
|
assertEquals(1, cBar.setter.parameters.size)
|
|
|
|
assertEquals(1, cExtFun.parameters.size)
|
|
cExtFun.parameters[0].check("i")
|
|
|
|
return "OK"
|
|
}
|