Change range iteration tests so they are runnable on all platforms

Remove JS and Native backend exclusions
This commit is contained in:
Ilya Gorbunov
2018-08-02 22:22:09 +03:00
parent e18bebf12a
commit f010231ff7
63 changed files with 290 additions and 545 deletions
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = 5 downTo 10 val range1 = 5 downTo 10
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = 10..5 val range1 = 10..5
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MinI = Int.MIN_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinB = Byte.MIN_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MinS = Short.MIN_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MinL = Long.MIN_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MinC = Char.MIN_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = 8 downTo 3 step 2 val range1 = 8 downTo 3 step 2
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = 3..8 step 2 val range1 = 3..8 step 2
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxS = Short.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MaxL = Long.MAX_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxC = Char.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxS = Short.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MaxL = Long.MAX_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxC = Char.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxS = Short.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MaxL = Long.MAX_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxC = Char.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,20 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinI = Int.MIN_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MinB = Byte.MIN_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxS = Short.MAX_VALUE
import java.lang.Short.MIN_VALUE as MinS const val MinS = Short.MIN_VALUE
import java.lang.Long.MAX_VALUE as MaxL const val MaxL = Long.MAX_VALUE
import java.lang.Long.MIN_VALUE as MinL const val MinL = Long.MIN_VALUE
import java.lang.Character.MAX_VALUE as MaxC const val MaxC = Char.MAX_VALUE
import java.lang.Character.MIN_VALUE as MinC const val MinC = Char.MIN_VALUE
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = 5 downTo 5 val range1 = 5 downTo 5
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = 5..5 val range1 = 5..5
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = 1 until 5 val range1 = 1 until 5
@@ -1,26 +1,12 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxL = Long.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,12 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MinI = Int.MIN_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinL = Long.MIN_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MinI = Int.MIN_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinB = Byte.MIN_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MinS = Short.MIN_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MinL = Long.MIN_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MinC = Char.MIN_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxS = Short.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MaxL = Long.MAX_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxC = Char.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxS = Short.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MaxL = Long.MAX_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxC = Char.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,20 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinI = Int.MIN_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MinB = Byte.MIN_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxS = Short.MAX_VALUE
import java.lang.Short.MIN_VALUE as MinS const val MinS = Short.MIN_VALUE
import java.lang.Long.MAX_VALUE as MaxL const val MaxL = Long.MAX_VALUE
import java.lang.Long.MIN_VALUE as MinL const val MinL = Long.MIN_VALUE
import java.lang.Character.MAX_VALUE as MaxC const val MaxC = Char.MAX_VALUE
import java.lang.Character.MIN_VALUE as MinC const val MinC = Char.MIN_VALUE
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MinI = Int.MIN_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinB = Byte.MIN_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MinS = Short.MIN_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MinL = Long.MIN_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MinC = Char.MIN_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = (5 downTo 3).reversed() val range1 = (5 downTo 3).reversed()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = (3 downTo 5).reversed() val range1 = (3 downTo 5).reversed()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = (5..3).reversed() val range1 = (5..3).reversed()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = (8 downTo 3 step 2).reversed() val range1 = (8 downTo 3 step 2).reversed()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = (3..5).reversed() val range1 = (3..5).reversed()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = (3..9 step 2).reversed() val range1 = (3..9 step 2).reversed()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = 9 downTo 3 val range1 = 9 downTo 3
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = 3..9 val range1 = 3..9
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = (1 + 2)..(10 - 1) val range1 = (1 + 2)..(10 - 1)
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = 9 downTo 3 step 2 val range1 = 9 downTo 3 step 2
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
val range1 = 3..9 step 2 val range1 = 3..9 step 2
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in 5 downTo 10) { for (i in 5 downTo 10) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in 10..5) { for (i in 10..5) {
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MinI = Int.MIN_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinB = Byte.MIN_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MinS = Short.MIN_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MinL = Long.MIN_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MinC = Char.MIN_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in 8 downTo 3 step 2) { for (i in 8 downTo 3 step 2) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in 3..8 step 2) { for (i in 3..8 step 2) {
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxS = Short.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MaxL = Long.MAX_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxC = Char.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxS = Short.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MaxL = Long.MAX_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxC = Char.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxS = Short.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MaxL = Long.MAX_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxC = Char.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,20 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinI = Int.MIN_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MinB = Byte.MIN_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxS = Short.MAX_VALUE
import java.lang.Short.MIN_VALUE as MinS const val MinS = Short.MIN_VALUE
import java.lang.Long.MAX_VALUE as MaxL const val MaxL = Long.MAX_VALUE
import java.lang.Long.MIN_VALUE as MinL const val MinL = Long.MIN_VALUE
import java.lang.Character.MAX_VALUE as MaxC const val MaxC = Char.MAX_VALUE
import java.lang.Character.MIN_VALUE as MinC const val MinC = Char.MIN_VALUE
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in 5 downTo 5) { for (i in 5 downTo 5) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in 5..5) { for (i in 5..5) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in 1 until 5) { for (i in 1 until 5) {
@@ -1,26 +1,12 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxL = Long.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,12 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MinI = Int.MIN_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinL = Long.MIN_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MinI = Int.MIN_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinB = Byte.MIN_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MinS = Short.MIN_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MinL = Long.MIN_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MinC = Char.MIN_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxS = Short.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MaxL = Long.MAX_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxC = Char.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxS = Short.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MaxL = Long.MAX_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxC = Char.MAX_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,20 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MaxI = Int.MAX_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinI = Int.MIN_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MaxB = Byte.MAX_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MinB = Byte.MIN_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MaxS = Short.MAX_VALUE
import java.lang.Short.MIN_VALUE as MinS const val MinS = Short.MIN_VALUE
import java.lang.Long.MAX_VALUE as MaxL const val MaxL = Long.MAX_VALUE
import java.lang.Long.MIN_VALUE as MinL const val MinL = Long.MIN_VALUE
import java.lang.Character.MAX_VALUE as MaxC const val MaxC = Char.MAX_VALUE
import java.lang.Character.MIN_VALUE as MinC const val MinC = Char.MIN_VALUE
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -1,26 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not // TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR // 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! // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
// WITH_RUNTIME // WITH_RUNTIME
import java.lang.Integer.MAX_VALUE as MaxI const val MinI = Int.MIN_VALUE
import java.lang.Integer.MIN_VALUE as MinI const val MinB = Byte.MIN_VALUE
import java.lang.Byte.MAX_VALUE as MaxB const val MinS = Short.MIN_VALUE
import java.lang.Byte.MIN_VALUE as MinB const val MinL = Long.MIN_VALUE
import java.lang.Short.MAX_VALUE as MaxS const val MinC = Char.MIN_VALUE
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 { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in (5 downTo 3).reversed()) { for (i in (5 downTo 3).reversed()) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in (3 downTo 5).reversed()) { for (i in (3 downTo 5).reversed()) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in (5..3).reversed()) { for (i in (5..3).reversed()) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in (8 downTo 3 step 2).reversed()) { for (i in (8 downTo 3 step 2).reversed()) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in (3..5).reversed()) { for (i in (3..5).reversed()) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in (3..9 step 2).reversed()) { for (i in (3..9 step 2).reversed()) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in 9 downTo 3) { for (i in 9 downTo 3) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in 3..9) { for (i in 3..9) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in (1 + 2)..(10 - 1)) { for (i in (1 + 2)..(10 - 1)) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in 9 downTo 3 step 2) { for (i in 9 downTo 3 step 2) {
@@ -5,6 +5,7 @@
// WITH_RUNTIME // WITH_RUNTIME
fun box(): String { fun box(): String {
val list1 = ArrayList<Int>() val list1 = ArrayList<Int>()
for (i in 3..9 step 2) { for (i in 3..9 step 2) {
@@ -37,7 +37,6 @@ public class GenerateRangesCodegenTestData {
private static final File AS_EXPRESSION_DIR = new File(TEST_DATA_DIR, "expression"); private static final File AS_EXPRESSION_DIR = new File(TEST_DATA_DIR, "expression");
private static final File[] SOURCE_TEST_FILES = { private static final File[] SOURCE_TEST_FILES = {
new File("libraries/stdlib/test/ranges/RangeIterationTest.kt"), new File("libraries/stdlib/test/ranges/RangeIterationTest.kt"),
new File("libraries/stdlib/jvm/test/ranges/RangeIterationJVMTest.kt")
}; };
private static final Pattern TEST_FUN_PATTERN = Pattern.compile("@Test fun (\\w+)\\(\\) \\{.+?}", Pattern.DOTALL); private static final Pattern TEST_FUN_PATTERN = Pattern.compile("@Test fun (\\w+)\\(\\) \\{.+?}", Pattern.DOTALL);
@@ -104,38 +103,11 @@ public class GenerateRangesCodegenTestData {
.replace("\n", LineSeparator.getSystemLineSeparator().getSeparatorString()); .replace("\n", LineSeparator.getSystemLineSeparator().getSeparatorString());
} }
private static final List<String> INTEGER_PRIMITIVES = Arrays.asList("Integer", "Byte", "Short", "Long", "Character"); private static final List<String> INTEGER_PRIMITIVES = Arrays.asList("Int", "Byte", "Short", "Long", "Char");
// TODO: Use common MIN_VALUE/MAX_VALUE constants and remove these exclusions private static final List<String> IGNORED_FOR_JS_BACKEND = Collections.emptyList();
private static final List<String> IGNORED_FOR_JS_BACKEND = Arrays.asList(
"inexactDownToMinValue.kt",
"inexactToMaxValue.kt",
"maxValueMinusTwoToMaxValue.kt",
"maxValueToMaxValue.kt",
"maxValueToMinValue.kt",
"progressionDownToMinValue.kt",
"progressionMaxValueMinusTwoToMaxValue.kt",
"progressionMaxValueToMaxValue.kt",
"progressionMaxValueToMinValue.kt",
"progressionMinValueToMinValue.kt",
"overflowZeroToMinValue.kt",
"overflowZeroDownToMaxValue.kt"
);
private static final List<String> IGNORED_FOR_NATIVE_BACKEND = Arrays.asList( private static final List<String> IGNORED_FOR_NATIVE_BACKEND = Collections.emptyList();
"inexactDownToMinValue.kt",
"inexactToMaxValue.kt",
"maxValueMinusTwoToMaxValue.kt",
"maxValueToMaxValue.kt",
"maxValueToMinValue.kt",
"progressionDownToMinValue.kt",
"progressionMaxValueMinusTwoToMaxValue.kt",
"progressionMaxValueToMaxValue.kt",
"progressionMaxValueToMinValue.kt",
"progressionMinValueToMinValue.kt",
"overflowZeroToMinValue.kt",
"overflowZeroDownToMaxValue.kt"
);
private static void writeIgnoreBackendDirective(PrintWriter out, String backendName) { private static void writeIgnoreBackendDirective(PrintWriter out, String backendName) {
out.printf("// TODO: muted automatically, investigate should it be ran for %s or not%n", backendName); out.printf("// TODO: muted automatically, investigate should it be ran for %s or not%n", backendName);
@@ -165,14 +137,17 @@ public class GenerateRangesCodegenTestData {
out.println("// Auto-generated by " + GenerateRangesCodegenTestData.class.getName() + ". DO NOT EDIT!"); out.println("// Auto-generated by " + GenerateRangesCodegenTestData.class.getName() + ". DO NOT EDIT!");
out.println("// WITH_RUNTIME"); out.println("// WITH_RUNTIME");
out.println(); out.println();
if (generatedBody.contains("Max") || generatedBody.contains("Min")) { // Import min/max values, but only in case when the generated test case actually uses them (not to clutter tests which don't)
// Import min/max values, but only in case when the generated test case actually uses them (not to clutter tests which don't) out.println();
out.println(); for (String primitive : INTEGER_PRIMITIVES) {
for (String primitive : INTEGER_PRIMITIVES) { String maxV = "Max" + primitive.charAt(0);
out.println("import java.lang." + primitive + ".MAX_VALUE as Max" + primitive.charAt(0)); String minV = "Min" + primitive.charAt(0);
out.println("import java.lang." + primitive + ".MIN_VALUE as Min" + primitive.charAt(0)); if (generatedBody.contains(maxV))
} out.printf("const val %s = %s.MAX_VALUE", maxV, primitive).println();
if (generatedBody.contains(minV))
out.printf("const val %s = %s.MIN_VALUE", minV, primitive).println();
} }
out.println(); out.println();
out.println("fun box(): String {"); out.println("fun box(): String {");
out.print(generatedBody); out.print(generatedBody);
@@ -1,123 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package test.ranges
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
import kotlin.test.*
// Test data for codegen is generated from this class. If you change it, rerun GenerateTests
public class RangeIterationJVMTest : RangeIterationTestBase() {
@Test fun maxValueToMaxValue() {
doTest(MaxI..MaxI, MaxI, MaxI, 1, listOf(MaxI))
doTest(MaxB..MaxB, MaxB.toInt(), MaxB.toInt(), 1, listOf(MaxB.toInt()))
doTest(MaxS..MaxS, MaxS.toInt(), MaxS.toInt(), 1, listOf(MaxS.toInt()))
doTest(MaxL..MaxL, MaxL, MaxL, 1.toLong(), listOf(MaxL))
doTest(MaxC..MaxC, MaxC, MaxC, 1, listOf(MaxC))
}
@Test fun maxValueMinusTwoToMaxValue() {
doTest((MaxI - 2)..MaxI, MaxI - 2, MaxI, 1, listOf(MaxI - 2, MaxI - 1, MaxI))
doTest((MaxB - 2).toByte()..MaxB, (MaxB - 2).toInt(), MaxB.toInt(), 1, listOf((MaxB - 2).toInt(), (MaxB - 1).toInt(), MaxB.toInt()))
doTest((MaxS - 2).toShort()..MaxS, (MaxS - 2).toInt(), MaxS.toInt(), 1, listOf((MaxS - 2).toInt(), (MaxS - 1).toInt(), MaxS.toInt()))
doTest((MaxL - 2).toLong()..MaxL, (MaxL - 2).toLong(), MaxL, 1.toLong(), listOf((MaxL - 2).toLong(), (MaxL - 1).toLong(), MaxL))
doTest((MaxC - 2)..MaxC, (MaxC - 2), MaxC, 1, listOf((MaxC - 2), (MaxC - 1), MaxC))
}
@Test fun maxValueToMinValue() {
doTest(MaxI..MinI, MaxI, MinI, 1, listOf())
doTest(MaxB..MinB, MaxB.toInt(), MinB.toInt(), 1, listOf())
doTest(MaxS..MinS, MaxS.toInt(), MinS.toInt(), 1, listOf())
doTest(MaxL..MinL, MaxL, MinL, 1.toLong(), listOf())
doTest(MaxC..MinC, MaxC, MinC, 1, listOf())
}
@Test fun progressionMaxValueToMaxValue() {
doTest(MaxI..MaxI step 1, MaxI, MaxI, 1, listOf(MaxI))
doTest(MaxB..MaxB step 1, MaxB.toInt(), MaxB.toInt(), 1, listOf(MaxB.toInt()))
doTest(MaxS..MaxS step 1, MaxS.toInt(), MaxS.toInt(), 1, listOf(MaxS.toInt()))
doTest(MaxL..MaxL step 1, MaxL, MaxL, 1.toLong(), listOf(MaxL))
doTest(MaxC..MaxC step 1, MaxC, MaxC, 1, listOf(MaxC))
}
@Test fun progressionMaxValueMinusTwoToMaxValue() {
doTest((MaxI - 2)..MaxI step 2, MaxI - 2, MaxI, 2, listOf(MaxI - 2, MaxI))
doTest((MaxB - 2).toByte()..MaxB step 2, (MaxB - 2).toInt(), MaxB.toInt(), 2, listOf((MaxB - 2).toInt(), MaxB.toInt()))
doTest((MaxS - 2).toShort()..MaxS step 2, (MaxS - 2).toInt(), MaxS.toInt(), 2, listOf((MaxS - 2).toInt(), MaxS.toInt()))
doTest((MaxL - 2).toLong()..MaxL step 2, (MaxL - 2).toLong(), MaxL, 2.toLong(), listOf((MaxL - 2).toLong(), MaxL))
doTest((MaxC - 2)..MaxC step 2, (MaxC - 2), MaxC, 2, listOf((MaxC - 2), MaxC))
}
@Test fun progressionMaxValueToMinValue() {
doTest(MaxI..MinI step 1, MaxI, MinI, 1, listOf())
doTest(MaxB..MinB step 1, MaxB.toInt(), MinB.toInt(), 1, listOf())
doTest(MaxS..MinS step 1, MaxS.toInt(), MinS.toInt(), 1, listOf())
doTest(MaxL..MinL step 1, MaxL, MinL, 1.toLong(), listOf())
doTest(MaxC..MinC step 1, MaxC, MinC, 1, listOf())
}
@Test fun progressionMinValueToMinValue() {
doTest(MinI..MinI step 1, MinI, MinI, 1, listOf(MinI))
doTest(MinB..MinB step 1, MinB.toInt(), MinB.toInt(), 1, listOf(MinB.toInt()))
doTest(MinS..MinS step 1, MinS.toInt(), MinS.toInt(), 1, listOf(MinS.toInt()))
doTest(MinL..MinL step 1, MinL, MinL, 1.toLong(), listOf(MinL))
doTest(MinC..MinC step 1, MinC, MinC, 1, listOf(MinC))
}
@Test fun inexactToMaxValue() {
doTest((MaxI - 5)..MaxI step 3, MaxI - 5, MaxI - 2, 3, listOf(MaxI - 5, MaxI - 2))
doTest((MaxB - 5).toByte()..MaxB step 3, (MaxB - 5).toInt(), (MaxB - 2).toInt(), 3, listOf((MaxB - 5).toInt(), (MaxB - 2).toInt()))
doTest((MaxS - 5).toShort()..MaxS step 3, (MaxS - 5).toInt(), (MaxS - 2).toInt(), 3, listOf((MaxS - 5).toInt(), (MaxS - 2).toInt()))
doTest((MaxL - 5).toLong()..MaxL step 3, (MaxL - 5).toLong(), (MaxL - 2).toLong(), 3.toLong(), listOf((MaxL - 5).toLong(), (MaxL - 2).toLong()))
doTest((MaxC - 5)..MaxC step 3, (MaxC - 5), (MaxC - 2), 3, listOf((MaxC - 5), (MaxC - 2)))
}
@Test fun overflowZeroToMinValue() {
doTest(0..MinI step 3, 0, MinI, 3, listOf())
doTest(0L..MinL step 3, 0, MinL, 3.toLong(), listOf())
}
@Test fun progressionDownToMinValue() {
doTest((MinI + 2) downTo MinI step 1, MinI + 2, MinI, -1, listOf(MinI + 2, MinI + 1, MinI))
doTest((MinB + 2).toByte() downTo MinB step 1, (MinB + 2).toInt(), MinB.toInt(), -1, listOf((MinB + 2).toInt(), (MinB + 1).toInt(), MinB.toInt()))
doTest((MinS + 2).toShort() downTo MinS step 1, (MinS + 2).toInt(), MinS.toInt(), -1, listOf((MinS + 2).toInt(), (MinS + 1).toInt(), MinS.toInt()))
doTest((MinL + 2).toLong() downTo MinL step 1, (MinL + 2).toLong(), MinL, -1.toLong(), listOf((MinL + 2).toLong(), (MinL + 1).toLong(), MinL))
doTest((MinC + 2) downTo MinC step 1, (MinC + 2), MinC, -1, listOf((MinC + 2), (MinC + 1), MinC))
}
@Test fun inexactDownToMinValue() {
doTest((MinI + 5) downTo MinI step 3, MinI + 5, MinI + 2, -3, listOf(MinI + 5, MinI + 2))
doTest((MinB + 5).toByte() downTo MinB step 3, (MinB + 5).toInt(), (MinB + 2).toInt(), -3, listOf((MinB + 5).toInt(), (MinB + 2).toInt()))
doTest((MinS + 5).toShort() downTo MinS step 3, (MinS + 5).toInt(), (MinS + 2).toInt(), -3, listOf((MinS + 5).toInt(), (MinS + 2).toInt()))
doTest((MinL + 5).toLong() downTo MinL step 3, (MinL + 5).toLong(), (MinL + 2).toLong(), -3.toLong(), listOf((MinL + 5).toLong(), (MinL + 2).toLong()))
doTest((MinC + 5) downTo MinC step 3, (MinC + 5), (MinC + 2), -3, listOf((MinC + 5), (MinC + 2)))
}
@Test fun overflowZeroDownToMaxValue() {
doTest(0 downTo MaxI step 3, 0, MaxI, -3, listOf())
doTest(0 downTo MaxL step 3, 0, MaxL, -3.toLong(), listOf())
}
}
@@ -9,6 +9,18 @@ import test.collections.behaviors.iteratorBehavior
import test.collections.compare import test.collections.compare
import kotlin.test.* import kotlin.test.*
const val MaxI = Int.MAX_VALUE
const val MinI = Int.MIN_VALUE
const val MaxB = Byte.MAX_VALUE
const val MinB = Byte.MIN_VALUE
const val MaxS = Short.MAX_VALUE
const val MinS = Short.MIN_VALUE
const val MaxL = Long.MAX_VALUE
const val MinL = Long.MIN_VALUE
const val MaxC = Char.MAX_VALUE
const val MinC = Char.MIN_VALUE
// Test data for codegen is generated from this class. If you change it, rerun generateTests task
public open class RangeIterationTestBase { public open class RangeIterationTestBase {
public fun <N : Any> doTest( public fun <N : Any> doTest(
sequence: Iterable<N>, sequence: Iterable<N>,
@@ -235,4 +247,105 @@ public class RangeIterationTest : RangeIterationTestBase() {
doTest(('d' downTo 'a' step 2).reversed(), 'b', 'd', 2, listOf('b', 'd')) doTest(('d' downTo 'a' step 2).reversed(), 'b', 'd', 2, listOf('b', 'd'))
} }
@Test fun maxValueToMaxValue() {
doTest(MaxI..MaxI, MaxI, MaxI, 1, listOf(MaxI))
doTest(MaxB..MaxB, MaxB.toInt(), MaxB.toInt(), 1, listOf(MaxB.toInt()))
doTest(MaxS..MaxS, MaxS.toInt(), MaxS.toInt(), 1, listOf(MaxS.toInt()))
doTest(MaxL..MaxL, MaxL, MaxL, 1.toLong(), listOf(MaxL))
doTest(MaxC..MaxC, MaxC, MaxC, 1, listOf(MaxC))
}
@Test fun maxValueMinusTwoToMaxValue() {
doTest((MaxI - 2)..MaxI, MaxI - 2, MaxI, 1, listOf(MaxI - 2, MaxI - 1, MaxI))
doTest((MaxB - 2).toByte()..MaxB, (MaxB - 2).toInt(), MaxB.toInt(), 1, listOf((MaxB - 2).toInt(), (MaxB - 1).toInt(), MaxB.toInt()))
doTest((MaxS - 2).toShort()..MaxS, (MaxS - 2).toInt(), MaxS.toInt(), 1, listOf((MaxS - 2).toInt(), (MaxS - 1).toInt(), MaxS.toInt()))
doTest((MaxL - 2).toLong()..MaxL, (MaxL - 2).toLong(), MaxL, 1.toLong(), listOf((MaxL - 2).toLong(), (MaxL - 1).toLong(), MaxL))
doTest((MaxC - 2)..MaxC, (MaxC - 2), MaxC, 1, listOf((MaxC - 2), (MaxC - 1), MaxC))
}
@Test fun maxValueToMinValue() {
doTest(MaxI..MinI, MaxI, MinI, 1, listOf())
doTest(MaxB..MinB, MaxB.toInt(), MinB.toInt(), 1, listOf())
doTest(MaxS..MinS, MaxS.toInt(), MinS.toInt(), 1, listOf())
doTest(MaxL..MinL, MaxL, MinL, 1.toLong(), listOf())
doTest(MaxC..MinC, MaxC, MinC, 1, listOf())
}
@Test fun progressionMaxValueToMaxValue() {
doTest(MaxI..MaxI step 1, MaxI, MaxI, 1, listOf(MaxI))
doTest(MaxB..MaxB step 1, MaxB.toInt(), MaxB.toInt(), 1, listOf(MaxB.toInt()))
doTest(MaxS..MaxS step 1, MaxS.toInt(), MaxS.toInt(), 1, listOf(MaxS.toInt()))
doTest(MaxL..MaxL step 1, MaxL, MaxL, 1.toLong(), listOf(MaxL))
doTest(MaxC..MaxC step 1, MaxC, MaxC, 1, listOf(MaxC))
}
@Test fun progressionMaxValueMinusTwoToMaxValue() {
doTest((MaxI - 2)..MaxI step 2, MaxI - 2, MaxI, 2, listOf(MaxI - 2, MaxI))
doTest((MaxB - 2).toByte()..MaxB step 2, (MaxB - 2).toInt(), MaxB.toInt(), 2, listOf((MaxB - 2).toInt(), MaxB.toInt()))
doTest((MaxS - 2).toShort()..MaxS step 2, (MaxS - 2).toInt(), MaxS.toInt(), 2, listOf((MaxS - 2).toInt(), MaxS.toInt()))
doTest((MaxL - 2).toLong()..MaxL step 2, (MaxL - 2).toLong(), MaxL, 2.toLong(), listOf((MaxL - 2).toLong(), MaxL))
doTest((MaxC - 2)..MaxC step 2, (MaxC - 2), MaxC, 2, listOf((MaxC - 2), MaxC))
}
@Test fun progressionMaxValueToMinValue() {
doTest(MaxI..MinI step 1, MaxI, MinI, 1, listOf())
doTest(MaxB..MinB step 1, MaxB.toInt(), MinB.toInt(), 1, listOf())
doTest(MaxS..MinS step 1, MaxS.toInt(), MinS.toInt(), 1, listOf())
doTest(MaxL..MinL step 1, MaxL, MinL, 1.toLong(), listOf())
doTest(MaxC..MinC step 1, MaxC, MinC, 1, listOf())
}
@Test fun progressionMinValueToMinValue() {
doTest(MinI..MinI step 1, MinI, MinI, 1, listOf(MinI))
doTest(MinB..MinB step 1, MinB.toInt(), MinB.toInt(), 1, listOf(MinB.toInt()))
doTest(MinS..MinS step 1, MinS.toInt(), MinS.toInt(), 1, listOf(MinS.toInt()))
doTest(MinL..MinL step 1, MinL, MinL, 1.toLong(), listOf(MinL))
doTest(MinC..MinC step 1, MinC, MinC, 1, listOf(MinC))
}
@Test fun inexactToMaxValue() {
doTest((MaxI - 5)..MaxI step 3, MaxI - 5, MaxI - 2, 3, listOf(MaxI - 5, MaxI - 2))
doTest((MaxB - 5).toByte()..MaxB step 3, (MaxB - 5).toInt(), (MaxB - 2).toInt(), 3, listOf((MaxB - 5).toInt(), (MaxB - 2).toInt()))
doTest((MaxS - 5).toShort()..MaxS step 3, (MaxS - 5).toInt(), (MaxS - 2).toInt(), 3, listOf((MaxS - 5).toInt(), (MaxS - 2).toInt()))
doTest((MaxL - 5).toLong()..MaxL step 3, (MaxL - 5).toLong(), (MaxL - 2).toLong(), 3.toLong(), listOf((MaxL - 5).toLong(), (MaxL - 2).toLong()))
doTest((MaxC - 5)..MaxC step 3, (MaxC - 5), (MaxC - 2), 3, listOf((MaxC - 5), (MaxC - 2)))
}
@Test fun overflowZeroToMinValue() {
doTest(0..MinI step 3, 0, MinI, 3, listOf())
doTest(0L..MinL step 3, 0, MinL, 3.toLong(), listOf())
}
@Test fun progressionDownToMinValue() {
doTest((MinI + 2) downTo MinI step 1, MinI + 2, MinI, -1, listOf(MinI + 2, MinI + 1, MinI))
doTest((MinB + 2).toByte() downTo MinB step 1, (MinB + 2).toInt(), MinB.toInt(), -1, listOf((MinB + 2).toInt(), (MinB + 1).toInt(), MinB.toInt()))
doTest((MinS + 2).toShort() downTo MinS step 1, (MinS + 2).toInt(), MinS.toInt(), -1, listOf((MinS + 2).toInt(), (MinS + 1).toInt(), MinS.toInt()))
doTest((MinL + 2).toLong() downTo MinL step 1, (MinL + 2).toLong(), MinL, -1.toLong(), listOf((MinL + 2).toLong(), (MinL + 1).toLong(), MinL))
doTest((MinC + 2) downTo MinC step 1, (MinC + 2), MinC, -1, listOf((MinC + 2), (MinC + 1), MinC))
}
@Test fun inexactDownToMinValue() {
doTest((MinI + 5) downTo MinI step 3, MinI + 5, MinI + 2, -3, listOf(MinI + 5, MinI + 2))
doTest((MinB + 5).toByte() downTo MinB step 3, (MinB + 5).toInt(), (MinB + 2).toInt(), -3, listOf((MinB + 5).toInt(), (MinB + 2).toInt()))
doTest((MinS + 5).toShort() downTo MinS step 3, (MinS + 5).toInt(), (MinS + 2).toInt(), -3, listOf((MinS + 5).toInt(), (MinS + 2).toInt()))
doTest((MinL + 5).toLong() downTo MinL step 3, (MinL + 5).toLong(), (MinL + 2).toLong(), -3.toLong(), listOf((MinL + 5).toLong(), (MinL + 2).toLong()))
doTest((MinC + 5) downTo MinC step 3, (MinC + 5), (MinC + 2), -3, listOf((MinC + 5), (MinC + 2)))
}
@Test fun overflowZeroDownToMaxValue() {
doTest(0 downTo MaxI step 3, 0, MaxI, -3, listOf())
doTest(0 downTo MaxL step 3, 0, MaxL, -3.toLong(), listOf())
}
} }