mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
10 lines
260 B
Kotlin
Vendored
10 lines
260 B
Kotlin
Vendored
fun box(): String {
|
|
val c1: Char = 0.toChar()
|
|
val c2 = c1 - 1
|
|
if (c2 < c1) return "fail: 0.toChar() - 1 should overflow to positive."
|
|
|
|
val c3 = c2 + 1
|
|
if (c3 > c2) return "fail: FFFF.toChar() + 1 should overflow to zero."
|
|
|
|
return "OK"
|
|
} |