JS: move more test to box tests
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package foo
|
||||
|
||||
fun callWithArgs(sumFunc: (Int, Int) -> Int, a: Int, b: Int): Int {
|
||||
return sumFunc(a, b)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val kotlinSum: (Int, Int) -> Int = { a, b -> a + b}
|
||||
val jsSum: (Int, Int) -> Int = js("function (a, b) { return a + b; }")
|
||||
assertEquals(callWithArgs(kotlinSum, 1, 2), callWithArgs(jsSum, 1, 2))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user