mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +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.
53 lines
877 B
Kotlin
Vendored
53 lines
877 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS, NATIVE
|
|
|
|
// WITH_RUNTIME
|
|
// FILE: Test.java
|
|
|
|
class Test {
|
|
|
|
public static String test1() {
|
|
return A.test1();
|
|
}
|
|
|
|
public static String test2() {
|
|
return A.test2();
|
|
}
|
|
|
|
public static String test3() {
|
|
return A.test3("JAVA");
|
|
}
|
|
|
|
public static String test4() {
|
|
return A.getC();
|
|
}
|
|
|
|
}
|
|
|
|
// FILE: simpleObject.kt
|
|
|
|
object A {
|
|
|
|
val b: String = "OK"
|
|
|
|
@JvmStatic val c: String = "OK"
|
|
|
|
@JvmStatic fun test1() = b
|
|
|
|
@JvmStatic fun test2() = b
|
|
|
|
@JvmStatic fun String.test3() = this + b
|
|
}
|
|
|
|
fun box(): String {
|
|
if (Test.test1() != "OK") return "fail 1"
|
|
|
|
if (Test.test2() != "OK") return "fail 2"
|
|
|
|
if (Test.test3() != "JAVAOK") return "fail 3"
|
|
|
|
if (Test.test4() != "OK") return "fail 4"
|
|
|
|
return "OK"
|
|
}
|