Files
kotlin-fork/js/js.translator/testData/number/cases/kt2342.kt
T
2014-03-11 20:04:00 +04:00

19 lines
402 B
Kotlin

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"
}