Add failing tests for overflow in empty progressions KT-24204
This commit is contained in:
+47
@@ -0,0 +1,47 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS_IR or not
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
|
||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
import java.lang.Integer.MAX_VALUE as MaxI
|
||||
import java.lang.Integer.MIN_VALUE as MinI
|
||||
import java.lang.Byte.MAX_VALUE as MaxB
|
||||
import java.lang.Byte.MIN_VALUE as MinB
|
||||
import java.lang.Short.MAX_VALUE as MaxS
|
||||
import java.lang.Short.MIN_VALUE as MinS
|
||||
import java.lang.Long.MAX_VALUE as MaxL
|
||||
import java.lang.Long.MIN_VALUE as MinL
|
||||
import java.lang.Character.MAX_VALUE as MaxC
|
||||
import java.lang.Character.MIN_VALUE as MinC
|
||||
|
||||
fun box(): String {
|
||||
val list1 = ArrayList<Int>()
|
||||
val range1 = 0 downTo MaxI step 3
|
||||
for (i in range1) {
|
||||
list1.add(i)
|
||||
if (list1.size > 23) break
|
||||
}
|
||||
if (list1 != listOf<Int>()) {
|
||||
return "Wrong elements for 0 downTo MaxI step 3: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Long>()
|
||||
val range2 = 0 downTo MaxL step 3
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size > 23) break
|
||||
}
|
||||
if (list2 != listOf<Long>()) {
|
||||
return "Wrong elements for 0 downTo MaxL step 3: $list2"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user