diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/emptyProgression.kt index 6401b43c368..6f0cfef97b8 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/emptyProgression.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/emptyProgression.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepNegative.kt index a400de9de73..c315db324d5 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepNegative.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepNegative.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepNonConst.kt index a7c8971455b..23c6d858efd 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepNonConst.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepThenLegalStep.kt index 66af5bc4dce..683d19dc8fa 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepThenLegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepThenLegalStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepZero.kt index 83c0a906b3d..84cafa454b8 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepZero.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepZero.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/legalStepThenIllegalStep.kt index c7481b441af..ec09945cf2e 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/legalStepThenIllegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/legalStepThenIllegalStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToMinValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToMinValueStepMaxValue.kt index f96923c4724..8afc4ddd45f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToMinValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToMinValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* @@ -15,7 +16,7 @@ fun box(): String { for (i in longProgression step Long.MAX_VALUE) { longList += i } - assertEquals(listOf(Long.MAX_VALUE, 0, Long.MIN_VALUE + 1), longList) + assertEquals(listOf(Long.MAX_VALUE, 0L, Long.MIN_VALUE + 1), longList) val charList = mutableListOf() val charProgression = Char.MAX_VALUE downTo Char.MIN_VALUE diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToOneStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToOneStepMaxValue.kt index cdf0bcf9a8c..071bd39161c 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToOneStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToOneStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToZeroStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToZeroStepMaxValue.kt index 0a86a79db2b..72e798d2533 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToZeroStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToZeroStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/mixedTypeStep.kt index 8c805d0058e..424396a89a9 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/mixedTypeStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/mixedTypeStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepOneThenStepOne.kt index 81cde96a222..5f610042289 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepOneThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepOneThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepThenSameStep.kt index 98da6bd12b8..30dd1825543 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepThenSameStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepThenSameStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt index 2a7b4ed128e..093451482b9 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt index 0ee7d432b6c..1fd072a26dc 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt index a6dff6d8e06..2a1e0dc40ac 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt index 249748fd383..d48bd23379f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt index f570e3b8cba..269be1bd85e 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt index 3d7c0ad22b2..2309028fa7a 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStep.kt index a02ac1e799f..6d13ff089b6 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStep.kt @@ -1,22 +1,26 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { val intList = mutableListOf() - for (i in (8 downTo 1).reversed() step 2) { + val intProgression = 8 downTo 1 + for (i in intProgression.reversed() step 2) { intList += i } assertEquals(listOf(1, 3, 5, 7), intList) val longList = mutableListOf() - for (i in (8L downTo 1L).reversed() step 2L) { + val longProgression = 8L downTo 1L + for (i in longProgression.reversed() step 2L) { longList += i } assertEquals(listOf(1L, 3L, 5L, 7L), longList) val charList = mutableListOf() - for (i in ('h' downTo 'a').reversed() step 2) { + val charProgression = 'h' downTo 'a' + for (i in charProgression.reversed() step 2) { charList += i } assertEquals(listOf('a', 'c', 'e', 'g'), charList) diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStepThenReversed.kt index 1a65b80816d..3fc28d97217 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStepThenReversed.kt @@ -1,22 +1,26 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { val intList = mutableListOf() - for (i in ((8 downTo 1).reversed() step 2).reversed()) { + val intProgression = 8 downTo 1 + for (i in (intProgression.reversed() step 2).reversed()) { intList += i } assertEquals(listOf(7, 5, 3, 1), intList) val longList = mutableListOf() - for (i in ((8L downTo 1L).reversed() step 2L).reversed()) { + val longProgression = 8L downTo 1L + for (i in (longProgression.reversed() step 2L).reversed()) { longList += i } assertEquals(listOf(7L, 5L, 3L, 1L), longList) val charList = mutableListOf() - for (i in (('h' downTo 'a').reversed() step 2).reversed()) { + val charProgression = 'h' downTo 'a' + for (i in (charProgression.reversed() step 2).reversed()) { charList += i } assertEquals(listOf('g', 'e', 'c', 'a'), charList) diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt index 47b6006406e..fdd896ba069 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt @@ -1,22 +1,26 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { val intList = mutableListOf() - for (i in ((10 downTo 1).reversed() step 2).reversed() step 3) { + val intProgression = 10 downTo 1 + for (i in (intProgression.reversed() step 2).reversed() step 3) { intList += i } assertEquals(listOf(9, 6, 3), intList) val longList = mutableListOf() - for (i in ((10L downTo 1L).reversed() step 2L).reversed() step 3L) { + val longProgression = 10L downTo 1L + for (i in (longProgression.reversed() step 2L).reversed() step 3L) { longList += i } assertEquals(listOf(9L, 6L, 3L), longList) val charList = mutableListOf() - for (i in (('j' downTo 'a').reversed() step 2).reversed() step 3) { + val charProgression = 'j' downTo 'a' + for (i in (charProgression.reversed() step 2).reversed() step 3) { charList += i } assertEquals(listOf('i', 'f', 'c'), charList) diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversed.kt index 521d398dd49..181a5a3cc77 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversed.kt @@ -1,22 +1,26 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { val intList = mutableListOf() - for (i in (8 downTo 1 step 2).reversed()) { + val intProgression = 8 downTo 1 + for (i in (intProgression step 2).reversed()) { intList += i } assertEquals(listOf(2, 4, 6, 8), intList) val longList = mutableListOf() - for (i in (8L downTo 1L step 2L).reversed()) { + val longProgression = 8L downTo 1L + for (i in (longProgression step 2L).reversed()) { longList += i } assertEquals(listOf(2L, 4L, 6L, 8L), longList) val charList = mutableListOf() - for (i in ('h' downTo 'a' step 2).reversed()) { + val charProgression = 'h' downTo 'a' + for (i in (charProgression step 2).reversed()) { charList += i } assertEquals(listOf('b', 'd', 'f', 'h'), charList) diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversedThenStep.kt index e8101fd765f..219df8dbc40 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversedThenStep.kt @@ -1,22 +1,26 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { val intList = mutableListOf() - for (i in (10 downTo 1 step 2).reversed() step 3) { + val intProgression = 10 downTo 1 + for (i in (intProgression step 2).reversed() step 3) { intList += i } assertEquals(listOf(2, 5, 8), intList) val longList = mutableListOf() - for (i in (10L downTo 1L step 2L).reversed() step 3L) { + val longProgression = 10L downTo 1L + for (i in (longProgression step 2L).reversed() step 3L) { longList += i } assertEquals(listOf(2L, 5L, 8L), longList) val charList = mutableListOf() - for (i in ('j' downTo 'a' step 2).reversed() step 3) { + val charProgression = 'j' downTo 'a' + for (i in (charProgression step 2).reversed() step 3) { charList += i } assertEquals(listOf('b', 'e', 'h'), charList) diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt index 943ba1429fb..5e5c5becc48 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt @@ -1,22 +1,26 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { val intList = mutableListOf() - for (i in ((10 downTo 1 step 2).reversed() step 3).reversed()) { + val intProgression = 10 downTo 1 + for (i in ((intProgression step 2).reversed() step 3).reversed()) { intList += i } assertEquals(listOf(8, 5, 2), intList) val longList = mutableListOf() - for (i in ((10L downTo 1L step 2L).reversed() step 3L).reversed()) { + val longProgression = 10L downTo 1L + for (i in ((longProgression step 2L).reversed() step 3L).reversed()) { longList += i } assertEquals(listOf(8L, 5L, 2L), longList) val charList = mutableListOf() - for (i in (('j' downTo 'a' step 2).reversed() step 3).reversed()) { + val charProgression = 'j' downTo 'a' + for (i in ((charProgression step 2).reversed() step 3).reversed()) { charList += i } assertEquals(listOf('h', 'e', 'b'), charList) diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/singleElementStepTwo.kt index 419b90edb89..8dbf9464a9e 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/singleElementStepTwo.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/singleElementStepTwo.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepNonConst.kt index 328bc66f761..10f6d8868fa 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepNonConst.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepOne.kt index d98ae1d38ca..8698f11f718 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToOutsideRange.kt index 8093b20bad0..cdb5f08da40 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToOutsideRange.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToOutsideRange.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToSameLast.kt index e3b20c2a390..bae285566f6 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToSmallerLast.kt index 0fd58bedecc..8aef71449cd 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/emptyProgression.kt index 5f43edda3f8..bc5fd024fda 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/emptyProgression.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/emptyProgression.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepNegative.kt index bbab8a3a30e..605c6d38b23 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepNegative.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepNegative.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepNonConst.kt index aa6df6c5297..9044c70aeec 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepNonConst.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepThenLegalStep.kt index 49f4c419b9c..07455f8b013 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepThenLegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepThenLegalStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepZero.kt index 2690ae4555f..d8967548604 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepZero.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepZero.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/legalStepThenIllegalStep.kt index 8203bef4cdc..67675a0b0ff 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/legalStepThenIllegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/legalStepThenIllegalStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/minValueToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/minValueToMaxValueStepMaxValue.kt index bf0f354e1a7..ae8588bfc30 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/minValueToMaxValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/minValueToMaxValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/mixedTypeStep.kt index ea535640e52..86d6444b8b6 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/mixedTypeStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/mixedTypeStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepOneThenStepOne.kt index 84ac73f8b39..d99686d1e66 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepOneThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepOneThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepThenSameStep.kt index be74c5d3474..e6849747721 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepThenSameStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepThenSameStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt index 1ee39bc86e6..f21328e3156 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt index 5db3161cf82..ea62cb7b7b5 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt index 39d4b12849d..e8911d0cbb4 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt index 2bce183d22b..2fafc8f9929 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt index c4378c6c4b5..ea550457391 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt index ba326f079c1..f1828ed10ea 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/oneToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/oneToMaxValueStepMaxValue.kt index f9512e6e603..75534998b14 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/oneToMaxValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/oneToMaxValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStep.kt index 7e860fb99c2..6ab3858e680 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStepThenReversed.kt index 8705f5dcad9..1d2a625d425 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt index 2759e413444..782c4f7debe 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversed.kt index 096268f36dc..c26c85f5eae 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversedThenStep.kt index c3863429c3b..839c5783cc0 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt index 793f76eb127..c60d8c5254c 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/singleElementStepTwo.kt index 79d342aec7e..75ea6a544bc 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/singleElementStepTwo.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/singleElementStepTwo.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepNonConst.kt index 045aed5a180..1d0319fea76 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepNonConst.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepOne.kt index 38b5022689c..bec2eaf2b3e 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToOutsideRange.kt index 7084ff58119..ba1ec8f33a0 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToOutsideRange.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToOutsideRange.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToSameLast.kt index 304e580b9e2..41fa84a76bd 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToSmallerLast.kt index c6319cb0922..a289587c703 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/zeroToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/zeroToMaxValueStepMaxValue.kt index 0f04c30efc4..a9961799e03 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/zeroToMaxValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/zeroToMaxValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/emptyProgression.kt index c4e40615b43..1c59dbb21b1 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/emptyProgression.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/emptyProgression.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/emptyProgressionToMinValue.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/emptyProgressionToMinValue.kt index 7012e652ac6..1f6de2f61e5 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/emptyProgressionToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/emptyProgressionToMinValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepNegative.kt index 0fb9b36a135..8ee8c5f4b19 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepNegative.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepNegative.kt @@ -1,22 +1,23 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { assertFailsWith { - val intProgression = 1 until 7 + val intProgression = 1 until 8 for (i in intProgression step -1) { } } assertFailsWith { - val longProgression = 1L until 7L + val longProgression = 1L until 8L for (i in longProgression step -1L) { } } assertFailsWith { - val charProgression = 'a' until 'g' + val charProgression = 'a' until 'h' for (i in charProgression step -1) { } } diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepNonConst.kt index 7b1e0ad55e5..b51aeb2453b 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepNonConst.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepThenLegalStep.kt index 7c6c17f105d..026b2da6c99 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepThenLegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepThenLegalStep.kt @@ -1,22 +1,23 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { assertFailsWith { - val intProgression = 1 until 7 + val intProgression = 1 until 8 for (i in intProgression step 0 step 2) { } } assertFailsWith { - val longProgression = 1L until 7L + val longProgression = 1L until 8L for (i in longProgression step 0L step 2L) { } } assertFailsWith { - val charProgression = 'a' until 'g' + val charProgression = 'a' until 'h' for (i in charProgression step 0 step 2) { } } diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepZero.kt index 59b96e0f5ae..933e2978ec0 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepZero.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepZero.kt @@ -1,22 +1,23 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { assertFailsWith { - val intProgression = 1 until 7 + val intProgression = 1 until 8 for (i in intProgression step 0) { } } assertFailsWith { - val longProgression = 1L until 7L + val longProgression = 1L until 8L for (i in longProgression step 0L) { } } assertFailsWith { - val charProgression = 'a' until 'g' + val charProgression = 'a' until 'h' for (i in charProgression step 0) { } } diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/legalStepThenIllegalStep.kt index 856fb4e3450..000f898f893 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/legalStepThenIllegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/legalStepThenIllegalStep.kt @@ -1,22 +1,23 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { assertFailsWith { - val intProgression = 1 until 7 + val intProgression = 1 until 8 for (i in intProgression step 2 step 0) { } } assertFailsWith { - val longProgression = 1L until 7L + val longProgression = 1L until 8L for (i in longProgression step 2L step 0L) { } } assertFailsWith { - val charProgression = 'a' until 'g' + val charProgression = 'a' until 'h' for (i in charProgression step 2 step 0) { } } diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/minValueToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/minValueToMaxValueStepMaxValue.kt index 174f6444a03..7a47e95b19f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/minValueToMaxValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/minValueToMaxValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/mixedTypeStep.kt index 3a7c3db8c5f..1ceb9bec7a2 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/mixedTypeStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/mixedTypeStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepOneThenStepOne.kt index e34153e327f..f75f798ba6c 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepOneThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepOneThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepThenSameStep.kt index eafa28fb141..ddac8c155f6 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepThenSameStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepThenSameStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepOne.kt index 0acc77e0a54..f56de2c19eb 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt index b0206fa7d66..1df82ca4a7f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt index ac944622cc1..2e541e05233 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt index be9152ef429..5f8c7093441 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt index d8407ddb7ad..529a3f73d98 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt index 57621695cc2..28df0e89054 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/progressionToNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/progressionToNonConst.kt new file mode 100644 index 00000000000..91e2d4755d3 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/progressionToNonConst.kt @@ -0,0 +1,31 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun nine() = 9 + +fun box(): String { + val intList = mutableListOf() + val intProgression = 1 until nine() + for (i in intProgression step 2) { + intList += i + } + assertEquals(listOf(1, 3, 5, 7), intList) + + val longList = mutableListOf() + val longProgression = 1L until nine().toLong() + for (i in longProgression step 2L) { + longList += i + } + assertEquals(listOf(1L, 3L, 5L, 7L), longList) + + val charList = mutableListOf() + val charProgression = 'a' until ('a' - 1 + nine()) + for (i in charProgression step 2) { + charList += i + } + assertEquals(listOf('a', 'c', 'e', 'g'), charList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStep.kt index e99ef24a33d..0d26524d594 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStepThenReversed.kt index c367b9ff809..5833042508e 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStepThenReversedThenStep.kt index 098fccd3204..57572890dea 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStepThenReversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversed.kt index f81cc8f9f6c..418c03d86cd 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversedThenStep.kt index 0616c2713d0..6d2f4c7bcc5 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversedThenStepThenReversed.kt index 3d511c50375..42eeb4072a1 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversedThenStepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/singleElementStepTwo.kt index e313f1a2a25..7bef33bfc6f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/singleElementStepTwo.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/singleElementStepTwo.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/stepNonConst.kt index 5073568ca8c..ad2bcf8206f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/stepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/stepNonConst.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/stepOne.kt index 76af41c9266..3ecd62cde83 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/stepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/stepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToOutsideRange.kt index 9a2eee91ec9..7407affe5d7 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToOutsideRange.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToOutsideRange.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToSameLast.kt index a4adad3706b..f088b385fe8 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToSmallerLast.kt index 8043d556268..a068c74ee0f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/stepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/expression/until/zeroToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/expression/until/zeroToMaxValueStepMaxValue.kt index cbbb6b1935e..726f3fe9f03 100644 --- a/compiler/testData/codegen/box/ranges/stepped/expression/until/zeroToMaxValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/expression/until/zeroToMaxValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/emptyProgression.kt index 35077b3ff00..25772418994 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/emptyProgression.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/emptyProgression.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepNegative.kt index 70a68fb59ae..68d9f35206c 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepNegative.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepNegative.kt @@ -1,7 +1,7 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME - -// Bug in JS: Translation of loop over literal completely removes the validation of step +// KT-34166: Translation of loop over literal completely removes the validation of step // DONT_TARGET_EXACT_BACKEND: JS import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepNonConst.kt index 31d02054698..48a3b202d37 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepNonConst.kt @@ -1,7 +1,7 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME - -// Bug in JS: Translation of loop over literal completely removes the validation of step +// KT-34166: Translation of loop over literal completely removes the validation of step // DONT_TARGET_EXACT_BACKEND: JS import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepThenLegalStep.kt index 39bc4cdd312..a1d0ab868d6 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepThenLegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepThenLegalStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepZero.kt index 96dd2d26c8e..47b36011ec1 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepZero.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepZero.kt @@ -1,7 +1,7 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME - -// Bug in JS: Translation of loop over literal completely removes the validation of step +// KT-34166: Translation of loop over literal completely removes the validation of step // DONT_TARGET_EXACT_BACKEND: JS import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/legalStepThenIllegalStep.kt index a77baa5cbcc..81ed6a3d1e3 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/legalStepThenIllegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/legalStepThenIllegalStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToMinValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToMinValueStepMaxValue.kt index ee9e241594c..b7a64c00a7c 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToMinValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToMinValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* @@ -13,7 +14,7 @@ fun box(): String { for (i in Long.MAX_VALUE downTo Long.MIN_VALUE step Long.MAX_VALUE) { longList += i } - assertEquals(listOf(Long.MAX_VALUE, 0, Long.MIN_VALUE + 1), longList) + assertEquals(listOf(Long.MAX_VALUE, 0L, Long.MIN_VALUE + 1), longList) val charList = mutableListOf() for (i in Char.MAX_VALUE downTo Char.MIN_VALUE step Char.MAX_VALUE.toInt()) { diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToOneStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToOneStepMaxValue.kt index bd0d3f4924b..e6d93a96a39 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToOneStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToOneStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToZeroStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToZeroStepMaxValue.kt index 49a38288765..22f66590857 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToZeroStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToZeroStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/mixedTypeStep.kt index f6e517f1fbd..b8c9d749f38 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/mixedTypeStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/mixedTypeStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepOneThenStepOne.kt index 3e3ced89070..48ba23af731 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepOneThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepOneThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepThenSameStep.kt index 609ffae294a..7a960789a8b 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepThenSameStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepThenSameStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt index 3ed8be647fc..7133d9931f4 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt index e6b71d8b601..0793a2a548f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt index 977c325e381..7cc7c4a5954 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt index e57a663652a..801bcd25bbb 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt index 72dfef96cbd..d8be6a1b6ec 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt index ef0b585ac4a..ec84adedd77 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStep.kt index a02ac1e799f..dbd11d202c4 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStepThenReversed.kt index 1a65b80816d..9b134cc271b 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt index 47b6006406e..df0f86c6313 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversed.kt index 521d398dd49..9795b226dc5 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversedThenStep.kt index e8101fd765f..be42d07af7d 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt index 943ba1429fb..8ec37d6f545 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/singleElementStepTwo.kt index 5791a120b9c..469fa75015a 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/singleElementStepTwo.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/singleElementStepTwo.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepNonConst.kt index 7319c71a87c..82aad8644f1 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepNonConst.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepOne.kt index 7d7121a4519..916ff0c2bf7 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToOutsideRange.kt index af939ddb18d..2cc8d2d8694 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToOutsideRange.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToOutsideRange.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToSameLast.kt index a68085ee2bf..0c202ae7bae 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToSmallerLast.kt index 5c53fa504b3..58f624770a2 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/emptyProgression.kt index f4a771e7ac0..d7f17054d7b 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/emptyProgression.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/emptyProgression.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepNegative.kt index 5b337ea7e25..46918dbe4a7 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepNegative.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepNegative.kt @@ -1,7 +1,7 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME - -// Bug in JS: Translation of loop over literal completely removes the validation of step +// KT-34166: Translation of loop over literal completely removes the validation of step // DONT_TARGET_EXACT_BACKEND: JS import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepNonConst.kt index fb0896a8cd4..540a720d28c 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepNonConst.kt @@ -1,7 +1,7 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME - -// Bug in JS: Translation of loop over literal completely removes the validation of step +// KT-34166: Translation of loop over literal completely removes the validation of step // DONT_TARGET_EXACT_BACKEND: JS import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepThenLegalStep.kt index 7d2502768ea..50d661732f6 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepThenLegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepThenLegalStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepZero.kt index 1116a90fe39..1185bdd2e05 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepZero.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepZero.kt @@ -1,7 +1,7 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME - -// Bug in JS: Translation of loop over literal completely removes the validation of step +// KT-34166: Translation of loop over literal completely removes the validation of step // DONT_TARGET_EXACT_BACKEND: JS import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/legalStepThenIllegalStep.kt index d5d020a4fec..f401356292d 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/legalStepThenIllegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/legalStepThenIllegalStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/minValueToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/minValueToMaxValueStepMaxValue.kt index 35f327c92a8..88027551d59 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/minValueToMaxValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/minValueToMaxValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/mixedTypeStep.kt index e3f79c36a4e..e480e609660 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/mixedTypeStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/mixedTypeStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepOneThenStepOne.kt index 854d37ba9f5..96392b7e06f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepOneThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepOneThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepThenSameStep.kt index 0fe1fea8ebb..2e8c9a10af8 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepThenSameStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepThenSameStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt index 2f5aaba4821..7e489c1b5a4 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt index 3a21f7b0166..ed991a8c807 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt index bea24aea8a3..84196843d05 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt index 98b1538ff8b..b29914cfdb9 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt index 27e813facb2..0eb24433e67 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt index bd34d32b176..42df39f27d1 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/oneToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/oneToMaxValueStepMaxValue.kt index d8abf0b0623..d79493b8bab 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/oneToMaxValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/oneToMaxValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStep.kt index a701b06da21..a9face85d4f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStepThenReversed.kt index a9415fec0f8..2d121893473 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt index 43cddf08940..10d6286ca1c 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversed.kt index ad5617e538f..bf5b33f1cef 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversedThenStep.kt index 0eda8cba4ca..20cfe6da567 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt index 1f73027c8b5..03ffe907d10 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/singleElementStepTwo.kt index a44e520d9c5..bdbf8cdf57f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/singleElementStepTwo.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/singleElementStepTwo.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepNonConst.kt index b523dec50b4..72a19b0b785 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepNonConst.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepOne.kt index b3c39d39a35..b8a4c17dc60 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToOutsideRange.kt index ecde94825f3..fd053d2e1d8 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToOutsideRange.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToOutsideRange.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToSameLast.kt index c7b488b5df4..250cefffdeb 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToSmallerLast.kt index 356ccc98241..963db28bd62 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/zeroToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/zeroToMaxValueStepMaxValue.kt index a1ac2e4d49b..376e1f67463 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/zeroToMaxValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/zeroToMaxValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/emptyProgression.kt index bc0ec668890..9b1689ab432 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/emptyProgression.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/emptyProgression.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/emptyProgressionToMinValue.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/emptyProgressionToMinValue.kt index 1d34a1bfa05..95ccbeeb8ff 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/emptyProgressionToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/emptyProgressionToMinValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepNegative.kt index 7017bcc5346..ebde24567c6 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepNegative.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepNegative.kt @@ -1,23 +1,23 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME - -// Bug in JS: Translation of loop over literal completely removes the validation of step +// KT-34166: Translation of loop over literal completely removes the validation of step // DONT_TARGET_EXACT_BACKEND: JS import kotlin.test.* fun box(): String { assertFailsWith { - for (i in 1 until 7 step -1) { + for (i in 1 until 8 step -1) { } } assertFailsWith { - for (i in 1L until 7L step -1L) { + for (i in 1L until 8L step -1L) { } } assertFailsWith { - for (i in 'a' until 'g' step -1) { + for (i in 'a' until 'h' step -1) { } } diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepNonConst.kt index dce07e149a5..7b29b0b53be 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepNonConst.kt @@ -1,7 +1,7 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME - -// Bug in JS: Translation of loop over literal completely removes the validation of step +// KT-34166: Translation of loop over literal completely removes the validation of step // DONT_TARGET_EXACT_BACKEND: JS import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepThenLegalStep.kt index e651bd03ef6..a6a04a31524 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepThenLegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepThenLegalStep.kt @@ -1,20 +1,21 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { assertFailsWith { - for (i in 1 until 7 step 0 step 2) { + for (i in 1 until 8 step 0 step 2) { } } assertFailsWith { - for (i in 1L until 7L step 0L step 2L) { + for (i in 1L until 8L step 0L step 2L) { } } assertFailsWith { - for (i in 'a' until 'g' step 0 step 2) { + for (i in 'a' until 'h' step 0 step 2) { } } diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepZero.kt index 70b410a108a..db07226b3d2 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepZero.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepZero.kt @@ -1,23 +1,23 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME - -// Bug in JS: Translation of loop over literal completely removes the validation of step +// KT-34166: Translation of loop over literal completely removes the validation of step // DONT_TARGET_EXACT_BACKEND: JS import kotlin.test.* fun box(): String { assertFailsWith { - for (i in 1 until 7 step 0) { + for (i in 1 until 8 step 0) { } } assertFailsWith { - for (i in 1L until 7L step 0L) { + for (i in 1L until 8L step 0L) { } } assertFailsWith { - for (i in 'a' until 'g' step 0) { + for (i in 'a' until 'h' step 0) { } } diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/legalStepThenIllegalStep.kt index 3cd5ba7ec1b..fb8f078c6f5 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/legalStepThenIllegalStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/legalStepThenIllegalStep.kt @@ -1,20 +1,21 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* fun box(): String { assertFailsWith { - for (i in 1 until 7 step 2 step 0) { + for (i in 1 until 8 step 2 step 0) { } } assertFailsWith { - for (i in 1L until 7L step 2L step 0L) { + for (i in 1L until 8L step 2L step 0L) { } } assertFailsWith { - for (i in 'a' until 'g' step 2 step 0) { + for (i in 'a' until 'h' step 2 step 0) { } } diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/minValueToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/minValueToMaxValueStepMaxValue.kt index 721d0e57a16..8176a766ef3 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/minValueToMaxValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/minValueToMaxValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/mixedTypeStep.kt index cbd47d25fbe..5a9dcac6cc8 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/mixedTypeStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/mixedTypeStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepOneThenStepOne.kt index 45d1cb9f180..9c2b9e3350e 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepOneThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepOneThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepThenSameStep.kt index da37eceba95..7753b06ffa6 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepThenSameStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepThenSameStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepOne.kt index 8e4b6ecf98d..bb647abec15 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt index 3c94a64b722..5a0ef513834 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt index 8bbac497c16..18b9d64105d 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt index b31f713db2a..7729ee17791 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt index 588545d31ab..19cf455e07e 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt index 006cb09df77..85a69b4a998 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/progressionToNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/progressionToNonConst.kt index 5b32df5fe38..8f5ff81b92f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/progressionToNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/progressionToNonConst.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStep.kt index d54ed6682e7..c0e5acc29e1 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStepThenReversed.kt index 36f95a41591..fee9efbe784 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStepThenReversedThenStep.kt index 5b39f87fd1a..7d7e8310812 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStepThenReversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversed.kt index 59ecd4a1d60..c5ad07fe191 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversedThenStep.kt index 9949448dcde..37398c54cb7 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversedThenStep.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversedThenStep.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversedThenStepThenReversed.kt index 35f4d59b7e6..f55dc8c3bd7 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversedThenStepThenReversed.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversedThenStepThenReversed.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/singleElementStepTwo.kt index 7e743c2a368..8e936779659 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/singleElementStepTwo.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/singleElementStepTwo.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/stepNonConst.kt index e0b3a50b2a0..07715b11e0b 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/stepNonConst.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/stepNonConst.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/stepOne.kt index e9242aa66eb..67d8a0a0153 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/stepOne.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/stepOne.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToOutsideRange.kt index 0396b8cd718..c55c96d67d7 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToOutsideRange.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToOutsideRange.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToSameLast.kt index 63b3cb3e0c4..27e271c4a9a 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToSameLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToSameLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToSmallerLast.kt index d8149c4022d..5141bc5446f 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToSmallerLast.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/stepToSmallerLast.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/stepped/literal/until/zeroToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/literal/until/zeroToMaxValueStepMaxValue.kt index 3db4ccda63d..3998f56dacf 100644 --- a/compiler/testData/codegen/box/ranges/stepped/literal/until/zeroToMaxValueStepMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/stepped/literal/until/zeroToMaxValueStepMaxValue.kt @@ -1,3 +1,4 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 1d4707b0e27..39e917e3d22 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -20775,6 +20775,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/mixedTypeStep.kt"); } + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/progressionToNonConst.kt"); + } + @TestMetadata("singleElementStepTwo.kt") public void testSingleElementStepTwo() throws Exception { runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/singleElementStepTwo.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 6383cbcd3ef..4ba11c3bad6 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -26,7 +26,7 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } public void testAllFilesPresentInBox() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true, "ranges/stepped"); } @TestMetadata("compiler/testData/codegen/box/annotations") @@ -19028,7 +19028,7 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } public void testAllFilesPresentInRanges() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true, "stepped"); } @TestMetadata("forByteProgressionWithIntIncrement.kt") @@ -20316,1184 +20316,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } - @TestMetadata("compiler/testData/codegen/box/ranges/stepped") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Stepped extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInStepped() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/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/stepped/expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DownTo extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInDownTo() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("emptyProgression.kt") - public void testEmptyProgression() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/emptyProgression.kt"); - } - - @TestMetadata("illegalStepNegative.kt") - public void testIllegalStepNegative() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepNegative.kt"); - } - - @TestMetadata("illegalStepNonConst.kt") - public void testIllegalStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepNonConst.kt"); - } - - @TestMetadata("illegalStepThenLegalStep.kt") - public void testIllegalStepThenLegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepThenLegalStep.kt"); - } - - @TestMetadata("illegalStepZero.kt") - public void testIllegalStepZero() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/illegalStepZero.kt"); - } - - @TestMetadata("legalStepThenIllegalStep.kt") - public void testLegalStepThenIllegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/legalStepThenIllegalStep.kt"); - } - - @TestMetadata("maxValueToMinValueStepMaxValue.kt") - public void testMaxValueToMinValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToMinValueStepMaxValue.kt"); - } - - @TestMetadata("maxValueToOneStepMaxValue.kt") - public void testMaxValueToOneStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToOneStepMaxValue.kt"); - } - - @TestMetadata("maxValueToZeroStepMaxValue.kt") - public void testMaxValueToZeroStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/maxValueToZeroStepMaxValue.kt"); - } - - @TestMetadata("mixedTypeStep.kt") - public void testMixedTypeStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/mixedTypeStep.kt"); - } - - @TestMetadata("singleElementStepTwo.kt") - public void testSingleElementStepTwo() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/singleElementStepTwo.kt"); - } - - @TestMetadata("stepNonConst.kt") - public void testStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepNonConst.kt"); - } - - @TestMetadata("stepOne.kt") - public void testStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepOne.kt"); - } - - @TestMetadata("stepToOutsideRange.kt") - public void testStepToOutsideRange() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToOutsideRange.kt"); - } - - @TestMetadata("stepToSameLast.kt") - public void testStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLast.kt") - public void testStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/stepToSmallerLast.kt"); - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NestedStep extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInNestedStep() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("stepOneThenStepOne.kt") - public void testStepOneThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepOneThenStepOne.kt"); - } - - @TestMetadata("stepThenSameStep.kt") - public void testStepThenSameStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepThenSameStep.kt"); - } - - @TestMetadata("stepToSameLastThenStepOne.kt") - public void testStepToSameLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSameLast.kt") - public void testStepToSameLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") - public void testStepToSameLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepOne.kt") - public void testStepToSmallerLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") - public void testStepToSmallerLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") - public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reversed extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInReversed() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("reversedThenStep.kt") - public void testReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStep.kt"); - } - - @TestMetadata("reversedThenStepThenReversed.kt") - public void testReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStepThenReversed.kt"); - } - - @TestMetadata("reversedThenStepThenReversedThenStep.kt") - public void testReversedThenStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversed.kt") - public void testStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversed.kt"); - } - - @TestMetadata("stepThenReversedThenStep.kt") - public void testStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversedThenStepThenReversed.kt") - public void testStepThenReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class RangeTo extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInRangeTo() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("emptyProgression.kt") - public void testEmptyProgression() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/emptyProgression.kt"); - } - - @TestMetadata("illegalStepNegative.kt") - public void testIllegalStepNegative() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepNegative.kt"); - } - - @TestMetadata("illegalStepNonConst.kt") - public void testIllegalStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepNonConst.kt"); - } - - @TestMetadata("illegalStepThenLegalStep.kt") - public void testIllegalStepThenLegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepThenLegalStep.kt"); - } - - @TestMetadata("illegalStepZero.kt") - public void testIllegalStepZero() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/illegalStepZero.kt"); - } - - @TestMetadata("legalStepThenIllegalStep.kt") - public void testLegalStepThenIllegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/legalStepThenIllegalStep.kt"); - } - - @TestMetadata("minValueToMaxValueStepMaxValue.kt") - public void testMinValueToMaxValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/minValueToMaxValueStepMaxValue.kt"); - } - - @TestMetadata("mixedTypeStep.kt") - public void testMixedTypeStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/mixedTypeStep.kt"); - } - - @TestMetadata("oneToMaxValueStepMaxValue.kt") - public void testOneToMaxValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/oneToMaxValueStepMaxValue.kt"); - } - - @TestMetadata("singleElementStepTwo.kt") - public void testSingleElementStepTwo() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/singleElementStepTwo.kt"); - } - - @TestMetadata("stepNonConst.kt") - public void testStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepNonConst.kt"); - } - - @TestMetadata("stepOne.kt") - public void testStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepOne.kt"); - } - - @TestMetadata("stepToOutsideRange.kt") - public void testStepToOutsideRange() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToOutsideRange.kt"); - } - - @TestMetadata("stepToSameLast.kt") - public void testStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLast.kt") - public void testStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/stepToSmallerLast.kt"); - } - - @TestMetadata("zeroToMaxValueStepMaxValue.kt") - public void testZeroToMaxValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/zeroToMaxValueStepMaxValue.kt"); - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NestedStep extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInNestedStep() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("stepOneThenStepOne.kt") - public void testStepOneThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepOneThenStepOne.kt"); - } - - @TestMetadata("stepThenSameStep.kt") - public void testStepThenSameStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepThenSameStep.kt"); - } - - @TestMetadata("stepToSameLastThenStepOne.kt") - public void testStepToSameLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSameLast.kt") - public void testStepToSameLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") - public void testStepToSameLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepOne.kt") - public void testStepToSmallerLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") - public void testStepToSmallerLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") - public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reversed extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInReversed() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("reversedThenStep.kt") - public void testReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStep.kt"); - } - - @TestMetadata("reversedThenStepThenReversed.kt") - public void testReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStepThenReversed.kt"); - } - - @TestMetadata("reversedThenStepThenReversedThenStep.kt") - public void testReversedThenStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversed.kt") - public void testStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversed.kt"); - } - - @TestMetadata("stepThenReversedThenStep.kt") - public void testStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversedThenStepThenReversed.kt") - public void testStepThenReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Until extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInUntil() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("emptyProgression.kt") - public void testEmptyProgression() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/emptyProgression.kt"); - } - - @TestMetadata("emptyProgressionToMinValue.kt") - public void testEmptyProgressionToMinValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/emptyProgressionToMinValue.kt"); - } - - @TestMetadata("illegalStepNegative.kt") - public void testIllegalStepNegative() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepNegative.kt"); - } - - @TestMetadata("illegalStepNonConst.kt") - public void testIllegalStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepNonConst.kt"); - } - - @TestMetadata("illegalStepThenLegalStep.kt") - public void testIllegalStepThenLegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepThenLegalStep.kt"); - } - - @TestMetadata("illegalStepZero.kt") - public void testIllegalStepZero() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/illegalStepZero.kt"); - } - - @TestMetadata("legalStepThenIllegalStep.kt") - public void testLegalStepThenIllegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/legalStepThenIllegalStep.kt"); - } - - @TestMetadata("minValueToMaxValueStepMaxValue.kt") - public void testMinValueToMaxValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/minValueToMaxValueStepMaxValue.kt"); - } - - @TestMetadata("mixedTypeStep.kt") - public void testMixedTypeStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/mixedTypeStep.kt"); - } - - @TestMetadata("singleElementStepTwo.kt") - public void testSingleElementStepTwo() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/singleElementStepTwo.kt"); - } - - @TestMetadata("stepNonConst.kt") - public void testStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/stepNonConst.kt"); - } - - @TestMetadata("stepOne.kt") - public void testStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/stepOne.kt"); - } - - @TestMetadata("stepToOutsideRange.kt") - public void testStepToOutsideRange() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/stepToOutsideRange.kt"); - } - - @TestMetadata("stepToSameLast.kt") - public void testStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/stepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLast.kt") - public void testStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/stepToSmallerLast.kt"); - } - - @TestMetadata("zeroToMaxValueStepMaxValue.kt") - public void testZeroToMaxValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/zeroToMaxValueStepMaxValue.kt"); - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NestedStep extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInNestedStep() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("stepOneThenStepOne.kt") - public void testStepOneThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepOneThenStepOne.kt"); - } - - @TestMetadata("stepThenSameStep.kt") - public void testStepThenSameStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepThenSameStep.kt"); - } - - @TestMetadata("stepToSameLastThenStepOne.kt") - public void testStepToSameLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepOne.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSameLast.kt") - public void testStepToSameLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") - public void testStepToSameLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepOne.kt") - public void testStepToSmallerLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") - public void testStepToSmallerLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") - public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reversed extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInReversed() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("reversedThenStep.kt") - public void testReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStep.kt"); - } - - @TestMetadata("reversedThenStepThenReversed.kt") - public void testReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStepThenReversed.kt"); - } - - @TestMetadata("reversedThenStepThenReversedThenStep.kt") - public void testReversedThenStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/reversedThenStepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversed.kt") - public void testStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversed.kt"); - } - - @TestMetadata("stepThenReversedThenStep.kt") - public void testStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversedThenStepThenReversed.kt") - public void testStepThenReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed/stepThenReversedThenStepThenReversed.kt"); - } - } - } - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/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/stepped/literal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DownTo extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInDownTo() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("emptyProgression.kt") - public void testEmptyProgression() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/emptyProgression.kt"); - } - - @TestMetadata("illegalStepNegative.kt") - public void testIllegalStepNegative() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepNegative.kt"); - } - - @TestMetadata("illegalStepNonConst.kt") - public void testIllegalStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepNonConst.kt"); - } - - @TestMetadata("illegalStepThenLegalStep.kt") - public void testIllegalStepThenLegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepThenLegalStep.kt"); - } - - @TestMetadata("illegalStepZero.kt") - public void testIllegalStepZero() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/illegalStepZero.kt"); - } - - @TestMetadata("legalStepThenIllegalStep.kt") - public void testLegalStepThenIllegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/legalStepThenIllegalStep.kt"); - } - - @TestMetadata("maxValueToMinValueStepMaxValue.kt") - public void testMaxValueToMinValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToMinValueStepMaxValue.kt"); - } - - @TestMetadata("maxValueToOneStepMaxValue.kt") - public void testMaxValueToOneStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToOneStepMaxValue.kt"); - } - - @TestMetadata("maxValueToZeroStepMaxValue.kt") - public void testMaxValueToZeroStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/maxValueToZeroStepMaxValue.kt"); - } - - @TestMetadata("mixedTypeStep.kt") - public void testMixedTypeStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/mixedTypeStep.kt"); - } - - @TestMetadata("singleElementStepTwo.kt") - public void testSingleElementStepTwo() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/singleElementStepTwo.kt"); - } - - @TestMetadata("stepNonConst.kt") - public void testStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepNonConst.kt"); - } - - @TestMetadata("stepOne.kt") - public void testStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepOne.kt"); - } - - @TestMetadata("stepToOutsideRange.kt") - public void testStepToOutsideRange() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToOutsideRange.kt"); - } - - @TestMetadata("stepToSameLast.kt") - public void testStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLast.kt") - public void testStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/stepToSmallerLast.kt"); - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NestedStep extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInNestedStep() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("stepOneThenStepOne.kt") - public void testStepOneThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepOneThenStepOne.kt"); - } - - @TestMetadata("stepThenSameStep.kt") - public void testStepThenSameStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepThenSameStep.kt"); - } - - @TestMetadata("stepToSameLastThenStepOne.kt") - public void testStepToSameLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSameLast.kt") - public void testStepToSameLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") - public void testStepToSameLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepOne.kt") - public void testStepToSmallerLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") - public void testStepToSmallerLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") - public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reversed extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInReversed() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("reversedThenStep.kt") - public void testReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStep.kt"); - } - - @TestMetadata("reversedThenStepThenReversed.kt") - public void testReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStepThenReversed.kt"); - } - - @TestMetadata("reversedThenStepThenReversedThenStep.kt") - public void testReversedThenStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversed.kt") - public void testStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversed.kt"); - } - - @TestMetadata("stepThenReversedThenStep.kt") - public void testStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversedThenStepThenReversed.kt") - public void testStepThenReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class RangeTo extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInRangeTo() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("emptyProgression.kt") - public void testEmptyProgression() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/emptyProgression.kt"); - } - - @TestMetadata("illegalStepNegative.kt") - public void testIllegalStepNegative() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepNegative.kt"); - } - - @TestMetadata("illegalStepNonConst.kt") - public void testIllegalStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepNonConst.kt"); - } - - @TestMetadata("illegalStepThenLegalStep.kt") - public void testIllegalStepThenLegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepThenLegalStep.kt"); - } - - @TestMetadata("illegalStepZero.kt") - public void testIllegalStepZero() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/illegalStepZero.kt"); - } - - @TestMetadata("legalStepThenIllegalStep.kt") - public void testLegalStepThenIllegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/legalStepThenIllegalStep.kt"); - } - - @TestMetadata("minValueToMaxValueStepMaxValue.kt") - public void testMinValueToMaxValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/minValueToMaxValueStepMaxValue.kt"); - } - - @TestMetadata("mixedTypeStep.kt") - public void testMixedTypeStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/mixedTypeStep.kt"); - } - - @TestMetadata("oneToMaxValueStepMaxValue.kt") - public void testOneToMaxValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/oneToMaxValueStepMaxValue.kt"); - } - - @TestMetadata("singleElementStepTwo.kt") - public void testSingleElementStepTwo() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/singleElementStepTwo.kt"); - } - - @TestMetadata("stepNonConst.kt") - public void testStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepNonConst.kt"); - } - - @TestMetadata("stepOne.kt") - public void testStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepOne.kt"); - } - - @TestMetadata("stepToOutsideRange.kt") - public void testStepToOutsideRange() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToOutsideRange.kt"); - } - - @TestMetadata("stepToSameLast.kt") - public void testStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLast.kt") - public void testStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/stepToSmallerLast.kt"); - } - - @TestMetadata("zeroToMaxValueStepMaxValue.kt") - public void testZeroToMaxValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/zeroToMaxValueStepMaxValue.kt"); - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NestedStep extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInNestedStep() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("stepOneThenStepOne.kt") - public void testStepOneThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepOneThenStepOne.kt"); - } - - @TestMetadata("stepThenSameStep.kt") - public void testStepThenSameStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepThenSameStep.kt"); - } - - @TestMetadata("stepToSameLastThenStepOne.kt") - public void testStepToSameLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSameLast.kt") - public void testStepToSameLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") - public void testStepToSameLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepOne.kt") - public void testStepToSmallerLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") - public void testStepToSmallerLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") - public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reversed extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInReversed() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("reversedThenStep.kt") - public void testReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStep.kt"); - } - - @TestMetadata("reversedThenStepThenReversed.kt") - public void testReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStepThenReversed.kt"); - } - - @TestMetadata("reversedThenStepThenReversedThenStep.kt") - public void testReversedThenStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversed.kt") - public void testStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversed.kt"); - } - - @TestMetadata("stepThenReversedThenStep.kt") - public void testStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversedThenStepThenReversed.kt") - public void testStepThenReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Until extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInUntil() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("emptyProgression.kt") - public void testEmptyProgression() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/emptyProgression.kt"); - } - - @TestMetadata("emptyProgressionToMinValue.kt") - public void testEmptyProgressionToMinValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/emptyProgressionToMinValue.kt"); - } - - @TestMetadata("illegalStepNegative.kt") - public void testIllegalStepNegative() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepNegative.kt"); - } - - @TestMetadata("illegalStepNonConst.kt") - public void testIllegalStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepNonConst.kt"); - } - - @TestMetadata("illegalStepThenLegalStep.kt") - public void testIllegalStepThenLegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepThenLegalStep.kt"); - } - - @TestMetadata("illegalStepZero.kt") - public void testIllegalStepZero() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/illegalStepZero.kt"); - } - - @TestMetadata("legalStepThenIllegalStep.kt") - public void testLegalStepThenIllegalStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/legalStepThenIllegalStep.kt"); - } - - @TestMetadata("minValueToMaxValueStepMaxValue.kt") - public void testMinValueToMaxValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/minValueToMaxValueStepMaxValue.kt"); - } - - @TestMetadata("mixedTypeStep.kt") - public void testMixedTypeStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/mixedTypeStep.kt"); - } - - @TestMetadata("progressionToNonConst.kt") - public void testProgressionToNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/progressionToNonConst.kt"); - } - - @TestMetadata("singleElementStepTwo.kt") - public void testSingleElementStepTwo() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/singleElementStepTwo.kt"); - } - - @TestMetadata("stepNonConst.kt") - public void testStepNonConst() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/stepNonConst.kt"); - } - - @TestMetadata("stepOne.kt") - public void testStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/stepOne.kt"); - } - - @TestMetadata("stepToOutsideRange.kt") - public void testStepToOutsideRange() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/stepToOutsideRange.kt"); - } - - @TestMetadata("stepToSameLast.kt") - public void testStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/stepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLast.kt") - public void testStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/stepToSmallerLast.kt"); - } - - @TestMetadata("zeroToMaxValueStepMaxValue.kt") - public void testZeroToMaxValueStepMaxValue() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/zeroToMaxValueStepMaxValue.kt"); - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NestedStep extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInNestedStep() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("stepOneThenStepOne.kt") - public void testStepOneThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepOneThenStepOne.kt"); - } - - @TestMetadata("stepThenSameStep.kt") - public void testStepThenSameStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepThenSameStep.kt"); - } - - @TestMetadata("stepToSameLastThenStepOne.kt") - public void testStepToSameLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepOne.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSameLast.kt") - public void testStepToSameLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") - public void testStepToSameLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepOne.kt") - public void testStepToSmallerLastThenStepOne() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") - public void testStepToSmallerLastThenStepToSameLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); - } - - @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") - public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reversed extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInReversed() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("reversedThenStep.kt") - public void testReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStep.kt"); - } - - @TestMetadata("reversedThenStepThenReversed.kt") - public void testReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStepThenReversed.kt"); - } - - @TestMetadata("reversedThenStepThenReversedThenStep.kt") - public void testReversedThenStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/reversedThenStepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversed.kt") - public void testStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversed.kt"); - } - - @TestMetadata("stepThenReversedThenStep.kt") - public void testStepThenReversedThenStep() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversedThenStep.kt"); - } - - @TestMetadata("stepThenReversedThenStepThenReversed.kt") - public void testStepThenReversedThenStepThenReversed() throws Exception { - runTest("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed/stepThenReversedThenStepThenReversed.kt"); - } - } - } - } - } - @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 0a51e88c4b1..cd7d825ebf3 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -19594,6 +19594,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/mixedTypeStep.kt"); } + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/progressionToNonConst.kt"); + } + @TestMetadata("singleElementStepTwo.kt") public void testSingleElementStepTwo() throws Exception { runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/singleElementStepTwo.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt index 8b5e6f64ed7..385fad27d0f 100644 --- a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt +++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt @@ -153,6 +153,7 @@ fun main(args: Array) { GenerateRangesCodegenTestData.main(emptyArray()) GenerateInRangeExpressionTestData.main(emptyArray()) + GenerateSteppedRangesCodegenTestData.main(emptyArray()) GeneratePrimitiveVsObjectEqualityTestData.main(emptyArray()) testClass { @@ -160,7 +161,9 @@ fun main(args: Array) { } testClass { - model("codegen/box", targetBackend = TargetBackend.JVM, skipIgnored = true) + // "ranges/stepped" is excluded because it contains hundreds of generated tests and only have a box() method. + // There isn't much to be gained from running light analysis tests on them. + model("codegen/box", targetBackend = TargetBackend.JVM, skipIgnored = true, excludeDirs = listOf("ranges/stepped")) } testClass { diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateSteppedRangesCodegenTestData.kt b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateSteppedRangesCodegenTestData.kt new file mode 100644 index 00000000000..56f2a92c4e4 --- /dev/null +++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateSteppedRangesCodegenTestData.kt @@ -0,0 +1,596 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.generators.tests + +import java.io.File +import java.io.PrintWriter + +object GenerateSteppedRangesCodegenTestData { + private val TEST_DATA_DIR = File("compiler/testData/codegen/box/ranges/stepped") + + private val PREAMBLE_MESSAGE = "Auto-generated by ${GenerateSteppedRangesCodegenTestData::class.java.simpleName}. Do not edit!" + private val KT_34166_HEADER = """ + |// KT-34166: Translation of loop over literal completely removes the validation of step + |// DONT_TARGET_EXACT_BACKEND: JS""".trimMargin() + private val KT_34166_AFFECTED_FILENAMES = setOf("illegalStepZero.kt", "illegalStepNegative.kt", "illegalStepNonConst.kt") + + private enum class Type(val type: String) { + INT("Int") { + override fun convertIntValue(i: Int) = i.toString() + }, + LONG("Long") { + override fun convertIntValue(i: Int) = i.toString() + 'L' + }, + CHAR("Char") { + override fun convertIntValue(i: Int) = "'${'a' - 1 + i}'" + }; + + protected abstract fun convertIntValue(i: Int): String + fun convertValue(i: Any) = when (i) { + is Int -> convertIntValue(i) + // For convenience, replace the type in value expressions so we can re-use the same builder for different types + else -> i.toString().replace("Int.", "$type.") + } + } + + private enum class Function(val infixFunctionName: String, val subdir: String) { + RANGE_TO("..", "rangeTo"), + UNTIL(" until ", "until"), + DOWN_TO(" downTo ", "downTo") + } + + private class TestBuilder( + firstLast: Pair, + val operations: MutableList = mutableListOf(), + expectedValuesOrFailIfNull: List? = null + ) { + val first = firstLast.first + val last = firstLast.second + var expectedValuesOrFailIfNull: List? = expectedValuesOrFailIfNull + private set + + private abstract class Operation + private class Step(val step: Int) : Operation() + private class StepExpression(val expression: String) : Operation() + private object Reversed : Operation() + + fun copy(first: Any = this.first, last: Any = this.last, expectedValuesOrFailIfNull: List? = this.expectedValuesOrFailIfNull) = + TestBuilder(first to last, operations, expectedValuesOrFailIfNull) + + fun step(step: Int) = this.also { operations += Step(step) } + fun step(expression: String) = this.also { operations += StepExpression(expression) } + fun reversed() = this.also { operations += Reversed } + fun expectValues(vararg expectedValues: Any) = this.also { expectedValuesOrFailIfNull = listOf(*expectedValues) } + fun shouldFail() = this.also { expectedValuesOrFailIfNull = null } + + fun buildOnTopOfRangeOnlyVariable(variable: String, type: Type) = + StringBuilder(variable).appendOperations(type, shouldParenthesizeFirst = true).toString() + + fun buildFullLiteral(type: Type, function: Function) = + StringBuilder(buildRangeOnlyExpression(type, function)).appendOperations(type).toString() + + fun buildRangeOnlyExpression(type: Type, function: Function) = + type.convertValue(first) + function.infixFunctionName + type.convertValue(last) + + private fun StringBuilder.appendOperations(type: Type, shouldParenthesizeFirst: Boolean = false) = this.also { + for ((index, op) in operations.withIndex()) { + when (op) { + is Step -> { + append(" step ").append(op.step) + if (type == Type.LONG) { + append("L") + } + } + is StepExpression -> { + append(" step ").append(op.expression) + } + Reversed -> { + if (!shouldParenthesizeFirst || index > 0) { + insert(0, '(') + append(')') + } + append(".reversed()") + } + } + } + } + } + + private fun generateTests( + fileName: String, + rangeToBuilder: TestBuilder, + extraCode: String? = null, + subdir: String? = null + ) { + generateTestsForRangeToAndUntil(fileName, rangeToBuilder, extraCode, subdir) + // For convenience, derive test for "downTo" by swapping "first"/"last" and reversing expected values + generateTestsForFunction( + fileName, + rangeToBuilder.copy( + first = rangeToBuilder.last, + last = rangeToBuilder.first, + expectedValuesOrFailIfNull = rangeToBuilder.expectedValuesOrFailIfNull?.asReversed() + ), + Function.DOWN_TO, + extraCode, + subdir + ) + } + + private fun generateTestsForRangeToAndUntil( + fileName: String, + rangeToBuilder: TestBuilder, + extraCode: String? = null, + subdir: String? = null + ) { + generateTestsForFunction(fileName, rangeToBuilder, Function.RANGE_TO, extraCode, subdir) + // For convenience, derive test for "until" by incrementing "last" + generateTestsForFunction(fileName, rangeToBuilder.copy(last = (rangeToBuilder.last as Int) + 1), Function.UNTIL, extraCode, subdir) + } + + private fun generateTestsForFunction( + fileName: String, + builder: TestBuilder, + function: Function, + extraCode: String? = null, + subdir: String? = null + ) = generateTestsForFunction(fileName, Type.values().associate { it to builder }, function, extraCode, subdir) + + private fun generateTestsForFunction( + fileName: String, + typeToBuilderMap: Map, + function: Function, + extraCode: String? = null, + subdir: String? = null + ) = listOf(true, false).forEach { generateTestsForFunction(fileName, typeToBuilderMap, function, extraCode, subdir, asLiteral = it) } + + private fun generateTestsForFunction( + fileName: String, + typeToBuilderMap: Map, + function: Function, + extraCode: String? = null, + subdir: String? = null, + asLiteral: Boolean + ) { + val fullSubdirPath = StringBuilder((if (asLiteral) "literal" else "expression")) + fullSubdirPath.append("/").append(function.subdir) + if (subdir != null) { + fullSubdirPath.append("/").append(subdir) + } + val fullSubdir = File(TEST_DATA_DIR, fullSubdirPath.toString()) + fullSubdir.mkdirs() + PrintWriter(File(fullSubdir, fileName)).use { + with(it) { + println("// $PREAMBLE_MESSAGE") + println("// KJS_WITH_FULL_RUNTIME") + println("// WITH_RUNTIME") + if (asLiteral && KT_34166_AFFECTED_FILENAMES.contains(fileName)) { + println(KT_34166_HEADER) + } + println("import kotlin.test.*") + println() + + if (extraCode != null) { + println(extraCode) + println() + } + println("fun box(): String {") + for ((type, builder) in typeToBuilderMap) { + printTestForFunctionAndType(builder, function, type, asLiteral) + } + println(" return \"OK\"") + print("}") + } + } + } + + private fun PrintWriter.printTestForFunctionAndType(builder: TestBuilder, function: Function, type: Type, asLiteral: Boolean) { + val shouldFail = (builder.expectedValuesOrFailIfNull == null) + val listVarName = type.type.toLowerCase() + "List" + if (shouldFail) { + println(" assertFailsWith {") + } else { + println(" val $listVarName = mutableListOf<${type.type}>()") + } + + val indent = if (shouldFail) " " else "" + if (asLiteral) { + println("$indent for (i in ${builder.buildFullLiteral(type, function)}) {") + } else { + val progressionVarName = type.type.toLowerCase() + "Progression" + println("$indent val $progressionVarName = ${builder.buildRangeOnlyExpression(type, function)}") + println("$indent for (i in ${builder.buildOnTopOfRangeOnlyVariable(progressionVarName, type)}) {") + } + if (!shouldFail) { + println(" $listVarName += i") + } + println("$indent }") + + if (!shouldFail) { + if (builder.expectedValuesOrFailIfNull!!.isEmpty()) { + println(" assertTrue($listVarName.isEmpty())") + } else { + println(" assertEquals(listOf(${builder.expectedValuesOrFailIfNull!!.joinToString { type.convertValue(it) }}), $listVarName)") + } + } else { + println(" }") + } + println() + } + + @JvmStatic + fun main(args: Array) { + generateTests("emptyProgression.kt", TestBuilder(2 to 1).step(2).expectValues()) + generateTests("illegalStepNegative.kt", TestBuilder(1 to 7).step(-1).shouldFail()) + generateTests("illegalStepThenLegalStep.kt", TestBuilder(1 to 7).step(0).step(2).shouldFail()) + generateTests("illegalStepZero.kt", TestBuilder(1 to 7).step(0).shouldFail()) + generateTests("legalStepThenIllegalStep.kt", TestBuilder(1 to 7).step(2).step(0).shouldFail()) + generateTests("singleElementStepTwo.kt", TestBuilder(1 to 1).step(2).expectValues(1)) + generateTests("stepOne.kt", TestBuilder(1 to 4).step(1).expectValues(1, 2, 3, 4)) + generateTests("stepToSameLast.kt", TestBuilder(1 to 7).step(2).expectValues(1, 3, 5, 7)) + generateTestsForRangeToAndUntil( + "stepNonConst.kt", + TestBuilder(1 to 8).step("two()").expectValues(1, 3, 5, 7), + extraCode = "fun two() = 2" + ) + generateTestsForFunction( + "stepNonConst.kt", + TestBuilder(8 to 1).step("two()").expectValues(8, 6, 4, 2), + Function.DOWN_TO, + extraCode = "fun two() = 2" + ) + generateTestsForRangeToAndUntil("stepToOutsideRange.kt", TestBuilder(1 to 7).step(7).expectValues(1)) + generateTestsForFunction("stepToOutsideRange.kt", TestBuilder(7 to 1).step(7).expectValues(7), Function.DOWN_TO) + generateTestsForRangeToAndUntil("stepToSmallerLast.kt", TestBuilder(1 to 8).step(2).expectValues(1, 3, 5, 7)) + generateTestsForFunction("stepToSmallerLast.kt", TestBuilder(8 to 1).step(2).expectValues(8, 6, 4, 2), Function.DOWN_TO) + + // Nested step cases + generateTests("stepOneThenStepOne.kt", TestBuilder(1 to 4).step(1).step(1).expectValues(1, 2, 3, 4), subdir = "nestedStep") + generateTests( + "stepToSameLastThenStepOne.kt", + TestBuilder(1 to 5).step(2).step(1).expectValues(1, 2, 3, 4, 5), + subdir = "nestedStep" + ) + generateTests( + "stepToSameLastThenStepToSameLast.kt", + TestBuilder(1 to 7).step(3).step(2).expectValues(1, 3, 5, 7), + subdir = "nestedStep" + ) + generateTestsForRangeToAndUntil( + "stepThenSameStep.kt", + TestBuilder(1 to 8).step(2).step(2).expectValues(1, 3, 5, 7), + subdir = "nestedStep" + ) + generateTestsForFunction( + "stepThenSameStep.kt", + TestBuilder(8 to 1).step(2).step(2).expectValues(8, 6, 4, 2), + Function.DOWN_TO, + subdir = "nestedStep" + ) + generateTestsForRangeToAndUntil( + "stepToSameLastThenStepToSmallerLast.kt", + TestBuilder(1 to 10).step(3).step(2).expectValues(1, 3, 5, 7, 9), + subdir = "nestedStep" + ) + generateTestsForFunction( + "stepToSameLastThenStepToSmallerLast.kt", + TestBuilder(10 to 1).step(3).step(2).expectValues(10, 8, 6, 4, 2), + Function.DOWN_TO, + subdir = "nestedStep" + ) + generateTestsForRangeToAndUntil( + "stepToSmallerLastThenStepOne.kt", + TestBuilder(1 to 6).step(2).step(1).expectValues(1, 2, 3, 4, 5), + subdir = "nestedStep" + ) + generateTestsForFunction( + "stepToSmallerLastThenStepOne.kt", + TestBuilder(6 to 1).step(2).step(1).expectValues(6, 5, 4, 3, 2), + Function.DOWN_TO, + subdir = "nestedStep" + ) + generateTestsForRangeToAndUntil( + "stepToSmallerLastThenStepToSameLast.kt", + TestBuilder(1 to 8).step(2).step(3).expectValues(1, 4, 7), + subdir = "nestedStep" + ) + generateTestsForFunction( + "stepToSmallerLastThenStepToSameLast.kt", + TestBuilder(8 to 1).step(2).step(3).expectValues(8, 5, 2), + Function.DOWN_TO, + subdir = "nestedStep" + ) + generateTestsForRangeToAndUntil( + "stepToSmallerLastThenStepToSmallerLast.kt", + TestBuilder(1 to 10).step(2).step(3).expectValues(1, 4, 7), + subdir = "nestedStep" + ) + generateTestsForFunction( + "stepToSmallerLastThenStepToSmallerLast.kt", + TestBuilder(10 to 1).step(2).step(3).expectValues(10, 7, 4), + Function.DOWN_TO, + subdir = "nestedStep" + ) + + // Reversed cases + generateTestsForRangeToAndUntil( + "reversedThenStep.kt", + TestBuilder(1 to 8).reversed().step(2).expectValues(8, 6, 4, 2), + subdir = "reversed" + ) + generateTestsForFunction( + "reversedThenStep.kt", + TestBuilder(8 to 1).reversed().step(2).expectValues(1, 3, 5, 7), + Function.DOWN_TO, + subdir = "reversed" + ) + generateTestsForRangeToAndUntil( + "reversedThenStepThenReversed.kt", + TestBuilder(1 to 8).reversed().step(2).reversed().expectValues(2, 4, 6, 8), + subdir = "reversed" + ) + generateTestsForFunction( + "reversedThenStepThenReversed.kt", + TestBuilder(8 to 1).reversed().step(2).reversed().expectValues(7, 5, 3, 1), + Function.DOWN_TO, + subdir = "reversed" + ) + generateTestsForRangeToAndUntil( + "reversedThenStepThenReversedThenStep.kt", + TestBuilder(1 to 10).reversed().step(2).reversed().step(3).expectValues(2, 5, 8), + subdir = "reversed" + ) + generateTestsForFunction( + "reversedThenStepThenReversedThenStep.kt", + TestBuilder(10 to 1).reversed().step(2).reversed().step(3).expectValues(9, 6, 3), + Function.DOWN_TO, + subdir = "reversed" + ) + generateTestsForRangeToAndUntil( + "stepThenReversed.kt", + TestBuilder(1 to 8).step(2).reversed().expectValues(7, 5, 3, 1), + subdir = "reversed" + ) + generateTestsForFunction( + "stepThenReversed.kt", + TestBuilder(8 to 1).step(2).reversed().expectValues(2, 4, 6, 8), + Function.DOWN_TO, + subdir = "reversed" + ) + generateTestsForRangeToAndUntil( + "stepThenReversedThenStep.kt", + TestBuilder(1 to 10).step(2).reversed().step(3).expectValues(9, 6, 3), + subdir = "reversed" + ) + generateTestsForFunction( + "stepThenReversedThenStep.kt", + TestBuilder(10 to 1).step(2).reversed().step(3).expectValues(2, 5, 8), + Function.DOWN_TO, + subdir = "reversed" + ) + generateTestsForRangeToAndUntil( + "stepThenReversedThenStepThenReversed.kt", + TestBuilder(1 to 10).step(2).reversed().step(3).reversed().expectValues(3, 6, 9), + subdir = "reversed" + ) + generateTestsForFunction( + "stepThenReversedThenStepThenReversed.kt", + TestBuilder(10 to 1).step(2).reversed().step(3).reversed().expectValues(8, 5, 2), + Function.DOWN_TO, + subdir = "reversed" + ) + + // Tests with different expectations for each function and/or type + generateTestsForFunction("emptyProgressionToMinValue.kt", TestBuilder(2 to "Int.MIN_VALUE").step(2).expectValues(), Function.UNTIL) + generateTestsForFunction( + "progressionToNonConst.kt", + mapOf( + Type.INT to TestBuilder(1 to "nine()").step(2).expectValues(1, 3, 5, 7), + Type.LONG to TestBuilder(1 to "nine().toLong()").step(2).expectValues(1, 3, 5, 7), + Type.CHAR to TestBuilder("'a'" to "('a' - 1 + nine())").step(2).expectValues("'a'", "'c'", "'e'", "'g'") + ), + Function.UNTIL, + extraCode = "fun nine() = 9" + ) + listOf(Function.RANGE_TO, Function.UNTIL).forEach { function -> + generateTestsForFunction( + "illegalStepNonConst.kt", + TestBuilder(1 to 7).step("zero()").shouldFail().let { + mapOf( + Type.INT to it, + // Argument for LongProgression.step() must be a Long + Type.LONG to TestBuilder(1 to 7).step("zero().toLong()").shouldFail(), + Type.CHAR to it + ) + }, + function, + extraCode = "fun zero() = 0" + ) + } + generateTestsForFunction( + "illegalStepNonConst.kt", + TestBuilder(7 to 1).step("zero()").shouldFail().let { + mapOf( + Type.INT to it, + // Argument for LongProgression.step() must be a Long + Type.LONG to TestBuilder(7 to 1).step("zero().toLong()").shouldFail(), + Type.CHAR to it + ) + }, + Function.DOWN_TO, + extraCode = "fun zero() = 0" + ) + generateTestsForFunction( + "stepNonConst.kt", + TestBuilder(1 to 8).step("two()").expectValues(1, 3, 5, 7).let { + mapOf( + Type.INT to it, + // Argument for LongProgression.step() must be a Long + Type.LONG to TestBuilder(1 to 8).step("two().toLong()").expectValues(1, 3, 5, 7), + Type.CHAR to it + ) + }, + Function.RANGE_TO, + extraCode = "fun two() = 2" + ) + generateTestsForFunction( + "stepNonConst.kt", + TestBuilder(1 to 9).step("two()").expectValues(1, 3, 5, 7).let { + mapOf( + Type.INT to it, + // Argument for LongProgression.step() must be a Long + Type.LONG to TestBuilder(1 to 9).step("two().toLong()").expectValues(1, 3, 5, 7), + Type.CHAR to it + ) + }, + Function.UNTIL, + extraCode = "fun two() = 2" + ) + generateTestsForFunction( + "stepNonConst.kt", + TestBuilder(8 to 1).step("two()").expectValues(8, 6, 4, 2).let { + mapOf( + Type.INT to it, + // Argument for LongProgression.step() must be a Long + Type.LONG to TestBuilder(8 to 1).step("two().toLong()").expectValues(8, 6, 4, 2), + Type.CHAR to it + ) + }, + Function.DOWN_TO, + extraCode = "fun two() = 2" + ) + generateTestsForFunction( + "mixedTypeStep.kt", + mapOf( + Type.INT to TestBuilder("1.toShort()" to "7.toByte()").step(2).expectValues(1, 3, 5, 7), + Type.LONG to TestBuilder("1L" to "7").step("2").expectValues(1, 3, 5, 7) + ), + Function.RANGE_TO + ) + generateTestsForFunction( + "mixedTypeStep.kt", + mapOf( + Type.INT to TestBuilder("1.toShort()" to "8.toByte()").step(2).expectValues(1, 3, 5, 7), + Type.LONG to TestBuilder("1L" to "8").step("2").expectValues(1, 3, 5, 7) + ), + Function.UNTIL + ) + generateTestsForFunction( + "mixedTypeStep.kt", + mapOf( + Type.INT to TestBuilder("7.toByte()" to "1.toShort()").step(2).expectValues(7, 5, 3, 1), + Type.LONG to TestBuilder("7" to "1L").step("2").expectValues(7, 5, 3, 1) + ), + Function.DOWN_TO + ) + generateTestsForFunction( + "minValueToMaxValueStepMaxValue.kt", + mapOf( + Type.INT to TestBuilder("Int.MIN_VALUE" to "Int.MAX_VALUE").step("Int.MAX_VALUE").expectValues( + "Int.MIN_VALUE", + -1, + "Int.MAX_VALUE - 1" + ), + Type.LONG to TestBuilder("Long.MIN_VALUE" to "Long.MAX_VALUE").step("Long.MAX_VALUE").expectValues( + "Long.MIN_VALUE", + -1, + "Long.MAX_VALUE - 1" + ), + Type.CHAR to TestBuilder( + "Char.MIN_VALUE" to "Char.MAX_VALUE" + ).step("Char.MAX_VALUE.toInt()").expectValues("Char.MIN_VALUE", "Char.MAX_VALUE") + ), + Function.RANGE_TO + ) + generateTestsForFunction( + "minValueToMaxValueStepMaxValue.kt", + mapOf( + Type.INT to TestBuilder("Int.MIN_VALUE" to "Int.MAX_VALUE").step("Int.MAX_VALUE").expectValues( + "Int.MIN_VALUE", + -1, + "Int.MAX_VALUE - 1" + ), + Type.LONG to TestBuilder("Long.MIN_VALUE" to "Long.MAX_VALUE").step("Long.MAX_VALUE").expectValues( + "Long.MIN_VALUE", + -1, + "Long.MAX_VALUE - 1" + ) + ), + Function.UNTIL + ) + generateTestsForFunction( + "oneToMaxValueStepMaxValue.kt", + mapOf( + Type.INT to TestBuilder(1 to "Int.MAX_VALUE").step("Int.MAX_VALUE").expectValues(1), + Type.LONG to TestBuilder(1 to "Long.MAX_VALUE").step("Long.MAX_VALUE").expectValues(1), + Type.CHAR to TestBuilder("1.toChar()" to "Char.MAX_VALUE").step("Char.MAX_VALUE.toInt()").expectValues("1.toChar()") + ), + Function.RANGE_TO + ) + generateTestsForFunction( + "zeroToMaxValueStepMaxValue.kt", + mapOf( + Type.INT to TestBuilder(0 to "Int.MAX_VALUE").step("Int.MAX_VALUE").expectValues(0, "Int.MAX_VALUE"), + Type.LONG to TestBuilder(0 to "Long.MAX_VALUE").step("Long.MAX_VALUE").expectValues(0, "Long.MAX_VALUE"), + Type.CHAR to TestBuilder("0.toChar()" to "Char.MAX_VALUE").step("Char.MAX_VALUE.toInt()").expectValues( + "0.toChar()", + "Char.MAX_VALUE" + ) + ), + Function.RANGE_TO + ) + generateTestsForFunction( + "zeroToMaxValueStepMaxValue.kt", + mapOf( + Type.INT to TestBuilder(0 to "Int.MAX_VALUE").step("Int.MAX_VALUE").expectValues(0), + Type.LONG to TestBuilder(0 to "Long.MAX_VALUE").step("Long.MAX_VALUE").expectValues(0), + Type.CHAR to TestBuilder("0.toChar()" to "Char.MAX_VALUE").step("Char.MAX_VALUE.toInt()").expectValues("0.toChar()") + ), + Function.UNTIL + ) + generateTestsForFunction( + "maxValueToMinValueStepMaxValue.kt", + mapOf( + Type.INT to TestBuilder("Int.MAX_VALUE" to "Int.MIN_VALUE").step("Int.MAX_VALUE").expectValues( + "Int.MAX_VALUE", + 0, + "Int.MIN_VALUE + 1" + ), + Type.LONG to TestBuilder("Long.MAX_VALUE" to "Long.MIN_VALUE").step("Long.MAX_VALUE").expectValues( + "Long.MAX_VALUE", + 0, + "Long.MIN_VALUE + 1" + ), + Type.CHAR to TestBuilder("Char.MAX_VALUE" to "Char.MIN_VALUE").step("Char.MAX_VALUE.toInt()").expectValues( + "Char.MAX_VALUE", + "Char.MIN_VALUE" + ) + ), + Function.DOWN_TO + ) + generateTestsForFunction( + "maxValueToOneStepMaxValue.kt", + mapOf( + Type.INT to TestBuilder("Int.MAX_VALUE" to 1).step("Int.MAX_VALUE").expectValues("Int.MAX_VALUE"), + Type.LONG to TestBuilder("Long.MAX_VALUE" to 1).step("Long.MAX_VALUE").expectValues("Long.MAX_VALUE"), + Type.CHAR to TestBuilder("Char.MAX_VALUE" to "1.toChar()").step("Char.MAX_VALUE.toInt()").expectValues("Char.MAX_VALUE") + ), + Function.DOWN_TO + ) + generateTestsForFunction( + "maxValueToZeroStepMaxValue.kt", + mapOf( + Type.INT to TestBuilder("Int.MAX_VALUE" to 0).step("Int.MAX_VALUE").expectValues("Int.MAX_VALUE", 0), + Type.LONG to TestBuilder("Long.MAX_VALUE" to 0).step("Long.MAX_VALUE").expectValues("Long.MAX_VALUE", 0), + Type.CHAR to TestBuilder("Char.MAX_VALUE" to "0.toChar()").step("Char.MAX_VALUE.toInt()").expectValues( + "Char.MAX_VALUE", + "0.toChar()" + ) + ), + Function.DOWN_TO + ) + } +} \ No newline at end of file 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 a41829c835e..4a244667089 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 @@ -16545,6 +16545,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/mixedTypeStep.kt"); } + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/progressionToNonConst.kt"); + } + @TestMetadata("singleElementStepTwo.kt") public void testSingleElementStepTwo() throws Exception { runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/singleElementStepTwo.kt"); 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 4685e1dd88c..64c3a895ce2 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 @@ -17700,6 +17700,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/mixedTypeStep.kt"); } + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/progressionToNonConst.kt"); + } + @TestMetadata("singleElementStepTwo.kt") public void testSingleElementStepTwo() throws Exception { runTest("compiler/testData/codegen/box/ranges/stepped/expression/until/singleElementStepTwo.kt");