Files
kotlin/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableFloatNotEquals10.kt
Kristoffer Andersen 8af3b3e51e [Backend] Reorganize version 1.0 codegen tests
- Extract all backend codegen tests that specifically target behaviour
  in to-be-deprecated functionality from language versions < 1.3"
- Remove those tests from the JVM IR test suite.
2019-10-24 16:51:19 +02:00

30 lines
721 B
Kotlin
Vendored

// !API_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"
}
// 0 areEqual