JS: move more test to box tests

This commit is contained in:
Alexey Andreev
2016-08-29 14:51:32 +03:00
parent a18f5eca2d
commit 9bf124af3f
129 changed files with 766 additions and 685 deletions
@@ -0,0 +1,22 @@
package foo
@native
fun run(i:Int, s:String, funRef: (Int, String) -> String): String = noImpl
fun funTopLevel(i:Int, s:String): String = "funTopLevel $i $s"
fun box(): String {
fun funLocal(i:Int, s:String): String = "funLocal $i $s"
// Check for lambda
var r = run(4, "boo") { i, s -> "$i $s"}
if (r != "4 boo") return r
r = run(4, "boo", ::funTopLevel)
if (r != "funTopLevel 4 boo") return r
r = run(4, "boo", ::funLocal)
if (r != "funLocal 4 boo") return r
return "OK"
}