JS test: added inline tests

This commit is contained in:
Alexey Tsvetkov
2014-09-29 16:00:18 +04:00
committed by Zalim Bashorov
parent 987708680f
commit 3f2d4b31be
112 changed files with 4442 additions and 0 deletions
@@ -0,0 +1,29 @@
/*
* Copy of JVM-backend test
* Found at: compiler/testData/codegen/boxInline/defaultValues/defaultMethod.1.kt
*/
package foo
import test.*
fun simple(): String {
val k = "K"
return simpleFun(lambda = {it + "O"}) + simpleFun("K", {k + it})
}
fun simpleR(): String {
val k = "K"
return simpleFunR({it + "O"}) + simpleFunR({k + it}, "K")
}
fun box(): String {
var result = simple()
if (result != "OOKK") return "fail1: ${result}"
result = simpleR()
if (result != "OOKK") return "fail2: ${result}"
return "OK"
}