JS: move more test to box tests

This commit is contained in:
Alexey Andreev
2016-08-30 13:59:50 +03:00
parent 9bf124af3f
commit 7e2d5b04de
68 changed files with 607 additions and 578 deletions
@@ -0,0 +1,35 @@
package foo
fun box(): String {
var d = 0
for (i in 1..6) {
d += i
}
if (d != 21) return "fail1: $d"
for (x in 100..199) {
d += 1
}
if (d != 121) {
return "fail2: $d"
}
for (y in 1..1) {
d = 100
}
if (d != 100) {
return "fail3: $d"
}
for (c in 100..100) {
d += 1;
}
if (d != 101) {
return "fail4: $d"
}
return "OK"
}