Files
kotlin/compiler/testData/codegen/bytecodeText/oldLanguageVersions/ieee754/nullableDoubleNotEquals10.kt
Alexander Udalov c3729c8189 Reorganize codegen tests for old language versions
Put all files under a single "oldLanguageVersions" directory under test
data of each test
2019-11-07 18:49:27 +01:00

30 lines
717 B
Kotlin
Vendored

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