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.
41 lines
864 B
Kotlin
Vendored
41 lines
864 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS, NATIVE
|
|
|
|
// WITH_RUNTIME
|
|
|
|
import kotlin.test.assertFalse
|
|
|
|
@JvmField public val field = "OK";
|
|
|
|
class A {
|
|
@JvmField public val field = "OK";
|
|
|
|
companion object {
|
|
@JvmField public val cfield = "OK";
|
|
}
|
|
}
|
|
|
|
object Object {
|
|
@JvmField public val field = "OK";
|
|
}
|
|
|
|
|
|
fun box(): String {
|
|
var result = A().field
|
|
|
|
checkNoAccessors(A::class.java)
|
|
checkNoAccessors(A.Companion::class.java)
|
|
checkNoAccessors(Object::class.java)
|
|
checkNoAccessors(Class.forName("CheckNoAccessorsKt"))
|
|
|
|
return "OK"
|
|
}
|
|
|
|
public fun checkNoAccessors(clazz: Class<*>) {
|
|
clazz.declaredMethods.forEach {
|
|
assertFalse(it.name.startsWith("get") || it.name.startsWith("set"),
|
|
"Class ${clazz.name} has accessor '${it.name}'"
|
|
)
|
|
}
|
|
}
|