Files
kotlin-fork/backend.native/tests/external/codegen/blackbox/ieee754/generic.kt
T
Ilya Matveev 1b553ebfaf backend/tests: Add blackbox tests from Kotlin JVM
Added tests from testData/codegen/box directory. There are blackbox tests
in other directories and they are to be added.
2017-01-20 14:04:04 +03:00

18 lines
377 B
Kotlin

// FILE: b.kt
class Foo<T>(val minus0: T, val plus0: T) {
}
fun box(): String {
val foo = Foo<Double>(-0.0, 0.0)
val fooF = Foo<Float>(-0.0F, 0.0F)
if (foo.minus0 < foo.plus0) return "fail 0"
if (fooF.minus0 < fooF.plus0) return "fail 1"
if (foo.minus0 != foo.plus0) return "fail 3"
if (fooF.minus0 != fooF.plus0) return "fail 4"
return "OK"
}