Files
kotlin-fork/backend.native/tests/external/codegen/blackbox/unaryOp/intrinsic.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

17 lines
408 B
Kotlin

fun box(): String {
val a1: Byte = -1
val a2: Short = -1
val a3: Int = -1
val a4: Long = -1
val a5: Double = -1.0
val a6: Float = -1f
if (a1 != (-1).toByte()) return "fail 1"
if (a2 != (-1).toShort()) return "fail 2"
if (a3 != -1) return "fail 3"
if (a4 != -1L) return "fail 4"
if (a5 != -1.0) return "fail 5"
if (a6 != -1f) return "fail 6"
return "OK"
}