diff --git a/compiler/testData/codegen/box/ranges/expression/emptyDownto.kt b/compiler/testData/codegen/box/ranges/expression/emptyDownto.kt index c1ce86cfdc5..a49a4d9f8b6 100644 --- a/compiler/testData/codegen/box/ranges/expression/emptyDownto.kt +++ b/compiler/testData/codegen/box/ranges/expression/emptyDownto.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for 'a' downTo 'z': $list5" } - val list6 = ArrayList() - val range6 = 5u downTo 10u - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for 5u downTo 10u: $list6" - } - - val list7 = ArrayList() - val range7 = 5u.toUByte() downTo 10u.toUByte() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for 5u.toUByte() downTo 10u.toUByte(): $list7" - } - - val list8 = ArrayList() - val range8 = 5u.toUShort() downTo 10u.toUShort() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf()) { - return "Wrong elements for 5u.toUShort() downTo 10u.toUShort(): $list8" - } - - val list9 = ArrayList() - val range9 = 5uL downTo 10uL - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf()) { - return "Wrong elements for 5uL downTo 10uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/emptyRange.kt b/compiler/testData/codegen/box/ranges/expression/emptyRange.kt index 12d0bd0bf61..a7c6fbee514 100644 --- a/compiler/testData/codegen/box/ranges/expression/emptyRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/emptyRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for 'z'..'a': $list5" } - val list6 = ArrayList() - val range6 = 10u..5u - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for 10u..5u: $list6" - } - - val list7 = ArrayList() - val range7 = 10u.toUByte()..5u.toUByte() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for 10u.toUByte()..5u.toUByte(): $list7" - } - - val list8 = ArrayList() - val range8 = 10u.toUShort()..5u.toUShort() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf()) { - return "Wrong elements for 10u.toUShort()..5u.toUShort(): $list8" - } - - val list9 = ArrayList() - val range9 = 10uL..5uL - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf()) { - return "Wrong elements for 10uL..5uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt index e50e8abab67..a592036e53f 100644 --- a/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,10 +8,6 @@ const val MinB = Byte.MIN_VALUE const val MinS = Short.MIN_VALUE const val MinL = Long.MIN_VALUE const val MinC = Char.MIN_VALUE -const val MinUI = UInt.MIN_VALUE -const val MinUB = UByte.MIN_VALUE -const val MinUS = UShort.MIN_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -67,45 +60,5 @@ fun box(): String { return "Wrong elements for (MinC + 5) downTo MinC step 3: $list5" } - val list6 = ArrayList() - val range6 = (MinUI + 5u) downTo MinUI step 3 - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MinUI + 5u, MinUI + 2u)) { - return "Wrong elements for (MinUI + 5u) downTo MinUI step 3: $list6" - } - - val list7 = ArrayList() - val range7 = (MinUB + 5u).toUByte() downTo MinUB step 3 - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf((MinUB + 5u).toUInt(), (MinUB + 2u).toUInt())) { - return "Wrong elements for (MinUB + 5u).toUByte() downTo MinUB step 3: $list7" - } - - val list8 = ArrayList() - val range8 = (MinUS + 5u).toUShort() downTo MinUS step 3 - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf((MinUS + 5u).toUInt(), (MinUS + 2u).toUInt())) { - return "Wrong elements for (MinUS + 5u).toUShort() downTo MinUS step 3: $list8" - } - - val list9 = ArrayList() - val range9 = MinUL + 5u downTo MinUL step 3 - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf((MinUL + 5u), (MinUL + 2u))) { - return "Wrong elements for MinUL + 5u downTo MinUL step 3: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt index 9d3718458bc..4f20935fbe9 100644 --- a/compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for 'd' downTo 'a' step 2: $list5" } - val list6 = ArrayList() - val range6 = 8u downTo 3u step 2 - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(8u, 6u, 4u)) { - return "Wrong elements for 8u downTo 3u step 2: $list6" - } - - val list7 = ArrayList() - val range7 = 8u.toUByte() downTo 3u.toUByte() step 2 - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(8u, 6u, 4u)) { - return "Wrong elements for 8u.toUByte() downTo 3u.toUByte() step 2: $list7" - } - - val list8 = ArrayList() - val range8 = 8u.toUShort() downTo 3u.toUShort() step 2 - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(8u, 6u, 4u)) { - return "Wrong elements for 8u.toUShort() downTo 3u.toUShort() step 2: $list8" - } - - val list9 = ArrayList() - val range9 = 8uL downTo 3uL step 2L - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(8u, 6u, 4u)) { - return "Wrong elements for 8uL downTo 3uL step 2L: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt b/compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt index 46519530a7a..3b58dfb0323 100644 --- a/compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for 'a'..'d' step 2: $list5" } - val list6 = ArrayList() - val range6 = 3u..8u step 2 - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(3u, 5u, 7u)) { - return "Wrong elements for 3u..8u step 2: $list6" - } - - val list7 = ArrayList() - val range7 = 3u.toUByte()..8u.toUByte() step 2 - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(3u, 5u, 7u)) { - return "Wrong elements for 3u.toUByte()..8u.toUByte() step 2: $list7" - } - - val list8 = ArrayList() - val range8 = 3u.toUShort()..8u.toUShort() step 2 - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(3u, 5u, 7u)) { - return "Wrong elements for 3u.toUShort()..8u.toUShort() step 2: $list8" - } - - val list9 = ArrayList() - val range9 = 3uL..8uL step 2L - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(3u, 5u, 7u)) { - return "Wrong elements for 3uL..8uL step 2L: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt index 59cf1edcb7c..ae54707d932 100644 --- a/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,10 +8,6 @@ const val MaxB = Byte.MAX_VALUE const val MaxS = Short.MAX_VALUE const val MaxL = Long.MAX_VALUE const val MaxC = Char.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUB = UByte.MAX_VALUE -const val MaxUS = UShort.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -67,45 +60,5 @@ fun box(): String { return "Wrong elements for (MaxC - 5)..MaxC step 3: $list5" } - val list6 = ArrayList() - val range6 = (MaxUI - 5u)..MaxUI step 3 - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MaxUI - 5u, MaxUI - 2u)) { - return "Wrong elements for (MaxUI - 5u)..MaxUI step 3: $list6" - } - - val list7 = ArrayList() - val range7 = (MaxUB - 5u).toUByte()..MaxUB step 3 - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf((MaxUB - 5u).toUInt(), (MaxUB - 2u).toUInt())) { - return "Wrong elements for (MaxUB - 5u).toUByte()..MaxUB step 3: $list7" - } - - val list8 = ArrayList() - val range8 = (MaxUS - 5u).toUShort()..MaxUS step 3 - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf((MaxUS - 5u).toUInt(), (MaxUS - 2u).toUInt())) { - return "Wrong elements for (MaxUS - 5u).toUShort()..MaxUS step 3: $list8" - } - - val list9 = ArrayList() - val range9 = (MaxUL - 5u)..MaxUL step 3 - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf((MaxUL - 5u), (MaxUL - 2u))) { - return "Wrong elements for (MaxUL - 5u)..MaxUL step 3: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt index cd850de6d77..c293d3290ad 100644 --- a/compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,8 +8,6 @@ const val MaxB = Byte.MAX_VALUE const val MaxS = Short.MAX_VALUE const val MaxL = Long.MAX_VALUE const val MaxC = Char.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -65,25 +60,5 @@ fun box(): String { return "Wrong elements for (MaxC - 2)..MaxC: $list5" } - val list6 = ArrayList() - val range6 = (MaxUI - 2u)..MaxUI - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MaxUI - 2u, MaxUI - 1u, MaxUI)) { - return "Wrong elements for (MaxUI - 2u)..MaxUI: $list6" - } - - val list7 = ArrayList() - val range7 = (MaxUL - 2u)..MaxUL - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(MaxUL - 2u, MaxUL - 1u, MaxUL)) { - return "Wrong elements for (MaxUL - 2u)..MaxUL: $list7" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt index b68665b6b6b..3e9d5db76b2 100644 --- a/compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,8 +8,6 @@ const val MaxB = Byte.MAX_VALUE const val MaxS = Short.MAX_VALUE const val MaxL = Long.MAX_VALUE const val MaxC = Char.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -65,25 +60,5 @@ fun box(): String { return "Wrong elements for MaxC..MaxC: $list5" } - val list6 = ArrayList() - val range6 = MaxUI..MaxUI - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MaxUI)) { - return "Wrong elements for MaxUI..MaxUI: $list6" - } - - val list7 = ArrayList() - val range7 = MaxUL..MaxUL - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(MaxUL)) { - return "Wrong elements for MaxUL..MaxUL: $list7" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt index 5393fbf6568..d6d328d3d54 100644 --- a/compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -16,10 +13,6 @@ const val MaxL = Long.MAX_VALUE const val MinL = Long.MIN_VALUE const val MaxC = Char.MAX_VALUE const val MinC = Char.MIN_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MinUI = UInt.MIN_VALUE -const val MaxUL = ULong.MAX_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -72,25 +65,5 @@ fun box(): String { return "Wrong elements for MaxC..MinC: $list5" } - val list6 = ArrayList() - val range6 = MaxUI..MinUI - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for MaxUI..MinUI: $list6" - } - - val list7 = ArrayList() - val range7 = MaxUL..MinUL - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for MaxUL..MinUL: $list7" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt b/compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt index 9cf1ac55c61..e1e501bd110 100644 --- a/compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt +++ b/compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for 'k' downTo 'k': $list5" } - val list6 = ArrayList() - val range6 = 5u downTo 5u - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(5u)) { - return "Wrong elements for 5u downTo 5u: $list6" - } - - val list7 = ArrayList() - val range7 = 5u.toUByte() downTo 5u.toUByte() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(5u)) { - return "Wrong elements for 5u.toUByte() downTo 5u.toUByte(): $list7" - } - - val list8 = ArrayList() - val range8 = 5u.toUShort() downTo 5u.toUShort() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(5u)) { - return "Wrong elements for 5u.toUShort() downTo 5u.toUShort(): $list8" - } - - val list9 = ArrayList() - val range9 = 5uL downTo 5uL - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(5uL)) { - return "Wrong elements for 5uL downTo 5uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/oneElementRange.kt b/compiler/testData/codegen/box/ranges/expression/oneElementRange.kt index bed1848035a..ec086574042 100644 --- a/compiler/testData/codegen/box/ranges/expression/oneElementRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/oneElementRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for 'k'..'k': $list5" } - val list6 = ArrayList() - val range6 = 5u..5u - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(5u)) { - return "Wrong elements for 5u..5u: $list6" - } - - val list7 = ArrayList() - val range7 = 5u.toUByte()..5u.toUByte() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(5u)) { - return "Wrong elements for 5u.toUByte()..5u.toUByte(): $list7" - } - - val list8 = ArrayList() - val range8 = 5u.toUShort()..5u.toUShort() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(5u)) { - return "Wrong elements for 5u.toUShort()..5u.toUShort(): $list8" - } - - val list9 = ArrayList() - val range9 = 5uL..5uL - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(5uL)) { - return "Wrong elements for 5uL..5uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/openRange.kt b/compiler/testData/codegen/box/ranges/expression/openRange.kt index 828ccba1065..965ed9d8e8d 100644 --- a/compiler/testData/codegen/box/ranges/expression/openRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/openRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for 'a' until 'd': $list5" } - val list6 = ArrayList() - val range6 = 1u until 5u - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(1u, 2u, 3u, 4u)) { - return "Wrong elements for 1u until 5u: $list6" - } - - val list7 = ArrayList() - val range7 = 1u.toUByte() until 5u.toUByte() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(1u, 2u, 3u, 4u)) { - return "Wrong elements for 1u.toUByte() until 5u.toUByte(): $list7" - } - - val list8 = ArrayList() - val range8 = 1u.toUShort() until 5u.toUShort() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(1u, 2u, 3u, 4u)) { - return "Wrong elements for 1u.toUShort() until 5u.toUShort(): $list8" - } - - val list9 = ArrayList() - val range9 = 1uL until 5uL - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(1u, 2u, 3u, 4u)) { - return "Wrong elements for 1uL until 5uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/overflowZeroDownToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/overflowZeroDownToMaxValue.kt index f089b68d775..4bea53e1dce 100644 --- a/compiler/testData/codegen/box/ranges/expression/overflowZeroDownToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/overflowZeroDownToMaxValue.kt @@ -5,8 +5,6 @@ const val MaxI = Int.MAX_VALUE const val MaxL = Long.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -29,25 +27,5 @@ fun box(): String { return "Wrong elements for 0 downTo MaxL step 3: $list2" } - val list3 = ArrayList() - val range3 = 0u downTo MaxUI step 3 - for (i in range3) { - list3.add(i) - if (list3.size > 23) break - } - if (list3 != listOf()) { - return "Wrong elements for 0u downTo MaxUI step 3: $list3" - } - - val list4 = ArrayList() - val range4 = 0uL downTo MaxUL step 3 - for (i in range4) { - list4.add(i) - if (list4.size > 23) break - } - if (list4 != listOf()) { - return "Wrong elements for 0uL downTo MaxUL step 3: $list4" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/overflowZeroToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/overflowZeroToMinValue.kt index fd905e2d7fa..c8114c1f0e5 100644 --- a/compiler/testData/codegen/box/ranges/expression/overflowZeroToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/overflowZeroToMinValue.kt @@ -1,15 +1,10 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME const val MinI = Int.MIN_VALUE const val MinL = Long.MIN_VALUE -const val MinUI = UInt.MIN_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -32,25 +27,5 @@ fun box(): String { return "Wrong elements for 0L..MinL step 3: $list2" } - val list3 = ArrayList() - val range3 = 1u..MinUI step 3 - for (i in range3) { - list3.add(i) - if (list3.size > 23) break - } - if (list3 != listOf()) { - return "Wrong elements for 1u..MinUI step 3: $list3" - } - - val list4 = ArrayList() - val range4 = 1uL..MinUL step 3 - for (i in range4) { - list4.add(i) - if (list4.size > 23) break - } - if (list4 != listOf()) { - return "Wrong elements for 1uL..MinUL step 3: $list4" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt index 901dc6376e1..197e3b9821e 100644 --- a/compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,10 +8,6 @@ const val MinB = Byte.MIN_VALUE const val MinS = Short.MIN_VALUE const val MinL = Long.MIN_VALUE const val MinC = Char.MIN_VALUE -const val MinUI = UInt.MIN_VALUE -const val MinUB = UByte.MIN_VALUE -const val MinUS = UShort.MIN_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -67,45 +60,5 @@ fun box(): String { return "Wrong elements for (MinC + 2) downTo MinC step 1: $list5" } - val list6 = ArrayList() - val range6 = (MinUI + 2u) downTo MinUI step 1 - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MinUI + 2u, MinUI + 1u, MinUI)) { - return "Wrong elements for (MinUI + 2u) downTo MinUI step 1: $list6" - } - - val list7 = ArrayList() - val range7 = (MinUB + 2u).toUByte() downTo MinUB step 1 - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf((MinUB + 2u).toUInt(), (MinUB + 1u).toUInt(), MinUB.toUInt())) { - return "Wrong elements for (MinUB + 2u).toUByte() downTo MinUB step 1: $list7" - } - - val list8 = ArrayList() - val range8 = (MinUS + 2u).toUShort() downTo MinUS step 1 - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf((MinUS + 2u).toUInt(), (MinUS + 1u).toUInt(), MinUS.toUInt())) { - return "Wrong elements for (MinUS + 2u).toUShort() downTo MinUS step 1: $list8" - } - - val list9 = ArrayList() - val range9 = (MinUL + 2u) downTo MinUL step 1 - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf((MinUL + 2u), (MinUL + 1u), MinUL)) { - return "Wrong elements for (MinUL + 2u) downTo MinUL step 1: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt index c1c176efc61..d0a1626c111 100644 --- a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,10 +8,6 @@ const val MaxB = Byte.MAX_VALUE const val MaxS = Short.MAX_VALUE const val MaxL = Long.MAX_VALUE const val MaxC = Char.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUB = UByte.MAX_VALUE -const val MaxUS = UShort.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -67,45 +60,5 @@ fun box(): String { return "Wrong elements for (MaxC - 2)..MaxC step 2: $list5" } - val list6 = ArrayList() - val range6 = (MaxUI - 2u)..MaxUI step 2 - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MaxUI - 2u, MaxUI)) { - return "Wrong elements for (MaxUI - 2u)..MaxUI step 2: $list6" - } - - val list7 = ArrayList() - val range7 = (MaxUB - 2u).toUByte()..MaxUB step 2 - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf((MaxUB - 2u).toUInt(), MaxUB.toUInt())) { - return "Wrong elements for (MaxUB - 2u).toUByte()..MaxUB step 2: $list7" - } - - val list8 = ArrayList() - val range8 = (MaxUS - 2u).toUShort()..MaxUS step 2 - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf((MaxUS - 2u).toUInt(), MaxUS.toUInt())) { - return "Wrong elements for (MaxUS - 2u).toUShort()..MaxUS step 2: $list8" - } - - val list9 = ArrayList() - val range9 = MaxUL - 2u..MaxUL step 2 - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(MaxUL - 2u, MaxUL)) { - return "Wrong elements for MaxUL - 2u..MaxUL step 2: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt index 441222a3a09..358bf03cd83 100644 --- a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,8 +8,6 @@ const val MaxB = Byte.MAX_VALUE const val MaxS = Short.MAX_VALUE const val MaxL = Long.MAX_VALUE const val MaxC = Char.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -65,25 +60,5 @@ fun box(): String { return "Wrong elements for MaxC..MaxC step 1: $list5" } - val list6 = ArrayList() - val range6 = MaxUI..MaxUI step 1 - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MaxUI)) { - return "Wrong elements for MaxUI..MaxUI step 1: $list6" - } - - val list7 = ArrayList() - val range7 = MaxUL..MaxUL step 1 - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(MaxUL)) { - return "Wrong elements for MaxUL..MaxUL step 1: $list7" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt index ff6e62aa81a..6d35923a49e 100644 --- a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -16,14 +13,6 @@ const val MaxL = Long.MAX_VALUE const val MinL = Long.MIN_VALUE const val MaxC = Char.MAX_VALUE const val MinC = Char.MIN_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MinUI = UInt.MIN_VALUE -const val MaxUB = UByte.MAX_VALUE -const val MinUB = UByte.MIN_VALUE -const val MaxUS = UShort.MAX_VALUE -const val MinUS = UShort.MIN_VALUE -const val MaxUL = ULong.MAX_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -76,45 +65,5 @@ fun box(): String { return "Wrong elements for MaxC..MinC step 1: $list5" } - val list6 = ArrayList() - val range6 = MaxUI..MinUI step 1 - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for MaxUI..MinUI step 1: $list6" - } - - val list7 = ArrayList() - val range7 = MaxUB..MinUB step 1 - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for MaxUB..MinUB step 1: $list7" - } - - val list8 = ArrayList() - val range8 = MaxUS..MinUS step 1 - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf()) { - return "Wrong elements for MaxUS..MinUS step 1: $list8" - } - - val list9 = ArrayList() - val range9 = MaxUL..MinUL step 1 - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf()) { - return "Wrong elements for MaxUL..MinUL step 1: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt index 752e374a29c..527d1b71135 100644 --- a/compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,10 +8,6 @@ const val MinB = Byte.MIN_VALUE const val MinS = Short.MIN_VALUE const val MinL = Long.MIN_VALUE const val MinC = Char.MIN_VALUE -const val MinUI = UInt.MIN_VALUE -const val MinUB = UByte.MIN_VALUE -const val MinUS = UShort.MIN_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -67,45 +60,5 @@ fun box(): String { return "Wrong elements for MinC..MinC step 1: $list5" } - val list6 = ArrayList() - val range6 = MinUI..MinUI step 1 - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MinUI)) { - return "Wrong elements for MinUI..MinUI step 1: $list6" - } - - val list7 = ArrayList() - val range7 = MinUB..MinUB step 1 - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(MinUB.toUInt())) { - return "Wrong elements for MinUB..MinUB step 1: $list7" - } - - val list8 = ArrayList() - val range8 = MinUS..MinUS step 1 - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(MinUS.toUInt())) { - return "Wrong elements for MinUS..MinUS step 1: $list8" - } - - val list9 = ArrayList() - val range9 = MinUL..MinUL step 1 - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(MinUL)) { - return "Wrong elements for MinUL..MinUL step 1: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt b/compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt index cc0abcfc4d6..cfa33912e6a 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for ('c' downTo 'a').reversed(): $list5" } - val list6 = ArrayList() - val range6 = (5u downTo 3u).reversed() - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (5u downTo 3u).reversed(): $list6" - } - - val list7 = ArrayList() - val range7 = (5u.toUByte() downTo 3u.toUByte()).reversed() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (5u.toUByte() downTo 3u.toUByte()).reversed(): $list7" - } - - val list8 = ArrayList() - val range8 = (5u.toUShort() downTo 3u.toUShort()).reversed() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (5u.toUShort() downTo 3u.toUShort()).reversed(): $list8" - } - - val list9 = ArrayList() - val range9 = (5uL downTo 3uL).reversed() - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (5uL downTo 3uL).reversed(): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt b/compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt index 1a68db39aca..bc07848c373 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for ('a' downTo 'c').reversed(): $list5" } - val list6 = ArrayList() - val range6 = (3u downTo 5u).reversed() - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for (3u downTo 5u).reversed(): $list6" - } - - val list7 = ArrayList() - val range7 = (3u.toUByte() downTo 5u.toUByte()).reversed() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for (3u.toUByte() downTo 5u.toUByte()).reversed(): $list7" - } - - val list8 = ArrayList() - val range8 = (3u.toUShort() downTo 5u.toUShort()).reversed() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf()) { - return "Wrong elements for (3u.toUShort() downTo 5u.toUShort()).reversed(): $list8" - } - - val list9 = ArrayList() - val range9 = (3uL downTo 5uL).reversed() - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf()) { - return "Wrong elements for (3uL downTo 5uL).reversed(): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt b/compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt index 6505ec68b03..05f396742ec 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for ('c'..'a').reversed(): $list5" } - val list6 = ArrayList() - val range6 = (5u..3u).reversed() - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for (5u..3u).reversed(): $list6" - } - - val list7 = ArrayList() - val range7 = (5u.toUByte()..3u.toUByte()).reversed() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for (5u.toUByte()..3u.toUByte()).reversed(): $list7" - } - - val list8 = ArrayList() - val range8 = (5u.toUShort()..3u.toUShort()).reversed() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf()) { - return "Wrong elements for (5u.toUShort()..3u.toUShort()).reversed(): $list8" - } - - val list9 = ArrayList() - val range9 = (5uL..3uL).reversed() - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf()) { - return "Wrong elements for (5uL..3uL).reversed(): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt index dd36184e690..81940e97584 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for ('d' downTo 'a' step 2).reversed(): $list5" } - val list6 = ArrayList() - val range6 = (8u downTo 3u step 2).reversed() - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(4u, 6u, 8u)) { - return "Wrong elements for (8u downTo 3u step 2).reversed(): $list6" - } - - val list7 = ArrayList() - val range7 = (8u.toUByte() downTo 3u.toUByte() step 2).reversed() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(4u, 6u, 8u)) { - return "Wrong elements for (8u.toUByte() downTo 3u.toUByte() step 2).reversed(): $list7" - } - - val list8 = ArrayList() - val range8 = (8u.toUShort() downTo 3u.toUShort() step 2).reversed() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(4u, 6u, 8u)) { - return "Wrong elements for (8u.toUShort() downTo 3u.toUShort() step 2).reversed(): $list8" - } - - val list9 = ArrayList() - val range9 = (8uL downTo 3uL step 2L).reversed() - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(4u, 6u, 8u)) { - return "Wrong elements for (8uL downTo 3uL step 2L).reversed(): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/reversedRange.kt b/compiler/testData/codegen/box/ranges/expression/reversedRange.kt index e9519b40b04..51da1df8774 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -48,35 +45,5 @@ fun box(): String { return "Wrong elements for ('a'..'c').reversed(): $list4" } - val list5 = ArrayList() - val range5 = (3u..5u).reversed() - for (i in range5) { - list5.add(i) - if (list5.size > 23) break - } - if (list5 != listOf(5u, 4u, 3u)) { - return "Wrong elements for (3u..5u).reversed(): $list5" - } - - val list6 = ArrayList() - val range6 = (3u.toUShort()..5u.toUShort()).reversed() - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(5u, 4u, 3u)) { - return "Wrong elements for (3u.toUShort()..5u.toUShort()).reversed(): $list6" - } - - val list7 = ArrayList() - val range7 = (3uL..5uL).reversed() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(5u, 4u, 3u)) { - return "Wrong elements for (3uL..5uL).reversed(): $list7" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt index efca6bc854b..9e22b65f8c0 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for ('c'..'g' step 2).reversed(): $list5" } - val list6 = ArrayList() - val range6 = (3u..9u step 2).reversed() - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for (3u..9u step 2).reversed(): $list6" - } - - val list7 = ArrayList() - val range7 = (3u.toUByte()..9u.toUByte() step 2).reversed() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for (3u.toUByte()..9u.toUByte() step 2).reversed(): $list7" - } - - val list8 = ArrayList() - val range8 = (3u.toUShort()..9u.toUShort() step 2).reversed() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for (3u.toUShort()..9u.toUShort() step 2).reversed(): $list8" - } - - val list9 = ArrayList() - val range9 = (3uL..9uL step 2L).reversed() - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for (3uL..9uL step 2L).reversed(): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt b/compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt index c81bd5b6e56..015ec164730 100644 --- a/compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt +++ b/compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for 'g' downTo 'c': $list5" } - val list6 = ArrayList() - val range6 = 5u downTo 3u - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(5u, 4u, 3u)) { - return "Wrong elements for 5u downTo 3u: $list6" - } - - val list7 = ArrayList() - val range7 = 5u.toUByte() downTo 3u.toUByte() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(5u, 4u, 3u)) { - return "Wrong elements for 5u.toUByte() downTo 3u.toUByte(): $list7" - } - - val list8 = ArrayList() - val range8 = 5u.toUShort() downTo 3u.toUShort() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(5u, 4u, 3u)) { - return "Wrong elements for 5u.toUShort() downTo 3u.toUShort(): $list8" - } - - val list9 = ArrayList() - val range9 = 5uL downTo 3uL - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(5u, 4u, 3u)) { - return "Wrong elements for 5uL downTo 3uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/simpleRange.kt b/compiler/testData/codegen/box/ranges/expression/simpleRange.kt index 47bdeec3ad2..634155eea17 100644 --- a/compiler/testData/codegen/box/ranges/expression/simpleRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/simpleRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for 'c'..'g': $list5" } - val list6 = ArrayList() - val range6 = 3u..5u - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(3u, 4u, 5u)) { - return "Wrong elements for 3u..5u: $list6" - } - - val list7 = ArrayList() - val range7 = 3.toUByte()..5.toUByte() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(3u, 4u, 5u)) { - return "Wrong elements for 3.toUByte()..5.toUByte(): $list7" - } - - val list8 = ArrayList() - val range8 = 3.toUShort()..5.toUShort() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(3u, 4u, 5u)) { - return "Wrong elements for 3.toUShort()..5.toUShort(): $list8" - } - - val list9 = ArrayList() - val range9 = 3uL..5uL - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(3u, 4u, 5u)) { - return "Wrong elements for 3uL..5uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt b/compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt index e01201303c5..2d56b9890c2 100644 --- a/compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt +++ b/compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for (\"ace\"[1])..(\"age\"[1]): $list5" } - val list6 = ArrayList() - val range6 = (1u + 2u)..(6u - 1u) - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (1u + 2u)..(6u - 1u): $list6" - } - - val list7 = ArrayList() - val range7 = (1u.toUByte() + 2u.toUByte()).toUByte()..(6u.toUByte() - 1u.toUByte()).toUByte() - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (1u.toUByte() + 2u.toUByte()).toUByte()..(6u.toUByte() - 1u.toUByte()).toUByte(): $list7" - } - - val list8 = ArrayList() - val range8 = (1u.toUShort() + 2u.toUShort()).toUShort()..(6u.toUShort() - 1u.toUShort()).toUShort() - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (1u.toUShort() + 2u.toUShort()).toUShort()..(6u.toUShort() - 1u.toUShort()).toUShort(): $list8" - } - - val list9 = ArrayList() - val range9 = (1uL + 2uL)..(6uL - 1uL) - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (1uL + 2uL)..(6uL - 1uL): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt index d3fe24d9fe6..14997ebbf2e 100644 --- a/compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for 'g' downTo 'c' step 2: $list5" } - val list6 = ArrayList() - val range6 = 9u downTo 3u step 2 - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for 9u downTo 3u step 2: $list6" - } - - val list7 = ArrayList() - val range7 = 9u.toUByte() downTo 3u.toUByte() step 2 - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for 9u.toUByte() downTo 3u.toUByte() step 2: $list7" - } - - val list8 = ArrayList() - val range8 = 9u.toUShort() downTo 3u.toUShort() step 2 - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for 9u.toUShort() downTo 3u.toUShort() step 2: $list8" - } - - val list9 = ArrayList() - val range9 = 9uL downTo 3uL step 2L - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for 9uL downTo 3uL step 2L: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt index 9f5132eee93..128176fe584 100644 --- a/compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -58,45 +55,5 @@ fun box(): String { return "Wrong elements for 'c'..'g' step 2: $list5" } - val list6 = ArrayList() - val range6 = 3u..9u step 2 - for (i in range6) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(3u, 5u, 7u, 9u)) { - return "Wrong elements for 3u..9u step 2: $list6" - } - - val list7 = ArrayList() - val range7 = 3u.toUByte()..9u.toUByte() step 2 - for (i in range7) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(3u, 5u, 7u, 9u)) { - return "Wrong elements for 3u.toUByte()..9u.toUByte() step 2: $list7" - } - - val list8 = ArrayList() - val range8 = 3u.toUShort()..9u.toUShort() step 2 - for (i in range8) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(3u, 5u, 7u, 9u)) { - return "Wrong elements for 3u.toUShort()..9u.toUShort() step 2: $list8" - } - - val list9 = ArrayList() - val range9 = 3uL..9uL step 2L - for (i in range9) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(3u, 5u, 7u, 9u)) { - return "Wrong elements for 3uL..9uL step 2L: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/emptyDownto.kt b/compiler/testData/codegen/box/ranges/literal/emptyDownto.kt index a94e017d373..433910468ac 100644 --- a/compiler/testData/codegen/box/ranges/literal/emptyDownto.kt +++ b/compiler/testData/codegen/box/ranges/literal/emptyDownto.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for 'a' downTo 'z': $list5" } - val list6 = ArrayList() - for (i in 5u downTo 10u) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for 5u downTo 10u: $list6" - } - - val list7 = ArrayList() - for (i in 5u.toUByte() downTo 10u.toUByte()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for 5u.toUByte() downTo 10u.toUByte(): $list7" - } - - val list8 = ArrayList() - for (i in 5u.toUShort() downTo 10u.toUShort()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf()) { - return "Wrong elements for 5u.toUShort() downTo 10u.toUShort(): $list8" - } - - val list9 = ArrayList() - for (i in 5uL downTo 10uL) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf()) { - return "Wrong elements for 5uL downTo 10uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/emptyRange.kt b/compiler/testData/codegen/box/ranges/literal/emptyRange.kt index e10c5f54c63..73583591445 100644 --- a/compiler/testData/codegen/box/ranges/literal/emptyRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/emptyRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for 'z'..'a': $list5" } - val list6 = ArrayList() - for (i in 10u..5u) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for 10u..5u: $list6" - } - - val list7 = ArrayList() - for (i in 10u.toUByte()..5u.toUByte()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for 10u.toUByte()..5u.toUByte(): $list7" - } - - val list8 = ArrayList() - for (i in 10u.toUShort()..5u.toUShort()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf()) { - return "Wrong elements for 10u.toUShort()..5u.toUShort(): $list8" - } - - val list9 = ArrayList() - for (i in 10uL..5uL) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf()) { - return "Wrong elements for 10uL..5uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt index a1de3fab8a5..608831ca053 100644 --- a/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,10 +8,6 @@ const val MinB = Byte.MIN_VALUE const val MinS = Short.MIN_VALUE const val MinL = Long.MIN_VALUE const val MinC = Char.MIN_VALUE -const val MinUI = UInt.MIN_VALUE -const val MinUB = UByte.MIN_VALUE -const val MinUS = UShort.MIN_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -62,41 +55,5 @@ fun box(): String { return "Wrong elements for (MinC + 5) downTo MinC step 3: $list5" } - val list6 = ArrayList() - for (i in (MinUI + 5u) downTo MinUI step 3) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MinUI + 5u, MinUI + 2u)) { - return "Wrong elements for (MinUI + 5u) downTo MinUI step 3: $list6" - } - - val list7 = ArrayList() - for (i in (MinUB + 5u).toUByte() downTo MinUB step 3) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf((MinUB + 5u).toUInt(), (MinUB + 2u).toUInt())) { - return "Wrong elements for (MinUB + 5u).toUByte() downTo MinUB step 3: $list7" - } - - val list8 = ArrayList() - for (i in (MinUS + 5u).toUShort() downTo MinUS step 3) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf((MinUS + 5u).toUInt(), (MinUS + 2u).toUInt())) { - return "Wrong elements for (MinUS + 5u).toUShort() downTo MinUS step 3: $list8" - } - - val list9 = ArrayList() - for (i in MinUL + 5u downTo MinUL step 3) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf((MinUL + 5u), (MinUL + 2u))) { - return "Wrong elements for MinUL + 5u downTo MinUL step 3: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt index 73b70323b50..6aa1f97b884 100644 --- a/compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for 'd' downTo 'a' step 2: $list5" } - val list6 = ArrayList() - for (i in 8u downTo 3u step 2) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(8u, 6u, 4u)) { - return "Wrong elements for 8u downTo 3u step 2: $list6" - } - - val list7 = ArrayList() - for (i in 8u.toUByte() downTo 3u.toUByte() step 2) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(8u, 6u, 4u)) { - return "Wrong elements for 8u.toUByte() downTo 3u.toUByte() step 2: $list7" - } - - val list8 = ArrayList() - for (i in 8u.toUShort() downTo 3u.toUShort() step 2) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(8u, 6u, 4u)) { - return "Wrong elements for 8u.toUShort() downTo 3u.toUShort() step 2: $list8" - } - - val list9 = ArrayList() - for (i in 8uL downTo 3uL step 2L) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(8u, 6u, 4u)) { - return "Wrong elements for 8uL downTo 3uL step 2L: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt b/compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt index 7c623897d9d..9b82086ecfd 100644 --- a/compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for 'a'..'d' step 2: $list5" } - val list6 = ArrayList() - for (i in 3u..8u step 2) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(3u, 5u, 7u)) { - return "Wrong elements for 3u..8u step 2: $list6" - } - - val list7 = ArrayList() - for (i in 3u.toUByte()..8u.toUByte() step 2) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(3u, 5u, 7u)) { - return "Wrong elements for 3u.toUByte()..8u.toUByte() step 2: $list7" - } - - val list8 = ArrayList() - for (i in 3u.toUShort()..8u.toUShort() step 2) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(3u, 5u, 7u)) { - return "Wrong elements for 3u.toUShort()..8u.toUShort() step 2: $list8" - } - - val list9 = ArrayList() - for (i in 3uL..8uL step 2L) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(3u, 5u, 7u)) { - return "Wrong elements for 3uL..8uL step 2L: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt index e3754c2ec74..d6818e904fc 100644 --- a/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,10 +8,6 @@ const val MaxB = Byte.MAX_VALUE const val MaxS = Short.MAX_VALUE const val MaxL = Long.MAX_VALUE const val MaxC = Char.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUB = UByte.MAX_VALUE -const val MaxUS = UShort.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -62,41 +55,5 @@ fun box(): String { return "Wrong elements for (MaxC - 5)..MaxC step 3: $list5" } - val list6 = ArrayList() - for (i in (MaxUI - 5u)..MaxUI step 3) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MaxUI - 5u, MaxUI - 2u)) { - return "Wrong elements for (MaxUI - 5u)..MaxUI step 3: $list6" - } - - val list7 = ArrayList() - for (i in (MaxUB - 5u).toUByte()..MaxUB step 3) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf((MaxUB - 5u).toUInt(), (MaxUB - 2u).toUInt())) { - return "Wrong elements for (MaxUB - 5u).toUByte()..MaxUB step 3: $list7" - } - - val list8 = ArrayList() - for (i in (MaxUS - 5u).toUShort()..MaxUS step 3) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf((MaxUS - 5u).toUInt(), (MaxUS - 2u).toUInt())) { - return "Wrong elements for (MaxUS - 5u).toUShort()..MaxUS step 3: $list8" - } - - val list9 = ArrayList() - for (i in (MaxUL - 5u)..MaxUL step 3) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf((MaxUL - 5u), (MaxUL - 2u))) { - return "Wrong elements for (MaxUL - 5u)..MaxUL step 3: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt index d78c53c1aa8..48174dad262 100644 --- a/compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,8 +8,6 @@ const val MaxB = Byte.MAX_VALUE const val MaxS = Short.MAX_VALUE const val MaxL = Long.MAX_VALUE const val MaxC = Char.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -60,23 +55,5 @@ fun box(): String { return "Wrong elements for (MaxC - 2)..MaxC: $list5" } - val list6 = ArrayList() - for (i in (MaxUI - 2u)..MaxUI) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MaxUI - 2u, MaxUI - 1u, MaxUI)) { - return "Wrong elements for (MaxUI - 2u)..MaxUI: $list6" - } - - val list7 = ArrayList() - for (i in (MaxUL - 2u)..MaxUL) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(MaxUL - 2u, MaxUL - 1u, MaxUL)) { - return "Wrong elements for (MaxUL - 2u)..MaxUL: $list7" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt index f42fc45ff1d..f2d801eff52 100644 --- a/compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,8 +8,6 @@ const val MaxB = Byte.MAX_VALUE const val MaxS = Short.MAX_VALUE const val MaxL = Long.MAX_VALUE const val MaxC = Char.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -60,23 +55,5 @@ fun box(): String { return "Wrong elements for MaxC..MaxC: $list5" } - val list6 = ArrayList() - for (i in MaxUI..MaxUI) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MaxUI)) { - return "Wrong elements for MaxUI..MaxUI: $list6" - } - - val list7 = ArrayList() - for (i in MaxUL..MaxUL) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(MaxUL)) { - return "Wrong elements for MaxUL..MaxUL: $list7" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt index 5414427bc51..2c72366d82c 100644 --- a/compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -16,10 +13,6 @@ const val MaxL = Long.MAX_VALUE const val MinL = Long.MIN_VALUE const val MaxC = Char.MAX_VALUE const val MinC = Char.MIN_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MinUI = UInt.MIN_VALUE -const val MaxUL = ULong.MAX_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -67,23 +60,5 @@ fun box(): String { return "Wrong elements for MaxC..MinC: $list5" } - val list6 = ArrayList() - for (i in MaxUI..MinUI) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for MaxUI..MinUI: $list6" - } - - val list7 = ArrayList() - for (i in MaxUL..MinUL) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for MaxUL..MinUL: $list7" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt b/compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt index ecc7c10169f..4d7b46d6ae0 100644 --- a/compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt +++ b/compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for 'k' downTo 'k': $list5" } - val list6 = ArrayList() - for (i in 5u downTo 5u) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(5u)) { - return "Wrong elements for 5u downTo 5u: $list6" - } - - val list7 = ArrayList() - for (i in 5u.toUByte() downTo 5u.toUByte()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(5u)) { - return "Wrong elements for 5u.toUByte() downTo 5u.toUByte(): $list7" - } - - val list8 = ArrayList() - for (i in 5u.toUShort() downTo 5u.toUShort()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(5u)) { - return "Wrong elements for 5u.toUShort() downTo 5u.toUShort(): $list8" - } - - val list9 = ArrayList() - for (i in 5uL downTo 5uL) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(5uL)) { - return "Wrong elements for 5uL downTo 5uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/oneElementRange.kt b/compiler/testData/codegen/box/ranges/literal/oneElementRange.kt index 1c0e1f99ea0..ff2067aeb18 100644 --- a/compiler/testData/codegen/box/ranges/literal/oneElementRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/oneElementRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for 'k'..'k': $list5" } - val list6 = ArrayList() - for (i in 5u..5u) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(5u)) { - return "Wrong elements for 5u..5u: $list6" - } - - val list7 = ArrayList() - for (i in 5u.toUByte()..5u.toUByte()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(5u)) { - return "Wrong elements for 5u.toUByte()..5u.toUByte(): $list7" - } - - val list8 = ArrayList() - for (i in 5u.toUShort()..5u.toUShort()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(5u)) { - return "Wrong elements for 5u.toUShort()..5u.toUShort(): $list8" - } - - val list9 = ArrayList() - for (i in 5uL..5uL) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(5uL)) { - return "Wrong elements for 5uL..5uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/openRange.kt b/compiler/testData/codegen/box/ranges/literal/openRange.kt index a80317aacb1..9102b06fc3a 100644 --- a/compiler/testData/codegen/box/ranges/literal/openRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/openRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for 'a' until 'd': $list5" } - val list6 = ArrayList() - for (i in 1u until 5u) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(1u, 2u, 3u, 4u)) { - return "Wrong elements for 1u until 5u: $list6" - } - - val list7 = ArrayList() - for (i in 1u.toUByte() until 5u.toUByte()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(1u, 2u, 3u, 4u)) { - return "Wrong elements for 1u.toUByte() until 5u.toUByte(): $list7" - } - - val list8 = ArrayList() - for (i in 1u.toUShort() until 5u.toUShort()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(1u, 2u, 3u, 4u)) { - return "Wrong elements for 1u.toUShort() until 5u.toUShort(): $list8" - } - - val list9 = ArrayList() - for (i in 1uL until 5uL) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(1u, 2u, 3u, 4u)) { - return "Wrong elements for 1uL until 5uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/overflowZeroDownToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/overflowZeroDownToMaxValue.kt index a72407cfc85..ab5e0a6d267 100644 --- a/compiler/testData/codegen/box/ranges/literal/overflowZeroDownToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/overflowZeroDownToMaxValue.kt @@ -5,8 +5,6 @@ const val MaxI = Int.MAX_VALUE const val MaxL = Long.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -27,23 +25,5 @@ fun box(): String { return "Wrong elements for 0 downTo MaxL step 3: $list2" } - val list3 = ArrayList() - for (i in 0u downTo MaxUI step 3) { - list3.add(i) - if (list3.size > 23) break - } - if (list3 != listOf()) { - return "Wrong elements for 0u downTo MaxUI step 3: $list3" - } - - val list4 = ArrayList() - for (i in 0uL downTo MaxUL step 3) { - list4.add(i) - if (list4.size > 23) break - } - if (list4 != listOf()) { - return "Wrong elements for 0uL downTo MaxUL step 3: $list4" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/overflowZeroToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/overflowZeroToMinValue.kt index c017cef331c..f6b979cfb03 100644 --- a/compiler/testData/codegen/box/ranges/literal/overflowZeroToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/overflowZeroToMinValue.kt @@ -1,15 +1,10 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME const val MinI = Int.MIN_VALUE const val MinL = Long.MIN_VALUE -const val MinUI = UInt.MIN_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -30,23 +25,5 @@ fun box(): String { return "Wrong elements for 0L..MinL step 3: $list2" } - val list3 = ArrayList() - for (i in 1u..MinUI step 3) { - list3.add(i) - if (list3.size > 23) break - } - if (list3 != listOf()) { - return "Wrong elements for 1u..MinUI step 3: $list3" - } - - val list4 = ArrayList() - for (i in 1uL..MinUL step 3) { - list4.add(i) - if (list4.size > 23) break - } - if (list4 != listOf()) { - return "Wrong elements for 1uL..MinUL step 3: $list4" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt index c59f421d8dd..5accc82a5df 100644 --- a/compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,10 +8,6 @@ const val MinB = Byte.MIN_VALUE const val MinS = Short.MIN_VALUE const val MinL = Long.MIN_VALUE const val MinC = Char.MIN_VALUE -const val MinUI = UInt.MIN_VALUE -const val MinUB = UByte.MIN_VALUE -const val MinUS = UShort.MIN_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -62,41 +55,5 @@ fun box(): String { return "Wrong elements for (MinC + 2) downTo MinC step 1: $list5" } - val list6 = ArrayList() - for (i in (MinUI + 2u) downTo MinUI step 1) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MinUI + 2u, MinUI + 1u, MinUI)) { - return "Wrong elements for (MinUI + 2u) downTo MinUI step 1: $list6" - } - - val list7 = ArrayList() - for (i in (MinUB + 2u).toUByte() downTo MinUB step 1) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf((MinUB + 2u).toUInt(), (MinUB + 1u).toUInt(), MinUB.toUInt())) { - return "Wrong elements for (MinUB + 2u).toUByte() downTo MinUB step 1: $list7" - } - - val list8 = ArrayList() - for (i in (MinUS + 2u).toUShort() downTo MinUS step 1) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf((MinUS + 2u).toUInt(), (MinUS + 1u).toUInt(), MinUS.toUInt())) { - return "Wrong elements for (MinUS + 2u).toUShort() downTo MinUS step 1: $list8" - } - - val list9 = ArrayList() - for (i in (MinUL + 2u) downTo MinUL step 1) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf((MinUL + 2u), (MinUL + 1u), MinUL)) { - return "Wrong elements for (MinUL + 2u) downTo MinUL step 1: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt index c52968a986a..b49cb72beba 100644 --- a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,10 +8,6 @@ const val MaxB = Byte.MAX_VALUE const val MaxS = Short.MAX_VALUE const val MaxL = Long.MAX_VALUE const val MaxC = Char.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUB = UByte.MAX_VALUE -const val MaxUS = UShort.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -62,41 +55,5 @@ fun box(): String { return "Wrong elements for (MaxC - 2)..MaxC step 2: $list5" } - val list6 = ArrayList() - for (i in (MaxUI - 2u)..MaxUI step 2) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MaxUI - 2u, MaxUI)) { - return "Wrong elements for (MaxUI - 2u)..MaxUI step 2: $list6" - } - - val list7 = ArrayList() - for (i in (MaxUB - 2u).toUByte()..MaxUB step 2) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf((MaxUB - 2u).toUInt(), MaxUB.toUInt())) { - return "Wrong elements for (MaxUB - 2u).toUByte()..MaxUB step 2: $list7" - } - - val list8 = ArrayList() - for (i in (MaxUS - 2u).toUShort()..MaxUS step 2) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf((MaxUS - 2u).toUInt(), MaxUS.toUInt())) { - return "Wrong elements for (MaxUS - 2u).toUShort()..MaxUS step 2: $list8" - } - - val list9 = ArrayList() - for (i in MaxUL - 2u..MaxUL step 2) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(MaxUL - 2u, MaxUL)) { - return "Wrong elements for MaxUL - 2u..MaxUL step 2: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt index c76bd1e76c1..b7a4918f2be 100644 --- a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,8 +8,6 @@ const val MaxB = Byte.MAX_VALUE const val MaxS = Short.MAX_VALUE const val MaxL = Long.MAX_VALUE const val MaxC = Char.MAX_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MaxUL = ULong.MAX_VALUE fun box(): String { val list1 = ArrayList() @@ -60,23 +55,5 @@ fun box(): String { return "Wrong elements for MaxC..MaxC step 1: $list5" } - val list6 = ArrayList() - for (i in MaxUI..MaxUI step 1) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MaxUI)) { - return "Wrong elements for MaxUI..MaxUI step 1: $list6" - } - - val list7 = ArrayList() - for (i in MaxUL..MaxUL step 1) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(MaxUL)) { - return "Wrong elements for MaxUL..MaxUL step 1: $list7" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt index db1e548127b..4f0f6db2a29 100644 --- a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -16,14 +13,6 @@ const val MaxL = Long.MAX_VALUE const val MinL = Long.MIN_VALUE const val MaxC = Char.MAX_VALUE const val MinC = Char.MIN_VALUE -const val MaxUI = UInt.MAX_VALUE -const val MinUI = UInt.MIN_VALUE -const val MaxUB = UByte.MAX_VALUE -const val MinUB = UByte.MIN_VALUE -const val MaxUS = UShort.MAX_VALUE -const val MinUS = UShort.MIN_VALUE -const val MaxUL = ULong.MAX_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -71,41 +60,5 @@ fun box(): String { return "Wrong elements for MaxC..MinC step 1: $list5" } - val list6 = ArrayList() - for (i in MaxUI..MinUI step 1) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for MaxUI..MinUI step 1: $list6" - } - - val list7 = ArrayList() - for (i in MaxUB..MinUB step 1) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for MaxUB..MinUB step 1: $list7" - } - - val list8 = ArrayList() - for (i in MaxUS..MinUS step 1) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf()) { - return "Wrong elements for MaxUS..MinUS step 1: $list8" - } - - val list9 = ArrayList() - for (i in MaxUL..MinUL step 1) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf()) { - return "Wrong elements for MaxUL..MinUL step 1: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt index de3efce17a5..8b552bd79b1 100644 --- a/compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -11,10 +8,6 @@ const val MinB = Byte.MIN_VALUE const val MinS = Short.MIN_VALUE const val MinL = Long.MIN_VALUE const val MinC = Char.MIN_VALUE -const val MinUI = UInt.MIN_VALUE -const val MinUB = UByte.MIN_VALUE -const val MinUS = UShort.MIN_VALUE -const val MinUL = ULong.MIN_VALUE fun box(): String { val list1 = ArrayList() @@ -62,41 +55,5 @@ fun box(): String { return "Wrong elements for MinC..MinC step 1: $list5" } - val list6 = ArrayList() - for (i in MinUI..MinUI step 1) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(MinUI)) { - return "Wrong elements for MinUI..MinUI step 1: $list6" - } - - val list7 = ArrayList() - for (i in MinUB..MinUB step 1) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(MinUB.toUInt())) { - return "Wrong elements for MinUB..MinUB step 1: $list7" - } - - val list8 = ArrayList() - for (i in MinUS..MinUS step 1) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(MinUS.toUInt())) { - return "Wrong elements for MinUS..MinUS step 1: $list8" - } - - val list9 = ArrayList() - for (i in MinUL..MinUL step 1) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(MinUL)) { - return "Wrong elements for MinUL..MinUL step 1: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt b/compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt index 7da0a9fd8bd..4719e88a19b 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for ('c' downTo 'a').reversed(): $list5" } - val list6 = ArrayList() - for (i in (5u downTo 3u).reversed()) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (5u downTo 3u).reversed(): $list6" - } - - val list7 = ArrayList() - for (i in (5u.toUByte() downTo 3u.toUByte()).reversed()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (5u.toUByte() downTo 3u.toUByte()).reversed(): $list7" - } - - val list8 = ArrayList() - for (i in (5u.toUShort() downTo 3u.toUShort()).reversed()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (5u.toUShort() downTo 3u.toUShort()).reversed(): $list8" - } - - val list9 = ArrayList() - for (i in (5uL downTo 3uL).reversed()) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (5uL downTo 3uL).reversed(): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt b/compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt index 3459d749841..56385626b0f 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for ('a' downTo 'c').reversed(): $list5" } - val list6 = ArrayList() - for (i in (3u downTo 5u).reversed()) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for (3u downTo 5u).reversed(): $list6" - } - - val list7 = ArrayList() - for (i in (3u.toUByte() downTo 5u.toUByte()).reversed()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for (3u.toUByte() downTo 5u.toUByte()).reversed(): $list7" - } - - val list8 = ArrayList() - for (i in (3u.toUShort() downTo 5u.toUShort()).reversed()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf()) { - return "Wrong elements for (3u.toUShort() downTo 5u.toUShort()).reversed(): $list8" - } - - val list9 = ArrayList() - for (i in (3uL downTo 5uL).reversed()) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf()) { - return "Wrong elements for (3uL downTo 5uL).reversed(): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt b/compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt index 5fa73e1ae7b..409b818d6c3 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for ('c'..'a').reversed(): $list5" } - val list6 = ArrayList() - for (i in (5u..3u).reversed()) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf()) { - return "Wrong elements for (5u..3u).reversed(): $list6" - } - - val list7 = ArrayList() - for (i in (5u.toUByte()..3u.toUByte()).reversed()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf()) { - return "Wrong elements for (5u.toUByte()..3u.toUByte()).reversed(): $list7" - } - - val list8 = ArrayList() - for (i in (5u.toUShort()..3u.toUShort()).reversed()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf()) { - return "Wrong elements for (5u.toUShort()..3u.toUShort()).reversed(): $list8" - } - - val list9 = ArrayList() - for (i in (5uL..3uL).reversed()) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf()) { - return "Wrong elements for (5uL..3uL).reversed(): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt index 40cff354648..50b9486fa09 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for ('d' downTo 'a' step 2).reversed(): $list5" } - val list6 = ArrayList() - for (i in (8u downTo 3u step 2).reversed()) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(4u, 6u, 8u)) { - return "Wrong elements for (8u downTo 3u step 2).reversed(): $list6" - } - - val list7 = ArrayList() - for (i in (8u.toUByte() downTo 3u.toUByte() step 2).reversed()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(4u, 6u, 8u)) { - return "Wrong elements for (8u.toUByte() downTo 3u.toUByte() step 2).reversed(): $list7" - } - - val list8 = ArrayList() - for (i in (8u.toUShort() downTo 3u.toUShort() step 2).reversed()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(4u, 6u, 8u)) { - return "Wrong elements for (8u.toUShort() downTo 3u.toUShort() step 2).reversed(): $list8" - } - - val list9 = ArrayList() - for (i in (8uL downTo 3uL step 2L).reversed()) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(4u, 6u, 8u)) { - return "Wrong elements for (8uL downTo 3uL step 2L).reversed(): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/reversedRange.kt b/compiler/testData/codegen/box/ranges/literal/reversedRange.kt index a40384a4972..38bec62cd9a 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -44,32 +41,5 @@ fun box(): String { return "Wrong elements for ('a'..'c').reversed(): $list4" } - val list5 = ArrayList() - for (i in (3u..5u).reversed()) { - list5.add(i) - if (list5.size > 23) break - } - if (list5 != listOf(5u, 4u, 3u)) { - return "Wrong elements for (3u..5u).reversed(): $list5" - } - - val list6 = ArrayList() - for (i in (3u.toUShort()..5u.toUShort()).reversed()) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(5u, 4u, 3u)) { - return "Wrong elements for (3u.toUShort()..5u.toUShort()).reversed(): $list6" - } - - val list7 = ArrayList() - for (i in (3uL..5uL).reversed()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(5u, 4u, 3u)) { - return "Wrong elements for (3uL..5uL).reversed(): $list7" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt index c398561771a..e55d9732629 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for ('c'..'g' step 2).reversed(): $list5" } - val list6 = ArrayList() - for (i in (3u..9u step 2).reversed()) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for (3u..9u step 2).reversed(): $list6" - } - - val list7 = ArrayList() - for (i in (3u.toUByte()..9u.toUByte() step 2).reversed()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for (3u.toUByte()..9u.toUByte() step 2).reversed(): $list7" - } - - val list8 = ArrayList() - for (i in (3u.toUShort()..9u.toUShort() step 2).reversed()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for (3u.toUShort()..9u.toUShort() step 2).reversed(): $list8" - } - - val list9 = ArrayList() - for (i in (3uL..9uL step 2L).reversed()) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for (3uL..9uL step 2L).reversed(): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt b/compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt index 4dfb673e7b3..57ae1158e3f 100644 --- a/compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt +++ b/compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for 'g' downTo 'c': $list5" } - val list6 = ArrayList() - for (i in 5u downTo 3u) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(5u, 4u, 3u)) { - return "Wrong elements for 5u downTo 3u: $list6" - } - - val list7 = ArrayList() - for (i in 5u.toUByte() downTo 3u.toUByte()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(5u, 4u, 3u)) { - return "Wrong elements for 5u.toUByte() downTo 3u.toUByte(): $list7" - } - - val list8 = ArrayList() - for (i in 5u.toUShort() downTo 3u.toUShort()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(5u, 4u, 3u)) { - return "Wrong elements for 5u.toUShort() downTo 3u.toUShort(): $list8" - } - - val list9 = ArrayList() - for (i in 5uL downTo 3uL) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(5u, 4u, 3u)) { - return "Wrong elements for 5uL downTo 3uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/simpleRange.kt b/compiler/testData/codegen/box/ranges/literal/simpleRange.kt index deed363e10e..9e60bfb7645 100644 --- a/compiler/testData/codegen/box/ranges/literal/simpleRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/simpleRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for 'c'..'g': $list5" } - val list6 = ArrayList() - for (i in 3u..5u) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(3u, 4u, 5u)) { - return "Wrong elements for 3u..5u: $list6" - } - - val list7 = ArrayList() - for (i in 3.toUByte()..5.toUByte()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(3u, 4u, 5u)) { - return "Wrong elements for 3.toUByte()..5.toUByte(): $list7" - } - - val list8 = ArrayList() - for (i in 3.toUShort()..5.toUShort()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(3u, 4u, 5u)) { - return "Wrong elements for 3.toUShort()..5.toUShort(): $list8" - } - - val list9 = ArrayList() - for (i in 3uL..5uL) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(3u, 4u, 5u)) { - return "Wrong elements for 3uL..5uL: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt b/compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt index 7426610009f..05642cd81e2 100644 --- a/compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt +++ b/compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for (\"ace\"[1])..(\"age\"[1]): $list5" } - val list6 = ArrayList() - for (i in (1u + 2u)..(6u - 1u)) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (1u + 2u)..(6u - 1u): $list6" - } - - val list7 = ArrayList() - for (i in (1u.toUByte() + 2u.toUByte()).toUByte()..(6u.toUByte() - 1u.toUByte()).toUByte()) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (1u.toUByte() + 2u.toUByte()).toUByte()..(6u.toUByte() - 1u.toUByte()).toUByte(): $list7" - } - - val list8 = ArrayList() - for (i in (1u.toUShort() + 2u.toUShort()).toUShort()..(6u.toUShort() - 1u.toUShort()).toUShort()) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (1u.toUShort() + 2u.toUShort()).toUShort()..(6u.toUShort() - 1u.toUShort()).toUShort(): $list8" - } - - val list9 = ArrayList() - for (i in (1uL + 2uL)..(6uL - 1uL)) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(3u, 4u, 5u)) { - return "Wrong elements for (1uL + 2uL)..(6uL - 1uL): $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt index e9f4c6ded1a..2de0daf85e8 100644 --- a/compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for 'g' downTo 'c' step 2: $list5" } - val list6 = ArrayList() - for (i in 9u downTo 3u step 2) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for 9u downTo 3u step 2: $list6" - } - - val list7 = ArrayList() - for (i in 9u.toUByte() downTo 3u.toUByte() step 2) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for 9u.toUByte() downTo 3u.toUByte() step 2: $list7" - } - - val list8 = ArrayList() - for (i in 9u.toUShort() downTo 3u.toUShort() step 2) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for 9u.toUShort() downTo 3u.toUShort() step 2: $list8" - } - - val list9 = ArrayList() - for (i in 9uL downTo 3uL step 2L) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(9u, 7u, 5u, 3u)) { - return "Wrong elements for 9uL downTo 3uL step 2L: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt index df128674557..650e13c4b1e 100644 --- a/compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt @@ -1,7 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// TODO: muted automatically, investigate should it be ran for JVM_IR or not -// IGNORE_BACKEND: JVM_IR - // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME @@ -53,41 +50,5 @@ fun box(): String { return "Wrong elements for 'c'..'g' step 2: $list5" } - val list6 = ArrayList() - for (i in 3u..9u step 2) { - list6.add(i) - if (list6.size > 23) break - } - if (list6 != listOf(3u, 5u, 7u, 9u)) { - return "Wrong elements for 3u..9u step 2: $list6" - } - - val list7 = ArrayList() - for (i in 3u.toUByte()..9u.toUByte() step 2) { - list7.add(i) - if (list7.size > 23) break - } - if (list7 != listOf(3u, 5u, 7u, 9u)) { - return "Wrong elements for 3u.toUByte()..9u.toUByte() step 2: $list7" - } - - val list8 = ArrayList() - for (i in 3u.toUShort()..9u.toUShort() step 2) { - list8.add(i) - if (list8.size > 23) break - } - if (list8 != listOf(3u, 5u, 7u, 9u)) { - return "Wrong elements for 3u.toUShort()..9u.toUShort() step 2: $list8" - } - - val list9 = ArrayList() - for (i in 3uL..9uL step 2L) { - list9.add(i) - if (list9.size > 23) break - } - if (list9 != listOf(3u, 5u, 7u, 9u)) { - return "Wrong elements for 3uL..9uL step 2L: $list9" - } - return "OK" } diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/emptyDownto.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/emptyDownto.kt new file mode 100644 index 00000000000..d83315f8d31 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/emptyDownto.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = 5u downTo 10u + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for 5u downTo 10u: $list1" + } + + val list2 = ArrayList() + val range2 = 5u.toUByte() downTo 10u.toUByte() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for 5u.toUByte() downTo 10u.toUByte(): $list2" + } + + val list3 = ArrayList() + val range3 = 5u.toUShort() downTo 10u.toUShort() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf()) { + return "Wrong elements for 5u.toUShort() downTo 10u.toUShort(): $list3" + } + + val list4 = ArrayList() + val range4 = 5uL downTo 10uL + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf()) { + return "Wrong elements for 5uL downTo 10uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/emptyRange.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/emptyRange.kt new file mode 100644 index 00000000000..d81c2c5f592 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/emptyRange.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = 10u..5u + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for 10u..5u: $list1" + } + + val list2 = ArrayList() + val range2 = 10u.toUByte()..5u.toUByte() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for 10u.toUByte()..5u.toUByte(): $list2" + } + + val list3 = ArrayList() + val range3 = 10u.toUShort()..5u.toUShort() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf()) { + return "Wrong elements for 10u.toUShort()..5u.toUShort(): $list3" + } + + val list4 = ArrayList() + val range4 = 10uL..5uL + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf()) { + return "Wrong elements for 10uL..5uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/inexactDownToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/inexactDownToMinValue.kt new file mode 100644 index 00000000000..02cdfeba040 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/inexactDownToMinValue.kt @@ -0,0 +1,56 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MinUI = UInt.MIN_VALUE +const val MinUB = UByte.MIN_VALUE +const val MinUS = UShort.MIN_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = (MinUI + 5u) downTo MinUI step 3 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MinUI + 5u, MinUI + 2u)) { + return "Wrong elements for (MinUI + 5u) downTo MinUI step 3: $list1" + } + + val list2 = ArrayList() + val range2 = (MinUB + 5u).toUByte() downTo MinUB step 3 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf((MinUB + 5u).toUInt(), (MinUB + 2u).toUInt())) { + return "Wrong elements for (MinUB + 5u).toUByte() downTo MinUB step 3: $list2" + } + + val list3 = ArrayList() + val range3 = (MinUS + 5u).toUShort() downTo MinUS step 3 + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf((MinUS + 5u).toUInt(), (MinUS + 2u).toUInt())) { + return "Wrong elements for (MinUS + 5u).toUShort() downTo MinUS step 3: $list3" + } + + val list4 = ArrayList() + val range4 = MinUL + 5u downTo MinUL step 3 + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf((MinUL + 5u), (MinUL + 2u))) { + return "Wrong elements for MinUL + 5u downTo MinUL step 3: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedDownTo.kt new file mode 100644 index 00000000000..c22a1b3a4a3 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedDownTo.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = 8u downTo 3u step 2 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(8u, 6u, 4u)) { + return "Wrong elements for 8u downTo 3u step 2: $list1" + } + + val list2 = ArrayList() + val range2 = 8u.toUByte() downTo 3u.toUByte() step 2 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(8u, 6u, 4u)) { + return "Wrong elements for 8u.toUByte() downTo 3u.toUByte() step 2: $list2" + } + + val list3 = ArrayList() + val range3 = 8u.toUShort() downTo 3u.toUShort() step 2 + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(8u, 6u, 4u)) { + return "Wrong elements for 8u.toUShort() downTo 3u.toUShort() step 2: $list3" + } + + val list4 = ArrayList() + val range4 = 8uL downTo 3uL step 2L + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(8u, 6u, 4u)) { + return "Wrong elements for 8uL downTo 3uL step 2L: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedRange.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedRange.kt new file mode 100644 index 00000000000..7ca17e1fabb --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedRange.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = 3u..8u step 2 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(3u, 5u, 7u)) { + return "Wrong elements for 3u..8u step 2: $list1" + } + + val list2 = ArrayList() + val range2 = 3u.toUByte()..8u.toUByte() step 2 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(3u, 5u, 7u)) { + return "Wrong elements for 3u.toUByte()..8u.toUByte() step 2: $list2" + } + + val list3 = ArrayList() + val range3 = 3u.toUShort()..8u.toUShort() step 2 + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(3u, 5u, 7u)) { + return "Wrong elements for 3u.toUShort()..8u.toUShort() step 2: $list3" + } + + val list4 = ArrayList() + val range4 = 3uL..8uL step 2L + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(3u, 5u, 7u)) { + return "Wrong elements for 3uL..8uL step 2L: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/inexactToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/inexactToMaxValue.kt new file mode 100644 index 00000000000..c3a9ac8ccfe --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/inexactToMaxValue.kt @@ -0,0 +1,56 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUB = UByte.MAX_VALUE +const val MaxUS = UShort.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = (MaxUI - 5u)..MaxUI step 3 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MaxUI - 5u, MaxUI - 2u)) { + return "Wrong elements for (MaxUI - 5u)..MaxUI step 3: $list1" + } + + val list2 = ArrayList() + val range2 = (MaxUB - 5u).toUByte()..MaxUB step 3 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf((MaxUB - 5u).toUInt(), (MaxUB - 2u).toUInt())) { + return "Wrong elements for (MaxUB - 5u).toUByte()..MaxUB step 3: $list2" + } + + val list3 = ArrayList() + val range3 = (MaxUS - 5u).toUShort()..MaxUS step 3 + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf((MaxUS - 5u).toUInt(), (MaxUS - 2u).toUInt())) { + return "Wrong elements for (MaxUS - 5u).toUShort()..MaxUS step 3: $list3" + } + + val list4 = ArrayList() + val range4 = (MaxUL - 5u)..MaxUL step 3 + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf((MaxUL - 5u), (MaxUL - 2u))) { + return "Wrong elements for (MaxUL - 5u)..MaxUL step 3: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/maxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/maxValueMinusTwoToMaxValue.kt new file mode 100644 index 00000000000..99737991944 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/maxValueMinusTwoToMaxValue.kt @@ -0,0 +1,34 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = (MaxUI - 2u)..MaxUI + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MaxUI - 2u, MaxUI - 1u, MaxUI)) { + return "Wrong elements for (MaxUI - 2u)..MaxUI: $list1" + } + + val list2 = ArrayList() + val range2 = (MaxUL - 2u)..MaxUL + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(MaxUL - 2u, MaxUL - 1u, MaxUL)) { + return "Wrong elements for (MaxUL - 2u)..MaxUL: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMaxValue.kt new file mode 100644 index 00000000000..938f08c8d45 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMaxValue.kt @@ -0,0 +1,34 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = MaxUI..MaxUI + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MaxUI)) { + return "Wrong elements for MaxUI..MaxUI: $list1" + } + + val list2 = ArrayList() + val range2 = MaxUL..MaxUL + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(MaxUL)) { + return "Wrong elements for MaxUL..MaxUL: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMinValue.kt new file mode 100644 index 00000000000..deaefcf97a1 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMinValue.kt @@ -0,0 +1,36 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MinUI = UInt.MIN_VALUE +const val MaxUL = ULong.MAX_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = MaxUI..MinUI + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for MaxUI..MinUI: $list1" + } + + val list2 = ArrayList() + val range2 = MaxUL..MinUL + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for MaxUL..MinUL: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/oneElementDownTo.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/oneElementDownTo.kt new file mode 100644 index 00000000000..376dd866dae --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/oneElementDownTo.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = 5u downTo 5u + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(5u)) { + return "Wrong elements for 5u downTo 5u: $list1" + } + + val list2 = ArrayList() + val range2 = 5u.toUByte() downTo 5u.toUByte() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(5u)) { + return "Wrong elements for 5u.toUByte() downTo 5u.toUByte(): $list2" + } + + val list3 = ArrayList() + val range3 = 5u.toUShort() downTo 5u.toUShort() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(5u)) { + return "Wrong elements for 5u.toUShort() downTo 5u.toUShort(): $list3" + } + + val list4 = ArrayList() + val range4 = 5uL downTo 5uL + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(5uL)) { + return "Wrong elements for 5uL downTo 5uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/oneElementRange.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/oneElementRange.kt new file mode 100644 index 00000000000..15dbbca0b5b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/oneElementRange.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = 5u..5u + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(5u)) { + return "Wrong elements for 5u..5u: $list1" + } + + val list2 = ArrayList() + val range2 = 5u.toUByte()..5u.toUByte() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(5u)) { + return "Wrong elements for 5u.toUByte()..5u.toUByte(): $list2" + } + + val list3 = ArrayList() + val range3 = 5u.toUShort()..5u.toUShort() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(5u)) { + return "Wrong elements for 5u.toUShort()..5u.toUShort(): $list3" + } + + val list4 = ArrayList() + val range4 = 5uL..5uL + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(5uL)) { + return "Wrong elements for 5uL..5uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/openRange.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/openRange.kt new file mode 100644 index 00000000000..ffa58e48787 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/openRange.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = 1u until 5u + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(1u, 2u, 3u, 4u)) { + return "Wrong elements for 1u until 5u: $list1" + } + + val list2 = ArrayList() + val range2 = 1u.toUByte() until 5u.toUByte() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(1u, 2u, 3u, 4u)) { + return "Wrong elements for 1u.toUByte() until 5u.toUByte(): $list2" + } + + val list3 = ArrayList() + val range3 = 1u.toUShort() until 5u.toUShort() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(1u, 2u, 3u, 4u)) { + return "Wrong elements for 1u.toUShort() until 5u.toUShort(): $list3" + } + + val list4 = ArrayList() + val range4 = 1uL until 5uL + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(1u, 2u, 3u, 4u)) { + return "Wrong elements for 1uL until 5uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroDownToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroDownToMaxValue.kt new file mode 100644 index 00000000000..4c70ced7329 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroDownToMaxValue.kt @@ -0,0 +1,31 @@ +// KJS_WITH_FULL_RUNTIME +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = 0u downTo MaxUI step 3 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for 0u downTo MaxUI step 3: $list1" + } + + val list2 = ArrayList() + val range2 = 0uL downTo MaxUL step 3 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for 0uL downTo MaxUL step 3: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroToMinValue.kt new file mode 100644 index 00000000000..9f1cb083695 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroToMinValue.kt @@ -0,0 +1,34 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MinUI = UInt.MIN_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = 1u..MinUI step 3 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for 1u..MinUI step 3: $list1" + } + + val list2 = ArrayList() + val range2 = 1uL..MinUL step 3 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for 1uL..MinUL step 3: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/progressionDownToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/progressionDownToMinValue.kt new file mode 100644 index 00000000000..b5a57f50c52 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/progressionDownToMinValue.kt @@ -0,0 +1,56 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MinUI = UInt.MIN_VALUE +const val MinUB = UByte.MIN_VALUE +const val MinUS = UShort.MIN_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = (MinUI + 2u) downTo MinUI step 1 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MinUI + 2u, MinUI + 1u, MinUI)) { + return "Wrong elements for (MinUI + 2u) downTo MinUI step 1: $list1" + } + + val list2 = ArrayList() + val range2 = (MinUB + 2u).toUByte() downTo MinUB step 1 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf((MinUB + 2u).toUInt(), (MinUB + 1u).toUInt(), MinUB.toUInt())) { + return "Wrong elements for (MinUB + 2u).toUByte() downTo MinUB step 1: $list2" + } + + val list3 = ArrayList() + val range3 = (MinUS + 2u).toUShort() downTo MinUS step 1 + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf((MinUS + 2u).toUInt(), (MinUS + 1u).toUInt(), MinUS.toUInt())) { + return "Wrong elements for (MinUS + 2u).toUShort() downTo MinUS step 1: $list3" + } + + val list4 = ArrayList() + val range4 = (MinUL + 2u) downTo MinUL step 1 + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf((MinUL + 2u), (MinUL + 1u), MinUL)) { + return "Wrong elements for (MinUL + 2u) downTo MinUL step 1: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueMinusTwoToMaxValue.kt new file mode 100644 index 00000000000..ee87e216cea --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueMinusTwoToMaxValue.kt @@ -0,0 +1,56 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUB = UByte.MAX_VALUE +const val MaxUS = UShort.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = (MaxUI - 2u)..MaxUI step 2 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MaxUI - 2u, MaxUI)) { + return "Wrong elements for (MaxUI - 2u)..MaxUI step 2: $list1" + } + + val list2 = ArrayList() + val range2 = (MaxUB - 2u).toUByte()..MaxUB step 2 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf((MaxUB - 2u).toUInt(), MaxUB.toUInt())) { + return "Wrong elements for (MaxUB - 2u).toUByte()..MaxUB step 2: $list2" + } + + val list3 = ArrayList() + val range3 = (MaxUS - 2u).toUShort()..MaxUS step 2 + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf((MaxUS - 2u).toUInt(), MaxUS.toUInt())) { + return "Wrong elements for (MaxUS - 2u).toUShort()..MaxUS step 2: $list3" + } + + val list4 = ArrayList() + val range4 = MaxUL - 2u..MaxUL step 2 + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(MaxUL - 2u, MaxUL)) { + return "Wrong elements for MaxUL - 2u..MaxUL step 2: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMaxValue.kt new file mode 100644 index 00000000000..3315e1997ce --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMaxValue.kt @@ -0,0 +1,34 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = MaxUI..MaxUI step 1 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MaxUI)) { + return "Wrong elements for MaxUI..MaxUI step 1: $list1" + } + + val list2 = ArrayList() + val range2 = MaxUL..MaxUL step 1 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(MaxUL)) { + return "Wrong elements for MaxUL..MaxUL step 1: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMinValue.kt new file mode 100644 index 00000000000..566aa6671c0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMinValue.kt @@ -0,0 +1,60 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MinUI = UInt.MIN_VALUE +const val MaxUB = UByte.MAX_VALUE +const val MinUB = UByte.MIN_VALUE +const val MaxUS = UShort.MAX_VALUE +const val MinUS = UShort.MIN_VALUE +const val MaxUL = ULong.MAX_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = MaxUI..MinUI step 1 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for MaxUI..MinUI step 1: $list1" + } + + val list2 = ArrayList() + val range2 = MaxUB..MinUB step 1 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for MaxUB..MinUB step 1: $list2" + } + + val list3 = ArrayList() + val range3 = MaxUS..MinUS step 1 + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf()) { + return "Wrong elements for MaxUS..MinUS step 1: $list3" + } + + val list4 = ArrayList() + val range4 = MaxUL..MinUL step 1 + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf()) { + return "Wrong elements for MaxUL..MinUL step 1: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMinValueToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMinValueToMinValue.kt new file mode 100644 index 00000000000..c695751c4d4 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/progressionMinValueToMinValue.kt @@ -0,0 +1,56 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MinUI = UInt.MIN_VALUE +const val MinUB = UByte.MIN_VALUE +const val MinUS = UShort.MIN_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + val range1 = MinUI..MinUI step 1 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MinUI)) { + return "Wrong elements for MinUI..MinUI step 1: $list1" + } + + val list2 = ArrayList() + val range2 = MinUB..MinUB step 1 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(MinUB.toUInt())) { + return "Wrong elements for MinUB..MinUB step 1: $list2" + } + + val list3 = ArrayList() + val range3 = MinUS..MinUS step 1 + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(MinUS.toUInt())) { + return "Wrong elements for MinUS..MinUS step 1: $list3" + } + + val list4 = ArrayList() + val range4 = MinUL..MinUL step 1 + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(MinUL)) { + return "Wrong elements for MinUL..MinUL step 1: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/reversedBackSequence.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedBackSequence.kt new file mode 100644 index 00000000000..aeb6e1c1c61 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedBackSequence.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = (5u downTo 3u).reversed() + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (5u downTo 3u).reversed(): $list1" + } + + val list2 = ArrayList() + val range2 = (5u.toUByte() downTo 3u.toUByte()).reversed() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (5u.toUByte() downTo 3u.toUByte()).reversed(): $list2" + } + + val list3 = ArrayList() + val range3 = (5u.toUShort() downTo 3u.toUShort()).reversed() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (5u.toUShort() downTo 3u.toUShort()).reversed(): $list3" + } + + val list4 = ArrayList() + val range4 = (5uL downTo 3uL).reversed() + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (5uL downTo 3uL).reversed(): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyBackSequence.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyBackSequence.kt new file mode 100644 index 00000000000..b980fa3d893 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyBackSequence.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = (3u downTo 5u).reversed() + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for (3u downTo 5u).reversed(): $list1" + } + + val list2 = ArrayList() + val range2 = (3u.toUByte() downTo 5u.toUByte()).reversed() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for (3u.toUByte() downTo 5u.toUByte()).reversed(): $list2" + } + + val list3 = ArrayList() + val range3 = (3u.toUShort() downTo 5u.toUShort()).reversed() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf()) { + return "Wrong elements for (3u.toUShort() downTo 5u.toUShort()).reversed(): $list3" + } + + val list4 = ArrayList() + val range4 = (3uL downTo 5uL).reversed() + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf()) { + return "Wrong elements for (3uL downTo 5uL).reversed(): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyRange.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyRange.kt new file mode 100644 index 00000000000..0fa2ce50a73 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyRange.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = (5u..3u).reversed() + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for (5u..3u).reversed(): $list1" + } + + val list2 = ArrayList() + val range2 = (5u.toUByte()..3u.toUByte()).reversed() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for (5u.toUByte()..3u.toUByte()).reversed(): $list2" + } + + val list3 = ArrayList() + val range3 = (5u.toUShort()..3u.toUShort()).reversed() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf()) { + return "Wrong elements for (5u.toUShort()..3u.toUShort()).reversed(): $list3" + } + + val list4 = ArrayList() + val range4 = (5uL..3uL).reversed() + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf()) { + return "Wrong elements for (5uL..3uL).reversed(): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/reversedInexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedInexactSteppedDownTo.kt new file mode 100644 index 00000000000..6085e7a4353 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedInexactSteppedDownTo.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = (8u downTo 3u step 2).reversed() + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(4u, 6u, 8u)) { + return "Wrong elements for (8u downTo 3u step 2).reversed(): $list1" + } + + val list2 = ArrayList() + val range2 = (8u.toUByte() downTo 3u.toUByte() step 2).reversed() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(4u, 6u, 8u)) { + return "Wrong elements for (8u.toUByte() downTo 3u.toUByte() step 2).reversed(): $list2" + } + + val list3 = ArrayList() + val range3 = (8u.toUShort() downTo 3u.toUShort() step 2).reversed() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(4u, 6u, 8u)) { + return "Wrong elements for (8u.toUShort() downTo 3u.toUShort() step 2).reversed(): $list3" + } + + val list4 = ArrayList() + val range4 = (8uL downTo 3uL step 2L).reversed() + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(4u, 6u, 8u)) { + return "Wrong elements for (8uL downTo 3uL step 2L).reversed(): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/reversedRange.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedRange.kt new file mode 100644 index 00000000000..d564ccff87f --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedRange.kt @@ -0,0 +1,42 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = (3u..5u).reversed() + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(5u, 4u, 3u)) { + return "Wrong elements for (3u..5u).reversed(): $list1" + } + + val list2 = ArrayList() + val range2 = (3u.toUShort()..5u.toUShort()).reversed() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(5u, 4u, 3u)) { + return "Wrong elements for (3u.toUShort()..5u.toUShort()).reversed(): $list2" + } + + val list3 = ArrayList() + val range3 = (3uL..5uL).reversed() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(5u, 4u, 3u)) { + return "Wrong elements for (3uL..5uL).reversed(): $list3" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/reversedSimpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedSimpleSteppedRange.kt new file mode 100644 index 00000000000..b11836dcbd3 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/reversedSimpleSteppedRange.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = (3u..9u step 2).reversed() + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for (3u..9u step 2).reversed(): $list1" + } + + val list2 = ArrayList() + val range2 = (3u.toUByte()..9u.toUByte() step 2).reversed() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for (3u.toUByte()..9u.toUByte() step 2).reversed(): $list2" + } + + val list3 = ArrayList() + val range3 = (3u.toUShort()..9u.toUShort() step 2).reversed() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for (3u.toUShort()..9u.toUShort() step 2).reversed(): $list3" + } + + val list4 = ArrayList() + val range4 = (3uL..9uL step 2L).reversed() + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for (3uL..9uL step 2L).reversed(): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/simpleDownTo.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/simpleDownTo.kt new file mode 100644 index 00000000000..d1f4e305010 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/simpleDownTo.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = 5u downTo 3u + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(5u, 4u, 3u)) { + return "Wrong elements for 5u downTo 3u: $list1" + } + + val list2 = ArrayList() + val range2 = 5u.toUByte() downTo 3u.toUByte() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(5u, 4u, 3u)) { + return "Wrong elements for 5u.toUByte() downTo 3u.toUByte(): $list2" + } + + val list3 = ArrayList() + val range3 = 5u.toUShort() downTo 3u.toUShort() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(5u, 4u, 3u)) { + return "Wrong elements for 5u.toUShort() downTo 3u.toUShort(): $list3" + } + + val list4 = ArrayList() + val range4 = 5uL downTo 3uL + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(5u, 4u, 3u)) { + return "Wrong elements for 5uL downTo 3uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/simpleRange.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/simpleRange.kt new file mode 100644 index 00000000000..819266ec0ce --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/simpleRange.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = 3u..5u + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(3u, 4u, 5u)) { + return "Wrong elements for 3u..5u: $list1" + } + + val list2 = ArrayList() + val range2 = 3.toUByte()..5.toUByte() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(3u, 4u, 5u)) { + return "Wrong elements for 3.toUByte()..5.toUByte(): $list2" + } + + val list3 = ArrayList() + val range3 = 3.toUShort()..5.toUShort() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(3u, 4u, 5u)) { + return "Wrong elements for 3.toUShort()..5.toUShort(): $list3" + } + + val list4 = ArrayList() + val range4 = 3uL..5uL + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(3u, 4u, 5u)) { + return "Wrong elements for 3uL..5uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/simpleRangeWithNonConstantEnds.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/simpleRangeWithNonConstantEnds.kt new file mode 100644 index 00000000000..dd11e234177 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/simpleRangeWithNonConstantEnds.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = (1u + 2u)..(6u - 1u) + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (1u + 2u)..(6u - 1u): $list1" + } + + val list2 = ArrayList() + val range2 = (1u.toUByte() + 2u.toUByte()).toUByte()..(6u.toUByte() - 1u.toUByte()).toUByte() + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (1u.toUByte() + 2u.toUByte()).toUByte()..(6u.toUByte() - 1u.toUByte()).toUByte(): $list2" + } + + val list3 = ArrayList() + val range3 = (1u.toUShort() + 2u.toUShort()).toUShort()..(6u.toUShort() - 1u.toUShort()).toUShort() + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (1u.toUShort() + 2u.toUShort()).toUShort()..(6u.toUShort() - 1u.toUShort()).toUShort(): $list3" + } + + val list4 = ArrayList() + val range4 = (1uL + 2uL)..(6uL - 1uL) + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (1uL + 2uL)..(6uL - 1uL): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedDownTo.kt new file mode 100644 index 00000000000..c9632996d48 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedDownTo.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = 9u downTo 3u step 2 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for 9u downTo 3u step 2: $list1" + } + + val list2 = ArrayList() + val range2 = 9u.toUByte() downTo 3u.toUByte() step 2 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for 9u.toUByte() downTo 3u.toUByte() step 2: $list2" + } + + val list3 = ArrayList() + val range3 = 9u.toUShort() downTo 3u.toUShort() step 2 + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for 9u.toUShort() downTo 3u.toUShort() step 2: $list3" + } + + val list4 = ArrayList() + val range4 = 9uL downTo 3uL step 2L + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for 9uL downTo 3uL step 2L: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedRange.kt new file mode 100644 index 00000000000..c56a06699f0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedRange.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + val range1 = 3u..9u step 2 + for (i in range1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(3u, 5u, 7u, 9u)) { + return "Wrong elements for 3u..9u step 2: $list1" + } + + val list2 = ArrayList() + val range2 = 3u.toUByte()..9u.toUByte() step 2 + for (i in range2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(3u, 5u, 7u, 9u)) { + return "Wrong elements for 3u.toUByte()..9u.toUByte() step 2: $list2" + } + + val list3 = ArrayList() + val range3 = 3u.toUShort()..9u.toUShort() step 2 + for (i in range3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(3u, 5u, 7u, 9u)) { + return "Wrong elements for 3u.toUShort()..9u.toUShort() step 2: $list3" + } + + val list4 = ArrayList() + val range4 = 3uL..9uL step 2L + for (i in range4) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(3u, 5u, 7u, 9u)) { + return "Wrong elements for 3uL..9uL step 2L: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/emptyDownto.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/emptyDownto.kt new file mode 100644 index 00000000000..4c7284723e6 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/emptyDownto.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in 5u downTo 10u) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for 5u downTo 10u: $list1" + } + + val list2 = ArrayList() + for (i in 5u.toUByte() downTo 10u.toUByte()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for 5u.toUByte() downTo 10u.toUByte(): $list2" + } + + val list3 = ArrayList() + for (i in 5u.toUShort() downTo 10u.toUShort()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf()) { + return "Wrong elements for 5u.toUShort() downTo 10u.toUShort(): $list3" + } + + val list4 = ArrayList() + for (i in 5uL downTo 10uL) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf()) { + return "Wrong elements for 5uL downTo 10uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/emptyRange.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/emptyRange.kt new file mode 100644 index 00000000000..4d4da2f8fdb --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/emptyRange.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in 10u..5u) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for 10u..5u: $list1" + } + + val list2 = ArrayList() + for (i in 10u.toUByte()..5u.toUByte()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for 10u.toUByte()..5u.toUByte(): $list2" + } + + val list3 = ArrayList() + for (i in 10u.toUShort()..5u.toUShort()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf()) { + return "Wrong elements for 10u.toUShort()..5u.toUShort(): $list3" + } + + val list4 = ArrayList() + for (i in 10uL..5uL) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf()) { + return "Wrong elements for 10uL..5uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/inexactDownToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/inexactDownToMinValue.kt new file mode 100644 index 00000000000..86c9896eebf --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/inexactDownToMinValue.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MinUI = UInt.MIN_VALUE +const val MinUB = UByte.MIN_VALUE +const val MinUS = UShort.MIN_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in (MinUI + 5u) downTo MinUI step 3) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MinUI + 5u, MinUI + 2u)) { + return "Wrong elements for (MinUI + 5u) downTo MinUI step 3: $list1" + } + + val list2 = ArrayList() + for (i in (MinUB + 5u).toUByte() downTo MinUB step 3) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf((MinUB + 5u).toUInt(), (MinUB + 2u).toUInt())) { + return "Wrong elements for (MinUB + 5u).toUByte() downTo MinUB step 3: $list2" + } + + val list3 = ArrayList() + for (i in (MinUS + 5u).toUShort() downTo MinUS step 3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf((MinUS + 5u).toUInt(), (MinUS + 2u).toUInt())) { + return "Wrong elements for (MinUS + 5u).toUShort() downTo MinUS step 3: $list3" + } + + val list4 = ArrayList() + for (i in MinUL + 5u downTo MinUL step 3) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf((MinUL + 5u), (MinUL + 2u))) { + return "Wrong elements for MinUL + 5u downTo MinUL step 3: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedDownTo.kt new file mode 100644 index 00000000000..7fb3d59c90c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedDownTo.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in 8u downTo 3u step 2) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(8u, 6u, 4u)) { + return "Wrong elements for 8u downTo 3u step 2: $list1" + } + + val list2 = ArrayList() + for (i in 8u.toUByte() downTo 3u.toUByte() step 2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(8u, 6u, 4u)) { + return "Wrong elements for 8u.toUByte() downTo 3u.toUByte() step 2: $list2" + } + + val list3 = ArrayList() + for (i in 8u.toUShort() downTo 3u.toUShort() step 2) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(8u, 6u, 4u)) { + return "Wrong elements for 8u.toUShort() downTo 3u.toUShort() step 2: $list3" + } + + val list4 = ArrayList() + for (i in 8uL downTo 3uL step 2L) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(8u, 6u, 4u)) { + return "Wrong elements for 8uL downTo 3uL step 2L: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedRange.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedRange.kt new file mode 100644 index 00000000000..baaf8d54154 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedRange.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in 3u..8u step 2) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(3u, 5u, 7u)) { + return "Wrong elements for 3u..8u step 2: $list1" + } + + val list2 = ArrayList() + for (i in 3u.toUByte()..8u.toUByte() step 2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(3u, 5u, 7u)) { + return "Wrong elements for 3u.toUByte()..8u.toUByte() step 2: $list2" + } + + val list3 = ArrayList() + for (i in 3u.toUShort()..8u.toUShort() step 2) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(3u, 5u, 7u)) { + return "Wrong elements for 3u.toUShort()..8u.toUShort() step 2: $list3" + } + + val list4 = ArrayList() + for (i in 3uL..8uL step 2L) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(3u, 5u, 7u)) { + return "Wrong elements for 3uL..8uL step 2L: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/inexactToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/inexactToMaxValue.kt new file mode 100644 index 00000000000..f023b40037b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/inexactToMaxValue.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUB = UByte.MAX_VALUE +const val MaxUS = UShort.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in (MaxUI - 5u)..MaxUI step 3) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MaxUI - 5u, MaxUI - 2u)) { + return "Wrong elements for (MaxUI - 5u)..MaxUI step 3: $list1" + } + + val list2 = ArrayList() + for (i in (MaxUB - 5u).toUByte()..MaxUB step 3) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf((MaxUB - 5u).toUInt(), (MaxUB - 2u).toUInt())) { + return "Wrong elements for (MaxUB - 5u).toUByte()..MaxUB step 3: $list2" + } + + val list3 = ArrayList() + for (i in (MaxUS - 5u).toUShort()..MaxUS step 3) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf((MaxUS - 5u).toUInt(), (MaxUS - 2u).toUInt())) { + return "Wrong elements for (MaxUS - 5u).toUShort()..MaxUS step 3: $list3" + } + + val list4 = ArrayList() + for (i in (MaxUL - 5u)..MaxUL step 3) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf((MaxUL - 5u), (MaxUL - 2u))) { + return "Wrong elements for (MaxUL - 5u)..MaxUL step 3: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/maxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/maxValueMinusTwoToMaxValue.kt new file mode 100644 index 00000000000..e51bcd0e0f2 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/maxValueMinusTwoToMaxValue.kt @@ -0,0 +1,32 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in (MaxUI - 2u)..MaxUI) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MaxUI - 2u, MaxUI - 1u, MaxUI)) { + return "Wrong elements for (MaxUI - 2u)..MaxUI: $list1" + } + + val list2 = ArrayList() + for (i in (MaxUL - 2u)..MaxUL) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(MaxUL - 2u, MaxUL - 1u, MaxUL)) { + return "Wrong elements for (MaxUL - 2u)..MaxUL: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMaxValue.kt new file mode 100644 index 00000000000..a72f4b4f38c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMaxValue.kt @@ -0,0 +1,32 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in MaxUI..MaxUI) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MaxUI)) { + return "Wrong elements for MaxUI..MaxUI: $list1" + } + + val list2 = ArrayList() + for (i in MaxUL..MaxUL) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(MaxUL)) { + return "Wrong elements for MaxUL..MaxUL: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMinValue.kt new file mode 100644 index 00000000000..60f1efb93f9 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMinValue.kt @@ -0,0 +1,34 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MinUI = UInt.MIN_VALUE +const val MaxUL = ULong.MAX_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in MaxUI..MinUI) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for MaxUI..MinUI: $list1" + } + + val list2 = ArrayList() + for (i in MaxUL..MinUL) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for MaxUL..MinUL: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/oneElementDownTo.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/oneElementDownTo.kt new file mode 100644 index 00000000000..b9aeed9357d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/oneElementDownTo.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in 5u downTo 5u) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(5u)) { + return "Wrong elements for 5u downTo 5u: $list1" + } + + val list2 = ArrayList() + for (i in 5u.toUByte() downTo 5u.toUByte()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(5u)) { + return "Wrong elements for 5u.toUByte() downTo 5u.toUByte(): $list2" + } + + val list3 = ArrayList() + for (i in 5u.toUShort() downTo 5u.toUShort()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(5u)) { + return "Wrong elements for 5u.toUShort() downTo 5u.toUShort(): $list3" + } + + val list4 = ArrayList() + for (i in 5uL downTo 5uL) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(5uL)) { + return "Wrong elements for 5uL downTo 5uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/oneElementRange.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/oneElementRange.kt new file mode 100644 index 00000000000..2247cd6c55b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/oneElementRange.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in 5u..5u) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(5u)) { + return "Wrong elements for 5u..5u: $list1" + } + + val list2 = ArrayList() + for (i in 5u.toUByte()..5u.toUByte()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(5u)) { + return "Wrong elements for 5u.toUByte()..5u.toUByte(): $list2" + } + + val list3 = ArrayList() + for (i in 5u.toUShort()..5u.toUShort()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(5u)) { + return "Wrong elements for 5u.toUShort()..5u.toUShort(): $list3" + } + + val list4 = ArrayList() + for (i in 5uL..5uL) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(5uL)) { + return "Wrong elements for 5uL..5uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/openRange.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/openRange.kt new file mode 100644 index 00000000000..4f2c25c2b0b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/openRange.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in 1u until 5u) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(1u, 2u, 3u, 4u)) { + return "Wrong elements for 1u until 5u: $list1" + } + + val list2 = ArrayList() + for (i in 1u.toUByte() until 5u.toUByte()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(1u, 2u, 3u, 4u)) { + return "Wrong elements for 1u.toUByte() until 5u.toUByte(): $list2" + } + + val list3 = ArrayList() + for (i in 1u.toUShort() until 5u.toUShort()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(1u, 2u, 3u, 4u)) { + return "Wrong elements for 1u.toUShort() until 5u.toUShort(): $list3" + } + + val list4 = ArrayList() + for (i in 1uL until 5uL) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(1u, 2u, 3u, 4u)) { + return "Wrong elements for 1uL until 5uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroDownToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroDownToMaxValue.kt new file mode 100644 index 00000000000..ca316ecc117 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroDownToMaxValue.kt @@ -0,0 +1,29 @@ +// KJS_WITH_FULL_RUNTIME +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in 0u downTo MaxUI step 3) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for 0u downTo MaxUI step 3: $list1" + } + + val list2 = ArrayList() + for (i in 0uL downTo MaxUL step 3) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for 0uL downTo MaxUL step 3: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroToMinValue.kt new file mode 100644 index 00000000000..6ec6f926c5b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroToMinValue.kt @@ -0,0 +1,32 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MinUI = UInt.MIN_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in 1u..MinUI step 3) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for 1u..MinUI step 3: $list1" + } + + val list2 = ArrayList() + for (i in 1uL..MinUL step 3) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for 1uL..MinUL step 3: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/progressionDownToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/progressionDownToMinValue.kt new file mode 100644 index 00000000000..5e8886a65d1 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/progressionDownToMinValue.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MinUI = UInt.MIN_VALUE +const val MinUB = UByte.MIN_VALUE +const val MinUS = UShort.MIN_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in (MinUI + 2u) downTo MinUI step 1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MinUI + 2u, MinUI + 1u, MinUI)) { + return "Wrong elements for (MinUI + 2u) downTo MinUI step 1: $list1" + } + + val list2 = ArrayList() + for (i in (MinUB + 2u).toUByte() downTo MinUB step 1) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf((MinUB + 2u).toUInt(), (MinUB + 1u).toUInt(), MinUB.toUInt())) { + return "Wrong elements for (MinUB + 2u).toUByte() downTo MinUB step 1: $list2" + } + + val list3 = ArrayList() + for (i in (MinUS + 2u).toUShort() downTo MinUS step 1) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf((MinUS + 2u).toUInt(), (MinUS + 1u).toUInt(), MinUS.toUInt())) { + return "Wrong elements for (MinUS + 2u).toUShort() downTo MinUS step 1: $list3" + } + + val list4 = ArrayList() + for (i in (MinUL + 2u) downTo MinUL step 1) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf((MinUL + 2u), (MinUL + 1u), MinUL)) { + return "Wrong elements for (MinUL + 2u) downTo MinUL step 1: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueMinusTwoToMaxValue.kt new file mode 100644 index 00000000000..2ab46a583a9 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueMinusTwoToMaxValue.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUB = UByte.MAX_VALUE +const val MaxUS = UShort.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in (MaxUI - 2u)..MaxUI step 2) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MaxUI - 2u, MaxUI)) { + return "Wrong elements for (MaxUI - 2u)..MaxUI step 2: $list1" + } + + val list2 = ArrayList() + for (i in (MaxUB - 2u).toUByte()..MaxUB step 2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf((MaxUB - 2u).toUInt(), MaxUB.toUInt())) { + return "Wrong elements for (MaxUB - 2u).toUByte()..MaxUB step 2: $list2" + } + + val list3 = ArrayList() + for (i in (MaxUS - 2u).toUShort()..MaxUS step 2) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf((MaxUS - 2u).toUInt(), MaxUS.toUInt())) { + return "Wrong elements for (MaxUS - 2u).toUShort()..MaxUS step 2: $list3" + } + + val list4 = ArrayList() + for (i in MaxUL - 2u..MaxUL step 2) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(MaxUL - 2u, MaxUL)) { + return "Wrong elements for MaxUL - 2u..MaxUL step 2: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMaxValue.kt new file mode 100644 index 00000000000..4909f5ee653 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMaxValue.kt @@ -0,0 +1,32 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MaxUL = ULong.MAX_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in MaxUI..MaxUI step 1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MaxUI)) { + return "Wrong elements for MaxUI..MaxUI step 1: $list1" + } + + val list2 = ArrayList() + for (i in MaxUL..MaxUL step 1) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(MaxUL)) { + return "Wrong elements for MaxUL..MaxUL step 1: $list2" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMinValue.kt new file mode 100644 index 00000000000..fac8449bdd0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMinValue.kt @@ -0,0 +1,56 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MaxUI = UInt.MAX_VALUE +const val MinUI = UInt.MIN_VALUE +const val MaxUB = UByte.MAX_VALUE +const val MinUB = UByte.MIN_VALUE +const val MaxUS = UShort.MAX_VALUE +const val MinUS = UShort.MIN_VALUE +const val MaxUL = ULong.MAX_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in MaxUI..MinUI step 1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for MaxUI..MinUI step 1: $list1" + } + + val list2 = ArrayList() + for (i in MaxUB..MinUB step 1) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for MaxUB..MinUB step 1: $list2" + } + + val list3 = ArrayList() + for (i in MaxUS..MinUS step 1) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf()) { + return "Wrong elements for MaxUS..MinUS step 1: $list3" + } + + val list4 = ArrayList() + for (i in MaxUL..MinUL step 1) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf()) { + return "Wrong elements for MaxUL..MinUL step 1: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMinValueToMinValue.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMinValueToMinValue.kt new file mode 100644 index 00000000000..bfedfbab998 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/progressionMinValueToMinValue.kt @@ -0,0 +1,52 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + +const val MinUI = UInt.MIN_VALUE +const val MinUB = UByte.MIN_VALUE +const val MinUS = UShort.MIN_VALUE +const val MinUL = ULong.MIN_VALUE + +fun box(): String { + val list1 = ArrayList() + for (i in MinUI..MinUI step 1) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(MinUI)) { + return "Wrong elements for MinUI..MinUI step 1: $list1" + } + + val list2 = ArrayList() + for (i in MinUB..MinUB step 1) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(MinUB.toUInt())) { + return "Wrong elements for MinUB..MinUB step 1: $list2" + } + + val list3 = ArrayList() + for (i in MinUS..MinUS step 1) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(MinUS.toUInt())) { + return "Wrong elements for MinUS..MinUS step 1: $list3" + } + + val list4 = ArrayList() + for (i in MinUL..MinUL step 1) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(MinUL)) { + return "Wrong elements for MinUL..MinUL step 1: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/reversedBackSequence.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedBackSequence.kt new file mode 100644 index 00000000000..4059a82e89b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedBackSequence.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in (5u downTo 3u).reversed()) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (5u downTo 3u).reversed(): $list1" + } + + val list2 = ArrayList() + for (i in (5u.toUByte() downTo 3u.toUByte()).reversed()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (5u.toUByte() downTo 3u.toUByte()).reversed(): $list2" + } + + val list3 = ArrayList() + for (i in (5u.toUShort() downTo 3u.toUShort()).reversed()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (5u.toUShort() downTo 3u.toUShort()).reversed(): $list3" + } + + val list4 = ArrayList() + for (i in (5uL downTo 3uL).reversed()) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (5uL downTo 3uL).reversed(): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyBackSequence.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyBackSequence.kt new file mode 100644 index 00000000000..12088a925b9 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyBackSequence.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in (3u downTo 5u).reversed()) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for (3u downTo 5u).reversed(): $list1" + } + + val list2 = ArrayList() + for (i in (3u.toUByte() downTo 5u.toUByte()).reversed()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for (3u.toUByte() downTo 5u.toUByte()).reversed(): $list2" + } + + val list3 = ArrayList() + for (i in (3u.toUShort() downTo 5u.toUShort()).reversed()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf()) { + return "Wrong elements for (3u.toUShort() downTo 5u.toUShort()).reversed(): $list3" + } + + val list4 = ArrayList() + for (i in (3uL downTo 5uL).reversed()) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf()) { + return "Wrong elements for (3uL downTo 5uL).reversed(): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyRange.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyRange.kt new file mode 100644 index 00000000000..b7af2798abd --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyRange.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in (5u..3u).reversed()) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf()) { + return "Wrong elements for (5u..3u).reversed(): $list1" + } + + val list2 = ArrayList() + for (i in (5u.toUByte()..3u.toUByte()).reversed()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf()) { + return "Wrong elements for (5u.toUByte()..3u.toUByte()).reversed(): $list2" + } + + val list3 = ArrayList() + for (i in (5u.toUShort()..3u.toUShort()).reversed()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf()) { + return "Wrong elements for (5u.toUShort()..3u.toUShort()).reversed(): $list3" + } + + val list4 = ArrayList() + for (i in (5uL..3uL).reversed()) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf()) { + return "Wrong elements for (5uL..3uL).reversed(): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/reversedInexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedInexactSteppedDownTo.kt new file mode 100644 index 00000000000..4e422bcd368 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedInexactSteppedDownTo.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in (8u downTo 3u step 2).reversed()) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(4u, 6u, 8u)) { + return "Wrong elements for (8u downTo 3u step 2).reversed(): $list1" + } + + val list2 = ArrayList() + for (i in (8u.toUByte() downTo 3u.toUByte() step 2).reversed()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(4u, 6u, 8u)) { + return "Wrong elements for (8u.toUByte() downTo 3u.toUByte() step 2).reversed(): $list2" + } + + val list3 = ArrayList() + for (i in (8u.toUShort() downTo 3u.toUShort() step 2).reversed()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(4u, 6u, 8u)) { + return "Wrong elements for (8u.toUShort() downTo 3u.toUShort() step 2).reversed(): $list3" + } + + val list4 = ArrayList() + for (i in (8uL downTo 3uL step 2L).reversed()) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(4u, 6u, 8u)) { + return "Wrong elements for (8uL downTo 3uL step 2L).reversed(): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/reversedRange.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedRange.kt new file mode 100644 index 00000000000..4eb756e70ca --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedRange.kt @@ -0,0 +1,39 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in (3u..5u).reversed()) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(5u, 4u, 3u)) { + return "Wrong elements for (3u..5u).reversed(): $list1" + } + + val list2 = ArrayList() + for (i in (3u.toUShort()..5u.toUShort()).reversed()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(5u, 4u, 3u)) { + return "Wrong elements for (3u.toUShort()..5u.toUShort()).reversed(): $list2" + } + + val list3 = ArrayList() + for (i in (3uL..5uL).reversed()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(5u, 4u, 3u)) { + return "Wrong elements for (3uL..5uL).reversed(): $list3" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/reversedSimpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedSimpleSteppedRange.kt new file mode 100644 index 00000000000..e7e6597ed74 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/reversedSimpleSteppedRange.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in (3u..9u step 2).reversed()) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for (3u..9u step 2).reversed(): $list1" + } + + val list2 = ArrayList() + for (i in (3u.toUByte()..9u.toUByte() step 2).reversed()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for (3u.toUByte()..9u.toUByte() step 2).reversed(): $list2" + } + + val list3 = ArrayList() + for (i in (3u.toUShort()..9u.toUShort() step 2).reversed()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for (3u.toUShort()..9u.toUShort() step 2).reversed(): $list3" + } + + val list4 = ArrayList() + for (i in (3uL..9uL step 2L).reversed()) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for (3uL..9uL step 2L).reversed(): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/simpleDownTo.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/simpleDownTo.kt new file mode 100644 index 00000000000..ae6e43eb665 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/simpleDownTo.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in 5u downTo 3u) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(5u, 4u, 3u)) { + return "Wrong elements for 5u downTo 3u: $list1" + } + + val list2 = ArrayList() + for (i in 5u.toUByte() downTo 3u.toUByte()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(5u, 4u, 3u)) { + return "Wrong elements for 5u.toUByte() downTo 3u.toUByte(): $list2" + } + + val list3 = ArrayList() + for (i in 5u.toUShort() downTo 3u.toUShort()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(5u, 4u, 3u)) { + return "Wrong elements for 5u.toUShort() downTo 3u.toUShort(): $list3" + } + + val list4 = ArrayList() + for (i in 5uL downTo 3uL) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(5u, 4u, 3u)) { + return "Wrong elements for 5uL downTo 3uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/simpleRange.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/simpleRange.kt new file mode 100644 index 00000000000..3f3a8c056af --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/simpleRange.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in 3u..5u) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(3u, 4u, 5u)) { + return "Wrong elements for 3u..5u: $list1" + } + + val list2 = ArrayList() + for (i in 3.toUByte()..5.toUByte()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(3u, 4u, 5u)) { + return "Wrong elements for 3.toUByte()..5.toUByte(): $list2" + } + + val list3 = ArrayList() + for (i in 3.toUShort()..5.toUShort()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(3u, 4u, 5u)) { + return "Wrong elements for 3.toUShort()..5.toUShort(): $list3" + } + + val list4 = ArrayList() + for (i in 3uL..5uL) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(3u, 4u, 5u)) { + return "Wrong elements for 3uL..5uL: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/simpleRangeWithNonConstantEnds.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/simpleRangeWithNonConstantEnds.kt new file mode 100644 index 00000000000..e6ad3dfe9aa --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/simpleRangeWithNonConstantEnds.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in (1u + 2u)..(6u - 1u)) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (1u + 2u)..(6u - 1u): $list1" + } + + val list2 = ArrayList() + for (i in (1u.toUByte() + 2u.toUByte()).toUByte()..(6u.toUByte() - 1u.toUByte()).toUByte()) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (1u.toUByte() + 2u.toUByte()).toUByte()..(6u.toUByte() - 1u.toUByte()).toUByte(): $list2" + } + + val list3 = ArrayList() + for (i in (1u.toUShort() + 2u.toUShort()).toUShort()..(6u.toUShort() - 1u.toUShort()).toUShort()) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (1u.toUShort() + 2u.toUShort()).toUShort()..(6u.toUShort() - 1u.toUShort()).toUShort(): $list3" + } + + val list4 = ArrayList() + for (i in (1uL + 2uL)..(6uL - 1uL)) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(3u, 4u, 5u)) { + return "Wrong elements for (1uL + 2uL)..(6uL - 1uL): $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedDownTo.kt new file mode 100644 index 00000000000..9e45704ca5c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedDownTo.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in 9u downTo 3u step 2) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for 9u downTo 3u step 2: $list1" + } + + val list2 = ArrayList() + for (i in 9u.toUByte() downTo 3u.toUByte() step 2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for 9u.toUByte() downTo 3u.toUByte() step 2: $list2" + } + + val list3 = ArrayList() + for (i in 9u.toUShort() downTo 3u.toUShort() step 2) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for 9u.toUShort() downTo 3u.toUShort() step 2: $list3" + } + + val list4 = ArrayList() + for (i in 9uL downTo 3uL step 2L) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(9u, 7u, 5u, 3u)) { + return "Wrong elements for 9uL downTo 3uL step 2L: $list4" + } + + return "OK" +} diff --git a/compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedRange.kt new file mode 100644 index 00000000000..9a188d6456f --- /dev/null +++ b/compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedRange.kt @@ -0,0 +1,48 @@ +// KJS_WITH_FULL_RUNTIME +// TODO: muted automatically, investigate should it be ran for JVM_IR or not +// IGNORE_BACKEND: JVM_IR + +// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! +// WITH_RUNTIME + + + +fun box(): String { + val list1 = ArrayList() + for (i in 3u..9u step 2) { + list1.add(i) + if (list1.size > 23) break + } + if (list1 != listOf(3u, 5u, 7u, 9u)) { + return "Wrong elements for 3u..9u step 2: $list1" + } + + val list2 = ArrayList() + for (i in 3u.toUByte()..9u.toUByte() step 2) { + list2.add(i) + if (list2.size > 23) break + } + if (list2 != listOf(3u, 5u, 7u, 9u)) { + return "Wrong elements for 3u.toUByte()..9u.toUByte() step 2: $list2" + } + + val list3 = ArrayList() + for (i in 3u.toUShort()..9u.toUShort() step 2) { + list3.add(i) + if (list3.size > 23) break + } + if (list3 != listOf(3u, 5u, 7u, 9u)) { + return "Wrong elements for 3u.toUShort()..9u.toUShort() step 2: $list3" + } + + val list4 = ArrayList() + for (i in 3uL..9uL step 2L) { + list4.add(i) + if (list4.size > 23) break + } + if (list4 != listOf(3u, 5u, 7u, 9u)) { + return "Wrong elements for 3uL..9uL step 2L: $list4" + } + + return "OK" +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 690ff4a59b5..c4141aa75ce 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -19469,6 +19469,345 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Unsigned extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInUnsigned() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expression extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("emptyDownto.kt") + public void testEmptyDownto() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/emptyDownto.kt"); + } + + @TestMetadata("emptyRange.kt") + public void testEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/emptyRange.kt"); + } + + @TestMetadata("inexactDownToMinValue.kt") + public void testInexactDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactDownToMinValue.kt"); + } + + @TestMetadata("inexactSteppedDownTo.kt") + public void testInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedDownTo.kt"); + } + + @TestMetadata("inexactSteppedRange.kt") + public void testInexactSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedRange.kt"); + } + + @TestMetadata("inexactToMaxValue.kt") + public void testInexactToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactToMaxValue.kt"); + } + + @TestMetadata("maxValueMinusTwoToMaxValue.kt") + public void testMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("maxValueToMaxValue.kt") + public void testMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMaxValue.kt"); + } + + @TestMetadata("maxValueToMinValue.kt") + public void testMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMinValue.kt"); + } + + @TestMetadata("oneElementDownTo.kt") + public void testOneElementDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/oneElementDownTo.kt"); + } + + @TestMetadata("oneElementRange.kt") + public void testOneElementRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/oneElementRange.kt"); + } + + @TestMetadata("openRange.kt") + public void testOpenRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/openRange.kt"); + } + + @TestMetadata("overflowZeroDownToMaxValue.kt") + public void testOverflowZeroDownToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroDownToMaxValue.kt"); + } + + @TestMetadata("overflowZeroToMinValue.kt") + public void testOverflowZeroToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroToMinValue.kt"); + } + + @TestMetadata("progressionDownToMinValue.kt") + public void testProgressionDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionDownToMinValue.kt"); + } + + @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") + public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMaxValue.kt") + public void testProgressionMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMinValue.kt") + public void testProgressionMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMinValue.kt"); + } + + @TestMetadata("progressionMinValueToMinValue.kt") + public void testProgressionMinValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMinValueToMinValue.kt"); + } + + @TestMetadata("reversedBackSequence.kt") + public void testReversedBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedBackSequence.kt"); + } + + @TestMetadata("reversedEmptyBackSequence.kt") + public void testReversedEmptyBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyBackSequence.kt"); + } + + @TestMetadata("reversedEmptyRange.kt") + public void testReversedEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyRange.kt"); + } + + @TestMetadata("reversedInexactSteppedDownTo.kt") + public void testReversedInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedInexactSteppedDownTo.kt"); + } + + @TestMetadata("reversedRange.kt") + public void testReversedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedRange.kt"); + } + + @TestMetadata("reversedSimpleSteppedRange.kt") + public void testReversedSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedSimpleSteppedRange.kt"); + } + + @TestMetadata("simpleDownTo.kt") + public void testSimpleDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleDownTo.kt"); + } + + @TestMetadata("simpleRange.kt") + public void testSimpleRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleRange.kt"); + } + + @TestMetadata("simpleRangeWithNonConstantEnds.kt") + public void testSimpleRangeWithNonConstantEnds() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleRangeWithNonConstantEnds.kt"); + } + + @TestMetadata("simpleSteppedDownTo.kt") + public void testSimpleSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedDownTo.kt"); + } + + @TestMetadata("simpleSteppedRange.kt") + public void testSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedRange.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/literal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Literal extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInLiteral() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("emptyDownto.kt") + public void testEmptyDownto() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/emptyDownto.kt"); + } + + @TestMetadata("emptyRange.kt") + public void testEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/emptyRange.kt"); + } + + @TestMetadata("inexactDownToMinValue.kt") + public void testInexactDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactDownToMinValue.kt"); + } + + @TestMetadata("inexactSteppedDownTo.kt") + public void testInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedDownTo.kt"); + } + + @TestMetadata("inexactSteppedRange.kt") + public void testInexactSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedRange.kt"); + } + + @TestMetadata("inexactToMaxValue.kt") + public void testInexactToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactToMaxValue.kt"); + } + + @TestMetadata("maxValueMinusTwoToMaxValue.kt") + public void testMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("maxValueToMaxValue.kt") + public void testMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMaxValue.kt"); + } + + @TestMetadata("maxValueToMinValue.kt") + public void testMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMinValue.kt"); + } + + @TestMetadata("oneElementDownTo.kt") + public void testOneElementDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/oneElementDownTo.kt"); + } + + @TestMetadata("oneElementRange.kt") + public void testOneElementRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/oneElementRange.kt"); + } + + @TestMetadata("openRange.kt") + public void testOpenRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/openRange.kt"); + } + + @TestMetadata("overflowZeroDownToMaxValue.kt") + public void testOverflowZeroDownToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroDownToMaxValue.kt"); + } + + @TestMetadata("overflowZeroToMinValue.kt") + public void testOverflowZeroToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroToMinValue.kt"); + } + + @TestMetadata("progressionDownToMinValue.kt") + public void testProgressionDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionDownToMinValue.kt"); + } + + @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") + public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMaxValue.kt") + public void testProgressionMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMinValue.kt") + public void testProgressionMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMinValue.kt"); + } + + @TestMetadata("progressionMinValueToMinValue.kt") + public void testProgressionMinValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMinValueToMinValue.kt"); + } + + @TestMetadata("reversedBackSequence.kt") + public void testReversedBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedBackSequence.kt"); + } + + @TestMetadata("reversedEmptyBackSequence.kt") + public void testReversedEmptyBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyBackSequence.kt"); + } + + @TestMetadata("reversedEmptyRange.kt") + public void testReversedEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyRange.kt"); + } + + @TestMetadata("reversedInexactSteppedDownTo.kt") + public void testReversedInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedInexactSteppedDownTo.kt"); + } + + @TestMetadata("reversedRange.kt") + public void testReversedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedRange.kt"); + } + + @TestMetadata("reversedSimpleSteppedRange.kt") + public void testReversedSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedSimpleSteppedRange.kt"); + } + + @TestMetadata("simpleDownTo.kt") + public void testSimpleDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleDownTo.kt"); + } + + @TestMetadata("simpleRange.kt") + public void testSimpleRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleRange.kt"); + } + + @TestMetadata("simpleRangeWithNonConstantEnds.kt") + public void testSimpleRangeWithNonConstantEnds() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleRangeWithNonConstantEnds.kt"); + } + + @TestMetadata("simpleSteppedDownTo.kt") + public void testSimpleSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedDownTo.kt"); + } + + @TestMetadata("simpleSteppedRange.kt") + public void testSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedRange.kt"); + } + } + } } @TestMetadata("compiler/testData/codegen/box/reflection") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 01ccd6b210d..ef9f695c383 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -19469,6 +19469,345 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Unsigned extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInUnsigned() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expression extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("emptyDownto.kt") + public void testEmptyDownto() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/emptyDownto.kt"); + } + + @TestMetadata("emptyRange.kt") + public void testEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/emptyRange.kt"); + } + + @TestMetadata("inexactDownToMinValue.kt") + public void testInexactDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactDownToMinValue.kt"); + } + + @TestMetadata("inexactSteppedDownTo.kt") + public void testInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedDownTo.kt"); + } + + @TestMetadata("inexactSteppedRange.kt") + public void testInexactSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedRange.kt"); + } + + @TestMetadata("inexactToMaxValue.kt") + public void testInexactToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactToMaxValue.kt"); + } + + @TestMetadata("maxValueMinusTwoToMaxValue.kt") + public void testMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("maxValueToMaxValue.kt") + public void testMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMaxValue.kt"); + } + + @TestMetadata("maxValueToMinValue.kt") + public void testMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMinValue.kt"); + } + + @TestMetadata("oneElementDownTo.kt") + public void testOneElementDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/oneElementDownTo.kt"); + } + + @TestMetadata("oneElementRange.kt") + public void testOneElementRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/oneElementRange.kt"); + } + + @TestMetadata("openRange.kt") + public void testOpenRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/openRange.kt"); + } + + @TestMetadata("overflowZeroDownToMaxValue.kt") + public void testOverflowZeroDownToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroDownToMaxValue.kt"); + } + + @TestMetadata("overflowZeroToMinValue.kt") + public void testOverflowZeroToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroToMinValue.kt"); + } + + @TestMetadata("progressionDownToMinValue.kt") + public void testProgressionDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionDownToMinValue.kt"); + } + + @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") + public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMaxValue.kt") + public void testProgressionMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMinValue.kt") + public void testProgressionMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMinValue.kt"); + } + + @TestMetadata("progressionMinValueToMinValue.kt") + public void testProgressionMinValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMinValueToMinValue.kt"); + } + + @TestMetadata("reversedBackSequence.kt") + public void testReversedBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedBackSequence.kt"); + } + + @TestMetadata("reversedEmptyBackSequence.kt") + public void testReversedEmptyBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyBackSequence.kt"); + } + + @TestMetadata("reversedEmptyRange.kt") + public void testReversedEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyRange.kt"); + } + + @TestMetadata("reversedInexactSteppedDownTo.kt") + public void testReversedInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedInexactSteppedDownTo.kt"); + } + + @TestMetadata("reversedRange.kt") + public void testReversedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedRange.kt"); + } + + @TestMetadata("reversedSimpleSteppedRange.kt") + public void testReversedSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedSimpleSteppedRange.kt"); + } + + @TestMetadata("simpleDownTo.kt") + public void testSimpleDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleDownTo.kt"); + } + + @TestMetadata("simpleRange.kt") + public void testSimpleRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleRange.kt"); + } + + @TestMetadata("simpleRangeWithNonConstantEnds.kt") + public void testSimpleRangeWithNonConstantEnds() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleRangeWithNonConstantEnds.kt"); + } + + @TestMetadata("simpleSteppedDownTo.kt") + public void testSimpleSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedDownTo.kt"); + } + + @TestMetadata("simpleSteppedRange.kt") + public void testSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedRange.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/literal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Literal extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInLiteral() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("emptyDownto.kt") + public void testEmptyDownto() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/emptyDownto.kt"); + } + + @TestMetadata("emptyRange.kt") + public void testEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/emptyRange.kt"); + } + + @TestMetadata("inexactDownToMinValue.kt") + public void testInexactDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactDownToMinValue.kt"); + } + + @TestMetadata("inexactSteppedDownTo.kt") + public void testInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedDownTo.kt"); + } + + @TestMetadata("inexactSteppedRange.kt") + public void testInexactSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedRange.kt"); + } + + @TestMetadata("inexactToMaxValue.kt") + public void testInexactToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactToMaxValue.kt"); + } + + @TestMetadata("maxValueMinusTwoToMaxValue.kt") + public void testMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("maxValueToMaxValue.kt") + public void testMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMaxValue.kt"); + } + + @TestMetadata("maxValueToMinValue.kt") + public void testMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMinValue.kt"); + } + + @TestMetadata("oneElementDownTo.kt") + public void testOneElementDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/oneElementDownTo.kt"); + } + + @TestMetadata("oneElementRange.kt") + public void testOneElementRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/oneElementRange.kt"); + } + + @TestMetadata("openRange.kt") + public void testOpenRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/openRange.kt"); + } + + @TestMetadata("overflowZeroDownToMaxValue.kt") + public void testOverflowZeroDownToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroDownToMaxValue.kt"); + } + + @TestMetadata("overflowZeroToMinValue.kt") + public void testOverflowZeroToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroToMinValue.kt"); + } + + @TestMetadata("progressionDownToMinValue.kt") + public void testProgressionDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionDownToMinValue.kt"); + } + + @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") + public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMaxValue.kt") + public void testProgressionMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMinValue.kt") + public void testProgressionMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMinValue.kt"); + } + + @TestMetadata("progressionMinValueToMinValue.kt") + public void testProgressionMinValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMinValueToMinValue.kt"); + } + + @TestMetadata("reversedBackSequence.kt") + public void testReversedBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedBackSequence.kt"); + } + + @TestMetadata("reversedEmptyBackSequence.kt") + public void testReversedEmptyBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyBackSequence.kt"); + } + + @TestMetadata("reversedEmptyRange.kt") + public void testReversedEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyRange.kt"); + } + + @TestMetadata("reversedInexactSteppedDownTo.kt") + public void testReversedInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedInexactSteppedDownTo.kt"); + } + + @TestMetadata("reversedRange.kt") + public void testReversedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedRange.kt"); + } + + @TestMetadata("reversedSimpleSteppedRange.kt") + public void testReversedSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedSimpleSteppedRange.kt"); + } + + @TestMetadata("simpleDownTo.kt") + public void testSimpleDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleDownTo.kt"); + } + + @TestMetadata("simpleRange.kt") + public void testSimpleRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleRange.kt"); + } + + @TestMetadata("simpleRangeWithNonConstantEnds.kt") + public void testSimpleRangeWithNonConstantEnds() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleRangeWithNonConstantEnds.kt"); + } + + @TestMetadata("simpleSteppedDownTo.kt") + public void testSimpleSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedDownTo.kt"); + } + + @TestMetadata("simpleSteppedRange.kt") + public void testSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedRange.kt"); + } + } + } } @TestMetadata("compiler/testData/codegen/box/reflection") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index d5d98e6109a..e67246fbb88 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -19474,6 +19474,345 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Unsigned extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInUnsigned() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expression extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyDownto.kt") + public void testEmptyDownto() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/emptyDownto.kt"); + } + + @TestMetadata("emptyRange.kt") + public void testEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/emptyRange.kt"); + } + + @TestMetadata("inexactDownToMinValue.kt") + public void testInexactDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactDownToMinValue.kt"); + } + + @TestMetadata("inexactSteppedDownTo.kt") + public void testInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedDownTo.kt"); + } + + @TestMetadata("inexactSteppedRange.kt") + public void testInexactSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedRange.kt"); + } + + @TestMetadata("inexactToMaxValue.kt") + public void testInexactToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactToMaxValue.kt"); + } + + @TestMetadata("maxValueMinusTwoToMaxValue.kt") + public void testMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("maxValueToMaxValue.kt") + public void testMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMaxValue.kt"); + } + + @TestMetadata("maxValueToMinValue.kt") + public void testMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMinValue.kt"); + } + + @TestMetadata("oneElementDownTo.kt") + public void testOneElementDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/oneElementDownTo.kt"); + } + + @TestMetadata("oneElementRange.kt") + public void testOneElementRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/oneElementRange.kt"); + } + + @TestMetadata("openRange.kt") + public void testOpenRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/openRange.kt"); + } + + @TestMetadata("overflowZeroDownToMaxValue.kt") + public void testOverflowZeroDownToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroDownToMaxValue.kt"); + } + + @TestMetadata("overflowZeroToMinValue.kt") + public void testOverflowZeroToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroToMinValue.kt"); + } + + @TestMetadata("progressionDownToMinValue.kt") + public void testProgressionDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionDownToMinValue.kt"); + } + + @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") + public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMaxValue.kt") + public void testProgressionMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMinValue.kt") + public void testProgressionMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMinValue.kt"); + } + + @TestMetadata("progressionMinValueToMinValue.kt") + public void testProgressionMinValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMinValueToMinValue.kt"); + } + + @TestMetadata("reversedBackSequence.kt") + public void testReversedBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedBackSequence.kt"); + } + + @TestMetadata("reversedEmptyBackSequence.kt") + public void testReversedEmptyBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyBackSequence.kt"); + } + + @TestMetadata("reversedEmptyRange.kt") + public void testReversedEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyRange.kt"); + } + + @TestMetadata("reversedInexactSteppedDownTo.kt") + public void testReversedInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedInexactSteppedDownTo.kt"); + } + + @TestMetadata("reversedRange.kt") + public void testReversedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedRange.kt"); + } + + @TestMetadata("reversedSimpleSteppedRange.kt") + public void testReversedSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedSimpleSteppedRange.kt"); + } + + @TestMetadata("simpleDownTo.kt") + public void testSimpleDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleDownTo.kt"); + } + + @TestMetadata("simpleRange.kt") + public void testSimpleRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleRange.kt"); + } + + @TestMetadata("simpleRangeWithNonConstantEnds.kt") + public void testSimpleRangeWithNonConstantEnds() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleRangeWithNonConstantEnds.kt"); + } + + @TestMetadata("simpleSteppedDownTo.kt") + public void testSimpleSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedDownTo.kt"); + } + + @TestMetadata("simpleSteppedRange.kt") + public void testSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedRange.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/literal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Literal extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInLiteral() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyDownto.kt") + public void testEmptyDownto() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/emptyDownto.kt"); + } + + @TestMetadata("emptyRange.kt") + public void testEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/emptyRange.kt"); + } + + @TestMetadata("inexactDownToMinValue.kt") + public void testInexactDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactDownToMinValue.kt"); + } + + @TestMetadata("inexactSteppedDownTo.kt") + public void testInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedDownTo.kt"); + } + + @TestMetadata("inexactSteppedRange.kt") + public void testInexactSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedRange.kt"); + } + + @TestMetadata("inexactToMaxValue.kt") + public void testInexactToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactToMaxValue.kt"); + } + + @TestMetadata("maxValueMinusTwoToMaxValue.kt") + public void testMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("maxValueToMaxValue.kt") + public void testMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMaxValue.kt"); + } + + @TestMetadata("maxValueToMinValue.kt") + public void testMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMinValue.kt"); + } + + @TestMetadata("oneElementDownTo.kt") + public void testOneElementDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/oneElementDownTo.kt"); + } + + @TestMetadata("oneElementRange.kt") + public void testOneElementRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/oneElementRange.kt"); + } + + @TestMetadata("openRange.kt") + public void testOpenRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/openRange.kt"); + } + + @TestMetadata("overflowZeroDownToMaxValue.kt") + public void testOverflowZeroDownToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroDownToMaxValue.kt"); + } + + @TestMetadata("overflowZeroToMinValue.kt") + public void testOverflowZeroToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroToMinValue.kt"); + } + + @TestMetadata("progressionDownToMinValue.kt") + public void testProgressionDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionDownToMinValue.kt"); + } + + @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") + public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMaxValue.kt") + public void testProgressionMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMinValue.kt") + public void testProgressionMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMinValue.kt"); + } + + @TestMetadata("progressionMinValueToMinValue.kt") + public void testProgressionMinValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMinValueToMinValue.kt"); + } + + @TestMetadata("reversedBackSequence.kt") + public void testReversedBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedBackSequence.kt"); + } + + @TestMetadata("reversedEmptyBackSequence.kt") + public void testReversedEmptyBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyBackSequence.kt"); + } + + @TestMetadata("reversedEmptyRange.kt") + public void testReversedEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyRange.kt"); + } + + @TestMetadata("reversedInexactSteppedDownTo.kt") + public void testReversedInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedInexactSteppedDownTo.kt"); + } + + @TestMetadata("reversedRange.kt") + public void testReversedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedRange.kt"); + } + + @TestMetadata("reversedSimpleSteppedRange.kt") + public void testReversedSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedSimpleSteppedRange.kt"); + } + + @TestMetadata("simpleDownTo.kt") + public void testSimpleDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleDownTo.kt"); + } + + @TestMetadata("simpleRange.kt") + public void testSimpleRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleRange.kt"); + } + + @TestMetadata("simpleRangeWithNonConstantEnds.kt") + public void testSimpleRangeWithNonConstantEnds() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleRangeWithNonConstantEnds.kt"); + } + + @TestMetadata("simpleSteppedDownTo.kt") + public void testSimpleSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedDownTo.kt"); + } + + @TestMetadata("simpleSteppedRange.kt") + public void testSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedRange.kt"); + } + } + } } @TestMetadata("compiler/testData/codegen/box/reflection") diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java index 490045d0f72..ff0acf5f46b 100644 --- a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java +++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java @@ -32,12 +32,16 @@ public class GenerateRangesCodegenTestData { private static final File TEST_DATA_DIR = new File("compiler/testData/codegen/box/ranges"); private static final File AS_LITERAL_DIR = new File(TEST_DATA_DIR, "literal"); private static final File AS_EXPRESSION_DIR = new File(TEST_DATA_DIR, "expression"); + private static final File UNSIGNED_TEST_DATA_DIR = new File(TEST_DATA_DIR, "unsigned"); + private static final File UNSIGNED_AS_LITERAL_DIR = new File(UNSIGNED_TEST_DATA_DIR, "literal"); + private static final File UNSIGNED_AS_EXPRESSION_DIR = new File(UNSIGNED_TEST_DATA_DIR, "expression"); private static final File[] SOURCE_TEST_FILES = { new File("libraries/stdlib/test/ranges/RangeIterationTest.kt"), }; private static final Pattern TEST_FUN_PATTERN = Pattern.compile("@Test fun (\\w+)\\(\\) \\{.+?}", Pattern.DOTALL); - private static final Pattern SUBTEST_INVOCATION_PATTERN = Pattern.compile("doTest\\(([^,]+), [^,]+, [^,]+, [^,]+,\\s+listOf[\\w<>]*\\(([^\\n]*)\\)\\)", Pattern.DOTALL); + private static final Pattern SUBTEST_INVOCATION_PATTERN = + Pattern.compile("doTest\\(([^,]+), [^,]+, [^,]+, [^,]+,\\s+listOf[\\w<>]*\\(([^\\n]*)\\)\\)", Pattern.DOTALL); // $LIST.size() check is needed in order for tests not to run forever private static final String LITERAL_TEMPLATE = " val $LIST = ArrayList<$TYPE>()\n" + @@ -61,7 +65,8 @@ public class GenerateRangesCodegenTestData { " }\n" + "\n"; - private static final List INTEGER_PRIMITIVES = Arrays.asList("Int", "Byte", "Short", "Long", "Char", "UInt", "UByte", "UShort", "ULong"); + private static final List INTEGER_PRIMITIVES = + Arrays.asList("Int", "Byte", "Short", "Long", "Char", "UInt", "UByte", "UShort", "ULong"); private static final Map ELEMENT_TYPE_KNOWN_SUBSTRINGS = new HashMap<>(); private static final Map MIN_MAX_CONSTANTS = new LinkedHashMap<>(); @@ -108,7 +113,13 @@ public class GenerateRangesCodegenTestData { operandType; } - private static String renderTemplate(String template, int number, String elementType, String rangeExpression, String expectedListElements) { + private static String renderTemplate( + String template, + int number, + String elementType, + String rangeExpression, + String expectedListElements + ) { return template .replace("$RANGE_EXPR_ESCAPED", StringUtil.escapeStringCharacters(rangeExpression)) .replace("$RANGE_EXPR", rangeExpression) @@ -126,7 +137,7 @@ public class GenerateRangesCodegenTestData { out.printf("// IGNORE_BACKEND: %s%n%n", backendName); } - private static void writeToFile(File file, String generatedBody) { + private static void writeToFile(File file, String generatedBody, boolean isForUnsigned) { PrintWriter out; try { //noinspection IOResourceOpenedButNotSafelyClosed @@ -138,8 +149,8 @@ public class GenerateRangesCodegenTestData { out.println("// KJS_WITH_FULL_RUNTIME"); - // Ranges are not supported in JVM_IR yet - if (!WHITELISTED_FOR_JVM_IR_BACKEND.contains(file.getName())) { + // Most test cases for unsigned ranges/progressions are broken for JVM_IR, due to inlining. + if (isForUnsigned && !WHITELISTED_FOR_JVM_IR_BACKEND.contains(file.getName())) { writeIgnoreBackendDirective(out, "JVM_IR"); } @@ -166,10 +177,16 @@ public class GenerateRangesCodegenTestData { try { FileUtil.delete(AS_LITERAL_DIR); FileUtil.delete(AS_EXPRESSION_DIR); + FileUtil.delete(UNSIGNED_AS_LITERAL_DIR); + FileUtil.delete(UNSIGNED_AS_EXPRESSION_DIR); //noinspection ResultOfMethodCallIgnored AS_LITERAL_DIR.mkdirs(); //noinspection ResultOfMethodCallIgnored AS_EXPRESSION_DIR.mkdirs(); + //noinspection ResultOfMethodCallIgnored + UNSIGNED_AS_LITERAL_DIR.mkdirs(); + //noinspection ResultOfMethodCallIgnored + UNSIGNED_AS_EXPRESSION_DIR.mkdirs(); for (File file : SOURCE_TEST_FILES) { String sourceContent = FileUtil.loadFile(file); @@ -184,24 +201,43 @@ public class GenerateRangesCodegenTestData { StringBuilder asLiteralBody = new StringBuilder(); StringBuilder asExpressionBody = new StringBuilder(); - int index = 0; + StringBuilder unsignedAsLiteralBody = new StringBuilder(); + StringBuilder unsignedAsExpressionBody = new StringBuilder(); + int signedIndex = 0; + int unsignedIndex = 0; Matcher matcher = SUBTEST_INVOCATION_PATTERN.matcher(testFunText); while (matcher.find()) { - index++; String rangeExpression = matcher.group(1); String expectedListElements = matcher.group(2); String elementType = detectElementType(rangeExpression); - asLiteralBody.append(renderTemplate(LITERAL_TEMPLATE, index, elementType, rangeExpression, expectedListElements)); - asExpressionBody.append(renderTemplate(EXPRESSION_TEMPLATE, index, elementType, rangeExpression, expectedListElements)); + if (elementType.startsWith("U")) { + unsignedIndex++; + unsignedAsLiteralBody + .append(renderTemplate(LITERAL_TEMPLATE, unsignedIndex, elementType, rangeExpression, + expectedListElements)); + unsignedAsExpressionBody + .append(renderTemplate(EXPRESSION_TEMPLATE, unsignedIndex, elementType, rangeExpression, + expectedListElements)); + } + else { + signedIndex++; + asLiteralBody + .append(renderTemplate(LITERAL_TEMPLATE, signedIndex, elementType, rangeExpression, + expectedListElements)); + asExpressionBody + .append(renderTemplate(EXPRESSION_TEMPLATE, signedIndex, elementType, rangeExpression, + expectedListElements)); + } } String fileName = testFunName + ".kt"; - writeToFile(new File(AS_LITERAL_DIR, fileName), asLiteralBody.toString()); - writeToFile(new File(AS_EXPRESSION_DIR, fileName), asExpressionBody.toString()); + writeToFile(new File(AS_LITERAL_DIR, fileName), asLiteralBody.toString(), false); + writeToFile(new File(AS_EXPRESSION_DIR, fileName), asExpressionBody.toString(), false); + writeToFile(new File(UNSIGNED_AS_LITERAL_DIR, fileName), unsignedAsLiteralBody.toString(), true); + writeToFile(new File(UNSIGNED_AS_EXPRESSION_DIR, fileName), unsignedAsExpressionBody.toString(), true); } } - } catch (IOException e) { throw new RuntimeException(e); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index f1494c81522..1a7b6f759ce 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -15459,6 +15459,345 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Unsigned extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInUnsigned() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expression extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + + @TestMetadata("emptyDownto.kt") + public void testEmptyDownto() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/emptyDownto.kt"); + } + + @TestMetadata("emptyRange.kt") + public void testEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/emptyRange.kt"); + } + + @TestMetadata("inexactDownToMinValue.kt") + public void testInexactDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactDownToMinValue.kt"); + } + + @TestMetadata("inexactSteppedDownTo.kt") + public void testInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedDownTo.kt"); + } + + @TestMetadata("inexactSteppedRange.kt") + public void testInexactSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedRange.kt"); + } + + @TestMetadata("inexactToMaxValue.kt") + public void testInexactToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactToMaxValue.kt"); + } + + @TestMetadata("maxValueMinusTwoToMaxValue.kt") + public void testMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("maxValueToMaxValue.kt") + public void testMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMaxValue.kt"); + } + + @TestMetadata("maxValueToMinValue.kt") + public void testMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMinValue.kt"); + } + + @TestMetadata("oneElementDownTo.kt") + public void testOneElementDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/oneElementDownTo.kt"); + } + + @TestMetadata("oneElementRange.kt") + public void testOneElementRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/oneElementRange.kt"); + } + + @TestMetadata("openRange.kt") + public void testOpenRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/openRange.kt"); + } + + @TestMetadata("overflowZeroDownToMaxValue.kt") + public void testOverflowZeroDownToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroDownToMaxValue.kt"); + } + + @TestMetadata("overflowZeroToMinValue.kt") + public void testOverflowZeroToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroToMinValue.kt"); + } + + @TestMetadata("progressionDownToMinValue.kt") + public void testProgressionDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionDownToMinValue.kt"); + } + + @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") + public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMaxValue.kt") + public void testProgressionMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMinValue.kt") + public void testProgressionMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMinValue.kt"); + } + + @TestMetadata("progressionMinValueToMinValue.kt") + public void testProgressionMinValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMinValueToMinValue.kt"); + } + + @TestMetadata("reversedBackSequence.kt") + public void testReversedBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedBackSequence.kt"); + } + + @TestMetadata("reversedEmptyBackSequence.kt") + public void testReversedEmptyBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyBackSequence.kt"); + } + + @TestMetadata("reversedEmptyRange.kt") + public void testReversedEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyRange.kt"); + } + + @TestMetadata("reversedInexactSteppedDownTo.kt") + public void testReversedInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedInexactSteppedDownTo.kt"); + } + + @TestMetadata("reversedRange.kt") + public void testReversedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedRange.kt"); + } + + @TestMetadata("reversedSimpleSteppedRange.kt") + public void testReversedSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedSimpleSteppedRange.kt"); + } + + @TestMetadata("simpleDownTo.kt") + public void testSimpleDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleDownTo.kt"); + } + + @TestMetadata("simpleRange.kt") + public void testSimpleRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleRange.kt"); + } + + @TestMetadata("simpleRangeWithNonConstantEnds.kt") + public void testSimpleRangeWithNonConstantEnds() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleRangeWithNonConstantEnds.kt"); + } + + @TestMetadata("simpleSteppedDownTo.kt") + public void testSimpleSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedDownTo.kt"); + } + + @TestMetadata("simpleSteppedRange.kt") + public void testSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedRange.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/literal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Literal extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInLiteral() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + + @TestMetadata("emptyDownto.kt") + public void testEmptyDownto() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/emptyDownto.kt"); + } + + @TestMetadata("emptyRange.kt") + public void testEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/emptyRange.kt"); + } + + @TestMetadata("inexactDownToMinValue.kt") + public void testInexactDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactDownToMinValue.kt"); + } + + @TestMetadata("inexactSteppedDownTo.kt") + public void testInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedDownTo.kt"); + } + + @TestMetadata("inexactSteppedRange.kt") + public void testInexactSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedRange.kt"); + } + + @TestMetadata("inexactToMaxValue.kt") + public void testInexactToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactToMaxValue.kt"); + } + + @TestMetadata("maxValueMinusTwoToMaxValue.kt") + public void testMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("maxValueToMaxValue.kt") + public void testMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMaxValue.kt"); + } + + @TestMetadata("maxValueToMinValue.kt") + public void testMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMinValue.kt"); + } + + @TestMetadata("oneElementDownTo.kt") + public void testOneElementDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/oneElementDownTo.kt"); + } + + @TestMetadata("oneElementRange.kt") + public void testOneElementRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/oneElementRange.kt"); + } + + @TestMetadata("openRange.kt") + public void testOpenRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/openRange.kt"); + } + + @TestMetadata("overflowZeroDownToMaxValue.kt") + public void testOverflowZeroDownToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroDownToMaxValue.kt"); + } + + @TestMetadata("overflowZeroToMinValue.kt") + public void testOverflowZeroToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroToMinValue.kt"); + } + + @TestMetadata("progressionDownToMinValue.kt") + public void testProgressionDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionDownToMinValue.kt"); + } + + @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") + public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMaxValue.kt") + public void testProgressionMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMinValue.kt") + public void testProgressionMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMinValue.kt"); + } + + @TestMetadata("progressionMinValueToMinValue.kt") + public void testProgressionMinValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMinValueToMinValue.kt"); + } + + @TestMetadata("reversedBackSequence.kt") + public void testReversedBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedBackSequence.kt"); + } + + @TestMetadata("reversedEmptyBackSequence.kt") + public void testReversedEmptyBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyBackSequence.kt"); + } + + @TestMetadata("reversedEmptyRange.kt") + public void testReversedEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyRange.kt"); + } + + @TestMetadata("reversedInexactSteppedDownTo.kt") + public void testReversedInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedInexactSteppedDownTo.kt"); + } + + @TestMetadata("reversedRange.kt") + public void testReversedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedRange.kt"); + } + + @TestMetadata("reversedSimpleSteppedRange.kt") + public void testReversedSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedSimpleSteppedRange.kt"); + } + + @TestMetadata("simpleDownTo.kt") + public void testSimpleDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleDownTo.kt"); + } + + @TestMetadata("simpleRange.kt") + public void testSimpleRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleRange.kt"); + } + + @TestMetadata("simpleRangeWithNonConstantEnds.kt") + public void testSimpleRangeWithNonConstantEnds() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleRangeWithNonConstantEnds.kt"); + } + + @TestMetadata("simpleSteppedDownTo.kt") + public void testSimpleSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedDownTo.kt"); + } + + @TestMetadata("simpleSteppedRange.kt") + public void testSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedRange.kt"); + } + } + } } @TestMetadata("compiler/testData/codegen/box/reflection") diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 373294422c4..e1689058cab 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -16604,6 +16604,345 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Unsigned extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInUnsigned() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expression extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + + @TestMetadata("emptyDownto.kt") + public void testEmptyDownto() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/emptyDownto.kt"); + } + + @TestMetadata("emptyRange.kt") + public void testEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/emptyRange.kt"); + } + + @TestMetadata("inexactDownToMinValue.kt") + public void testInexactDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactDownToMinValue.kt"); + } + + @TestMetadata("inexactSteppedDownTo.kt") + public void testInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedDownTo.kt"); + } + + @TestMetadata("inexactSteppedRange.kt") + public void testInexactSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactSteppedRange.kt"); + } + + @TestMetadata("inexactToMaxValue.kt") + public void testInexactToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/inexactToMaxValue.kt"); + } + + @TestMetadata("maxValueMinusTwoToMaxValue.kt") + public void testMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("maxValueToMaxValue.kt") + public void testMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMaxValue.kt"); + } + + @TestMetadata("maxValueToMinValue.kt") + public void testMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/maxValueToMinValue.kt"); + } + + @TestMetadata("oneElementDownTo.kt") + public void testOneElementDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/oneElementDownTo.kt"); + } + + @TestMetadata("oneElementRange.kt") + public void testOneElementRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/oneElementRange.kt"); + } + + @TestMetadata("openRange.kt") + public void testOpenRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/openRange.kt"); + } + + @TestMetadata("overflowZeroDownToMaxValue.kt") + public void testOverflowZeroDownToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroDownToMaxValue.kt"); + } + + @TestMetadata("overflowZeroToMinValue.kt") + public void testOverflowZeroToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/overflowZeroToMinValue.kt"); + } + + @TestMetadata("progressionDownToMinValue.kt") + public void testProgressionDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionDownToMinValue.kt"); + } + + @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") + public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMaxValue.kt") + public void testProgressionMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMinValue.kt") + public void testProgressionMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMaxValueToMinValue.kt"); + } + + @TestMetadata("progressionMinValueToMinValue.kt") + public void testProgressionMinValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/progressionMinValueToMinValue.kt"); + } + + @TestMetadata("reversedBackSequence.kt") + public void testReversedBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedBackSequence.kt"); + } + + @TestMetadata("reversedEmptyBackSequence.kt") + public void testReversedEmptyBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyBackSequence.kt"); + } + + @TestMetadata("reversedEmptyRange.kt") + public void testReversedEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedEmptyRange.kt"); + } + + @TestMetadata("reversedInexactSteppedDownTo.kt") + public void testReversedInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedInexactSteppedDownTo.kt"); + } + + @TestMetadata("reversedRange.kt") + public void testReversedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedRange.kt"); + } + + @TestMetadata("reversedSimpleSteppedRange.kt") + public void testReversedSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/reversedSimpleSteppedRange.kt"); + } + + @TestMetadata("simpleDownTo.kt") + public void testSimpleDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleDownTo.kt"); + } + + @TestMetadata("simpleRange.kt") + public void testSimpleRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleRange.kt"); + } + + @TestMetadata("simpleRangeWithNonConstantEnds.kt") + public void testSimpleRangeWithNonConstantEnds() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleRangeWithNonConstantEnds.kt"); + } + + @TestMetadata("simpleSteppedDownTo.kt") + public void testSimpleSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedDownTo.kt"); + } + + @TestMetadata("simpleSteppedRange.kt") + public void testSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/expression/simpleSteppedRange.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/literal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Literal extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInLiteral() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + + @TestMetadata("emptyDownto.kt") + public void testEmptyDownto() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/emptyDownto.kt"); + } + + @TestMetadata("emptyRange.kt") + public void testEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/emptyRange.kt"); + } + + @TestMetadata("inexactDownToMinValue.kt") + public void testInexactDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactDownToMinValue.kt"); + } + + @TestMetadata("inexactSteppedDownTo.kt") + public void testInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedDownTo.kt"); + } + + @TestMetadata("inexactSteppedRange.kt") + public void testInexactSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactSteppedRange.kt"); + } + + @TestMetadata("inexactToMaxValue.kt") + public void testInexactToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/inexactToMaxValue.kt"); + } + + @TestMetadata("maxValueMinusTwoToMaxValue.kt") + public void testMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("maxValueToMaxValue.kt") + public void testMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMaxValue.kt"); + } + + @TestMetadata("maxValueToMinValue.kt") + public void testMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/maxValueToMinValue.kt"); + } + + @TestMetadata("oneElementDownTo.kt") + public void testOneElementDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/oneElementDownTo.kt"); + } + + @TestMetadata("oneElementRange.kt") + public void testOneElementRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/oneElementRange.kt"); + } + + @TestMetadata("openRange.kt") + public void testOpenRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/openRange.kt"); + } + + @TestMetadata("overflowZeroDownToMaxValue.kt") + public void testOverflowZeroDownToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroDownToMaxValue.kt"); + } + + @TestMetadata("overflowZeroToMinValue.kt") + public void testOverflowZeroToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/overflowZeroToMinValue.kt"); + } + + @TestMetadata("progressionDownToMinValue.kt") + public void testProgressionDownToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionDownToMinValue.kt"); + } + + @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") + public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueMinusTwoToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMaxValue.kt") + public void testProgressionMaxValueToMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMaxValue.kt"); + } + + @TestMetadata("progressionMaxValueToMinValue.kt") + public void testProgressionMaxValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMaxValueToMinValue.kt"); + } + + @TestMetadata("progressionMinValueToMinValue.kt") + public void testProgressionMinValueToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/progressionMinValueToMinValue.kt"); + } + + @TestMetadata("reversedBackSequence.kt") + public void testReversedBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedBackSequence.kt"); + } + + @TestMetadata("reversedEmptyBackSequence.kt") + public void testReversedEmptyBackSequence() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyBackSequence.kt"); + } + + @TestMetadata("reversedEmptyRange.kt") + public void testReversedEmptyRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedEmptyRange.kt"); + } + + @TestMetadata("reversedInexactSteppedDownTo.kt") + public void testReversedInexactSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedInexactSteppedDownTo.kt"); + } + + @TestMetadata("reversedRange.kt") + public void testReversedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedRange.kt"); + } + + @TestMetadata("reversedSimpleSteppedRange.kt") + public void testReversedSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/reversedSimpleSteppedRange.kt"); + } + + @TestMetadata("simpleDownTo.kt") + public void testSimpleDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleDownTo.kt"); + } + + @TestMetadata("simpleRange.kt") + public void testSimpleRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleRange.kt"); + } + + @TestMetadata("simpleRangeWithNonConstantEnds.kt") + public void testSimpleRangeWithNonConstantEnds() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleRangeWithNonConstantEnds.kt"); + } + + @TestMetadata("simpleSteppedDownTo.kt") + public void testSimpleSteppedDownTo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedDownTo.kt"); + } + + @TestMetadata("simpleSteppedRange.kt") + public void testSimpleSteppedRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/unsigned/literal/simpleSteppedRange.kt"); + } + } + } } @TestMetadata("compiler/testData/codegen/box/reflection")