Files
kotlin-fork/compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt
T
Zalim Bashorov 3f0b31dc23 Speed up JS IR BE tests compiling the common parts (runtime + test common utils) once (on demand) and sharing the result between tests
It's a temporary hack until we implement IR based library format.
It relies on the fact that currently, IR BE generates stable (enough) names.​
2018-07-13 23:42:41 +03:00

26 lines
708 B
Kotlin
Vendored

// LANGUAGE_VERSION: 1.0
fun myNotEquals(a: Float?, b: Float?) = a != b
fun myNotEquals1(a: Float?, b: Float) = a != b
fun myNotEquals2(a: Float, b: Float?) = a != b
fun myNotEquals0(a: Float, b: Float) = a != b
fun box(): String {
if (myNotEquals(null, null)) return "fail 1"
if (!myNotEquals(null, 0.0F)) return "fail 2"
if (!myNotEquals(0.0F, null)) return "fail 3"
if (myNotEquals(0.0F, 0.0F)) return "fail 4"
if (!myNotEquals1(null, 0.0F)) return "fail 5"
if (myNotEquals1(0.0F, 0.0F)) return "fail 6"
if (!myNotEquals2(0.0F, null)) return "fail 7"
if (myNotEquals2(0.0F, 0.0F)) return "fail 8"
if (myNotEquals0(0.0F, 0.0F)) return "fail 9"
return "OK"
}