Files
kotlin-fork/compiler/testData/codegen/box/ir/primitiveNumberComparisons/comparableToDouble.kt
T
Mikhail Glukhikh d5fbd93fe6 Unmute additional FIR black box tests
This was result of comparison commits together (?) with override commits
2020-02-28 15:29:03 +03:00

17 lines
316 B
Kotlin
Vendored

// !LANGUAGE: +ProperIeee754Comparisons
fun ltDD(x: Comparable<Double>, y: Double) =
x is Double && x < y
fun ltCD(x: Comparable<Double>, y: Double) =
x < y
fun box(): String {
val Z = 0.0
val NZ = -0.0
if (ltDD(NZ, Z)) return "Fail 1"
if (!ltCD(NZ, Z)) return "Fail 2"
return "OK"
}