Added test checking that initialization order in package part is not violated.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
fun box(): String? {
|
||||
val log = System.getProperty("boxtest.log")
|
||||
System.clearProperty("boxtest.log") // test can be run twice
|
||||
return if (log == "bca") "OK" else log
|
||||
}
|
||||
|
||||
val b = log("b")
|
||||
val c = log("c")
|
||||
val a = log("a")
|
||||
|
||||
fun log(message: String) {
|
||||
val value = (System.getProperty("boxtest.log") ?: "") + message
|
||||
System.setProperty("boxtest.log", value)
|
||||
}
|
||||
Reference in New Issue
Block a user