Merge boxWithStdlib testData into box, delete BoxWithStdlib test
This commit is contained in:
committed by
Alexander Udalov
parent
22bfc9786a
commit
06a67e6602
@@ -0,0 +1,26 @@
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
open class A {
|
||||
open fun foo(x: Int, y: Int = 1) {}
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override fun foo(x: Int, y: Int) {}
|
||||
}
|
||||
|
||||
class C : A()
|
||||
|
||||
|
||||
fun Int.extFun() {}
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(listOf(false, false, true), A::foo.parameters.map { it.isOptional })
|
||||
assertEquals(listOf(false, false, true), B::foo.parameters.map { it.isOptional })
|
||||
assertEquals(listOf(false, false, true), C::foo.parameters.map { it.isOptional })
|
||||
|
||||
assertFalse(Int::extFun.parameters.single().isOptional)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user