JS: move more test to box tests

This commit is contained in:
Alexey Andreev
2016-08-29 12:37:13 +03:00
parent efb82a044f
commit cdf2212c73
70 changed files with 484 additions and 749 deletions
+18
View File
@@ -0,0 +1,18 @@
package foo
fun countKeys(a: Array<Int>): Int = js("""
var result = 0;
for (var key in a) {
result += 1;
}
return result;
""")
fun box(): String {
assertEquals(3, countKeys(arrayOf(1,2,3)))
assertEquals(4, countKeys(arrayOf(1,2,3,4)))
return "OK"
}