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
+19
View File
@@ -0,0 +1,19 @@
package foo
fun test(a: Int, b: Int, expected: Int): String {
val result = a / b
if (expected == result) return "OK"
return "$a / $b = $result. Expected $expected"
}
fun box(): String {
var r = test(10, 3, 3)
if (r != "OK") return r
r = test(49, 6, 8)
if (r != "OK") return r
if (2133 / 3 / 7 / (91 / 5) != 5) return "2133 / 3 / 7 / (91 / 5) != 5"
return "OK"
}