Files
kotlin-fork/compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt
T
Ilmir Usmanov 89d45bf909 IC mangling: Use old mangling scheme in FIR tests
instead of ignoring them.
This affects all unsigned tests.
2020-11-19 17:39:31 +01:00

27 lines
1023 B
Kotlin
Vendored

// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
// KOTLIN_CONFIGURATION_FLAGS: +JVM.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"
}