JS: move more test to box tests

This commit is contained in:
Alexey Andreev
2016-08-30 13:59:50 +03:00
parent 9bf124af3f
commit 7e2d5b04de
68 changed files with 607 additions and 578 deletions
@@ -0,0 +1,22 @@
package foo
object A {
private val foo = 23
fun bar(): Int {
// Erase object so that we ensure that access to 'foo' property is performed via 'this'
// It's no crucial from runtime standpoind, but JS code looks more concise and natural this way.
erase()
return foo
}
fun erase() {
js("_.foo.A = null")
}
}
fun box(): String {
var result = A.bar()
if (result != 23) return "failed: ${result}"
return "OK"
}