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.
45 lines
738 B
Kotlin
Vendored
45 lines
738 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS, NATIVE
|
|
|
|
// WITH_RUNTIME
|
|
// FILE: 1.kt
|
|
|
|
package test
|
|
|
|
class A {}
|
|
|
|
fun getMain(className: String): java.lang.reflect.Method {
|
|
val classLoader = A().javaClass.classLoader
|
|
return classLoader.loadClass(className).getDeclaredMethod("main", Array<String>::class.java)
|
|
}
|
|
|
|
fun box(): String {
|
|
val bMain = getMain("pkg.AKt")
|
|
val cMain = getMain("pkg.BKt")
|
|
|
|
val args = Array(1, { "" })
|
|
|
|
bMain.invoke(null, args)
|
|
cMain.invoke(null, args)
|
|
|
|
return args[0]
|
|
}
|
|
|
|
|
|
|
|
// FILE: a.kt
|
|
|
|
package pkg
|
|
|
|
fun main(args: Array<String>) {
|
|
args[0] += "O"
|
|
}
|
|
|
|
// FILE: b.kt
|
|
|
|
package pkg
|
|
|
|
fun main(args: Array<String>) {
|
|
args[0] += "K"
|
|
}
|