[TEST] Fix test data.
Due to JS IR runner doesn't override stdout test fails. Remove using stdout from test.
This commit is contained in:
committed by
teamcityserver
parent
360c0170be
commit
686e5e7f2b
@@ -1,16 +1,19 @@
|
|||||||
// !OPT_IN: kotlin.contracts.ExperimentalContracts
|
// !OPT_IN: kotlin.contracts.ExperimentalContracts
|
||||||
// IGNORE_BACKEND: NATIVE
|
// IGNORE_BACKEND: NATIVE
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS_IR
|
|
||||||
|
|
||||||
import kotlin.contracts.*
|
import kotlin.contracts.*
|
||||||
|
|
||||||
|
var x = ""
|
||||||
|
|
||||||
|
fun baz(s: String) { x += s }
|
||||||
|
|
||||||
class A {
|
class A {
|
||||||
val value = "Some value"
|
val value = "Some value"
|
||||||
|
|
||||||
init {
|
init {
|
||||||
foo {
|
foo {
|
||||||
println(value)
|
baz(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,6 +26,7 @@ fun foo(block: () -> Unit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
A()
|
val a = A()
|
||||||
|
if (x != a.value) return "FAIL: $x"
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user