ba20549e13
These tests don't work on JVM target 1.6 after 6d664bcd10 because we're
generating `Boolean.compare` which is only available since 1.8. (It is
not a big deal because JVM target 1.6 is prohibited for users now.)
13 lines
314 B
Kotlin
Vendored
13 lines
314 B
Kotlin
Vendored
// JVM_TARGET: 1.8
|
|
|
|
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)
|