Files
kotlin-fork/compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt
T
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00

27 lines
965 B
Kotlin
Vendored

// WITH_STDLIB
// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME
fun box(): String {
val charBound = Char.MIN_VALUE
if ('b' in 'a' until charBound) return "Fail in Char.MIN_VALUE"
if (!('b' !in 'a' until charBound)) return "Fail !in Char.MIN_VALUE"
val intBound = Int.MIN_VALUE
if (1 in 0 until intBound) return "Fail in Int.MIN_VALUE"
if (!(1 !in 0 until intBound)) return "Fail !in Int.MIN_VALUE"
val longBound = Long.MIN_VALUE
if (1L in 0L until longBound) return "Fail in Long.MIN_VALUE"
if (!(1L !in 0L until longBound)) return "Fail !in Long.MIN_VALUE"
val uIntBound = UInt.MIN_VALUE
if (1u in 0u until uIntBound) return "Fail in UInt.MIN_VALUE"
if (!(1u !in 0u until uIntBound)) return "Fail !in UInt.MIN_VALUE"
val uLongBound = ULong.MIN_VALUE
if (1uL in 0uL until uLongBound) return "Fail in ULong.MIN_VALUE"
if (!(1uL !in 0uL until uLongBound)) return "Fail !in ULong.MIN_VALUE"
return "OK"
}