mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 15:53:40 +00:00
14 lines
390 B
Kotlin
Vendored
14 lines
390 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS
|
|
|
|
fun checkLess(x: Boolean, y: Boolean) = when {
|
|
x >= y -> "Fail $x >= $y"
|
|
!(x < y) -> "Fail !($x < $y)"
|
|
!(x <= y) -> "Fail !($x <= $y)"
|
|
x > y -> "Fail $x > $y"
|
|
x.compareTo(y) >= 0 -> "Fail $x.compareTo($y) >= 0"
|
|
else -> "OK"
|
|
}
|
|
|
|
fun box() = checkLess(false, true)
|