From 0e6af517d725cb1d43f14627a56d3ea160e3ed84 Mon Sep 17 00:00:00 2001 From: Mark Punzalan Date: Sat, 4 Apr 2020 23:34:18 -0700 Subject: [PATCH] Generate tests for unsigned progressions using GenerateSteppedRangesCodegenTestData. --- .../ir/FirBlackBoxCodegenTestGenerated.java | 1183 +++++++++++++++++ .../expression/downTo/emptyProgression.kt | 22 + .../expression/downTo/illegalStepNegative.kt | 20 + .../expression/downTo/illegalStepNonConst.kt | 22 + .../downTo/illegalStepThenLegalStep.kt | 20 + .../expression/downTo/illegalStepZero.kt | 20 + .../downTo/legalStepThenIllegalStep.kt | 20 + .../downTo/maxValueToMinValueStepMaxValue.kt | 22 + .../downTo/maxValueToOneStepMaxValue.kt | 22 + .../downTo/maxValueToZeroStepMaxValue.kt | 22 + .../expression/downTo/mixedTypeStep.kt | 15 + .../downTo/nestedStep/stepOneThenStepOne.kt | 22 + .../downTo/nestedStep/stepThenSameStep.kt | 22 + .../nestedStep/stepToSameLastThenStepOne.kt | 22 + .../stepToSameLastThenStepToSameLast.kt | 22 + .../stepToSameLastThenStepToSmallerLast.kt | 22 + .../stepToSmallerLastThenStepOne.kt | 22 + .../stepToSmallerLastThenStepToSameLast.kt | 22 + .../stepToSmallerLastThenStepToSmallerLast.kt | 22 + .../downTo/reversed/reversedThenStep.kt | 22 + .../reversed/reversedThenStepThenReversed.kt | 22 + .../reversedThenStepThenReversedThenStep.kt | 22 + .../downTo/reversed/stepThenReversed.kt | 22 + .../reversed/stepThenReversedThenStep.kt | 22 + .../stepThenReversedThenStepThenReversed.kt | 22 + .../expression/downTo/singleElementStepTwo.kt | 22 + .../expression/downTo/stepNonConst.kt | 24 + .../unsigned/expression/downTo/stepOne.kt | 22 + .../expression/downTo/stepToOutsideRange.kt | 22 + .../expression/downTo/stepToSameLast.kt | 22 + .../expression/downTo/stepToSmallerLast.kt | 22 + .../expression/rangeTo/emptyProgression.kt | 22 + .../expression/rangeTo/illegalStepNegative.kt | 20 + .../expression/rangeTo/illegalStepNonConst.kt | 22 + .../rangeTo/illegalStepThenLegalStep.kt | 20 + .../expression/rangeTo/illegalStepZero.kt | 20 + .../rangeTo/legalStepThenIllegalStep.kt | 20 + .../rangeTo/minValueToMaxValueStepMaxValue.kt | 22 + .../expression/rangeTo/mixedTypeStep.kt | 15 + .../rangeTo/nestedStep/stepOneThenStepOne.kt | 22 + .../rangeTo/nestedStep/stepThenSameStep.kt | 22 + .../nestedStep/stepToSameLastThenStepOne.kt | 22 + .../stepToSameLastThenStepToSameLast.kt | 22 + .../stepToSameLastThenStepToSmallerLast.kt | 22 + .../stepToSmallerLastThenStepOne.kt | 22 + .../stepToSmallerLastThenStepToSameLast.kt | 22 + .../stepToSmallerLastThenStepToSmallerLast.kt | 22 + .../rangeTo/oneToMaxValueStepMaxValue.kt | 22 + .../rangeTo/reversed/reversedThenStep.kt | 22 + .../reversed/reversedThenStepThenReversed.kt | 22 + .../reversedThenStepThenReversedThenStep.kt | 22 + .../rangeTo/reversed/stepThenReversed.kt | 22 + .../reversed/stepThenReversedThenStep.kt | 22 + .../stepThenReversedThenStepThenReversed.kt | 22 + .../rangeTo/singleElementStepTwo.kt | 22 + .../expression/rangeTo/stepNonConst.kt | 24 + .../unsigned/expression/rangeTo/stepOne.kt | 22 + .../expression/rangeTo/stepToOutsideRange.kt | 22 + .../expression/rangeTo/stepToSameLast.kt | 22 + .../expression/rangeTo/stepToSmallerLast.kt | 22 + .../rangeTo/zeroToMaxValueStepMaxValue.kt | 22 + .../expression/until/emptyProgression.kt | 22 + .../until/emptyProgressionToMinValue.kt | 22 + .../expression/until/illegalStepNegative.kt | 20 + .../expression/until/illegalStepNonConst.kt | 22 + .../until/illegalStepThenLegalStep.kt | 20 + .../expression/until/illegalStepZero.kt | 20 + .../until/legalStepThenIllegalStep.kt | 20 + .../until/minValueToMaxValueStepMaxValue.kt | 22 + .../expression/until/mixedTypeStep.kt | 15 + .../until/nestedStep/stepOneThenStepOne.kt | 22 + .../until/nestedStep/stepThenSameStep.kt | 22 + .../nestedStep/stepToSameLastThenStepOne.kt | 22 + .../stepToSameLastThenStepToSameLast.kt | 22 + .../stepToSameLastThenStepToSmallerLast.kt | 22 + .../stepToSmallerLastThenStepOne.kt | 22 + .../stepToSmallerLastThenStepToSameLast.kt | 22 + .../stepToSmallerLastThenStepToSmallerLast.kt | 22 + .../expression/until/progressionToNonConst.kt | 24 + .../until/reversed/reversedThenStep.kt | 22 + .../reversed/reversedThenStepThenReversed.kt | 22 + .../reversedThenStepThenReversedThenStep.kt | 22 + .../until/reversed/stepThenReversed.kt | 22 + .../reversed/stepThenReversedThenStep.kt | 22 + .../stepThenReversedThenStepThenReversed.kt | 22 + .../expression/until/singleElementStepTwo.kt | 22 + .../unsigned/expression/until/stepNonConst.kt | 24 + .../unsigned/expression/until/stepOne.kt | 22 + .../expression/until/stepToOutsideRange.kt | 22 + .../expression/until/stepToSameLast.kt | 22 + .../expression/until/stepToSmallerLast.kt | 22 + .../until/zeroToMaxValueStepMaxValue.kt | 22 + .../literal/downTo/emptyProgression.kt | 20 + .../literal/downTo/illegalStepNegative.kt | 20 + .../literal/downTo/illegalStepNonConst.kt | 22 + .../downTo/illegalStepThenLegalStep.kt | 18 + .../literal/downTo/illegalStepZero.kt | 20 + .../downTo/legalStepThenIllegalStep.kt | 18 + .../downTo/maxValueToMinValueStepMaxValue.kt | 20 + .../downTo/maxValueToOneStepMaxValue.kt | 20 + .../downTo/maxValueToZeroStepMaxValue.kt | 20 + .../unsigned/literal/downTo/mixedTypeStep.kt | 14 + .../downTo/nestedStep/stepOneThenStepOne.kt | 20 + .../downTo/nestedStep/stepThenSameStep.kt | 20 + .../nestedStep/stepToSameLastThenStepOne.kt | 20 + .../stepToSameLastThenStepToSameLast.kt | 20 + .../stepToSameLastThenStepToSmallerLast.kt | 20 + .../stepToSmallerLastThenStepOne.kt | 20 + .../stepToSmallerLastThenStepToSameLast.kt | 20 + .../stepToSmallerLastThenStepToSmallerLast.kt | 20 + .../downTo/reversed/reversedThenStep.kt | 20 + .../reversed/reversedThenStepThenReversed.kt | 20 + .../reversedThenStepThenReversedThenStep.kt | 20 + .../downTo/reversed/stepThenReversed.kt | 20 + .../reversed/stepThenReversedThenStep.kt | 20 + .../stepThenReversedThenStepThenReversed.kt | 20 + .../literal/downTo/singleElementStepTwo.kt | 20 + .../unsigned/literal/downTo/stepNonConst.kt | 22 + .../unsigned/literal/downTo/stepOne.kt | 20 + .../literal/downTo/stepToOutsideRange.kt | 20 + .../unsigned/literal/downTo/stepToSameLast.kt | 20 + .../literal/downTo/stepToSmallerLast.kt | 20 + .../literal/rangeTo/emptyProgression.kt | 20 + .../literal/rangeTo/illegalStepNegative.kt | 20 + .../literal/rangeTo/illegalStepNonConst.kt | 22 + .../rangeTo/illegalStepThenLegalStep.kt | 18 + .../literal/rangeTo/illegalStepZero.kt | 20 + .../rangeTo/legalStepThenIllegalStep.kt | 18 + .../rangeTo/minValueToMaxValueStepMaxValue.kt | 20 + .../unsigned/literal/rangeTo/mixedTypeStep.kt | 14 + .../rangeTo/nestedStep/stepOneThenStepOne.kt | 20 + .../rangeTo/nestedStep/stepThenSameStep.kt | 20 + .../nestedStep/stepToSameLastThenStepOne.kt | 20 + .../stepToSameLastThenStepToSameLast.kt | 20 + .../stepToSameLastThenStepToSmallerLast.kt | 20 + .../stepToSmallerLastThenStepOne.kt | 20 + .../stepToSmallerLastThenStepToSameLast.kt | 20 + .../stepToSmallerLastThenStepToSmallerLast.kt | 20 + .../rangeTo/oneToMaxValueStepMaxValue.kt | 20 + .../rangeTo/reversed/reversedThenStep.kt | 20 + .../reversed/reversedThenStepThenReversed.kt | 20 + .../reversedThenStepThenReversedThenStep.kt | 20 + .../rangeTo/reversed/stepThenReversed.kt | 20 + .../reversed/stepThenReversedThenStep.kt | 20 + .../stepThenReversedThenStepThenReversed.kt | 20 + .../literal/rangeTo/singleElementStepTwo.kt | 20 + .../unsigned/literal/rangeTo/stepNonConst.kt | 22 + .../unsigned/literal/rangeTo/stepOne.kt | 20 + .../literal/rangeTo/stepToOutsideRange.kt | 20 + .../literal/rangeTo/stepToSameLast.kt | 20 + .../literal/rangeTo/stepToSmallerLast.kt | 20 + .../rangeTo/zeroToMaxValueStepMaxValue.kt | 20 + .../literal/until/emptyProgression.kt | 20 + .../until/emptyProgressionToMinValue.kt | 20 + .../literal/until/illegalStepNegative.kt | 20 + .../literal/until/illegalStepNonConst.kt | 22 + .../literal/until/illegalStepThenLegalStep.kt | 18 + .../unsigned/literal/until/illegalStepZero.kt | 20 + .../literal/until/legalStepThenIllegalStep.kt | 18 + .../until/minValueToMaxValueStepMaxValue.kt | 20 + .../unsigned/literal/until/mixedTypeStep.kt | 14 + .../until/nestedStep/stepOneThenStepOne.kt | 20 + .../until/nestedStep/stepThenSameStep.kt | 20 + .../nestedStep/stepToSameLastThenStepOne.kt | 20 + .../stepToSameLastThenStepToSameLast.kt | 20 + .../stepToSameLastThenStepToSmallerLast.kt | 20 + .../stepToSmallerLastThenStepOne.kt | 20 + .../stepToSmallerLastThenStepToSameLast.kt | 20 + .../stepToSmallerLastThenStepToSmallerLast.kt | 20 + .../literal/until/progressionToNonConst.kt | 22 + .../until/reversed/reversedThenStep.kt | 20 + .../reversed/reversedThenStepThenReversed.kt | 20 + .../reversedThenStepThenReversedThenStep.kt | 20 + .../until/reversed/stepThenReversed.kt | 20 + .../reversed/stepThenReversedThenStep.kt | 20 + .../stepThenReversedThenStepThenReversed.kt | 20 + .../literal/until/singleElementStepTwo.kt | 20 + .../unsigned/literal/until/stepNonConst.kt | 22 + .../stepped/unsigned/literal/until/stepOne.kt | 20 + .../literal/until/stepToOutsideRange.kt | 20 + .../unsigned/literal/until/stepToSameLast.kt | 20 + .../literal/until/stepToSmallerLast.kt | 20 + .../until/zeroToMaxValueStepMaxValue.kt | 20 + .../codegen/BlackBoxCodegenTestGenerated.java | 1183 +++++++++++++++++ .../ir/IrBlackBoxCodegenTestGenerated.java | 1183 +++++++++++++++++ .../GenerateSteppedRangesCodegenTestData.kt | 199 ++- .../IrJsCodegenBoxTestGenerated.java | 1183 +++++++++++++++++ .../semantics/JsCodegenBoxTestGenerated.java | 1138 ++++++++++++++++ 188 files changed, 9785 insertions(+), 53 deletions(-) create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/emptyProgression.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNegative.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepThenLegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepZero.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/legalStepThenIllegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToMinValueStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToOneStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToZeroStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/mixedTypeStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepOneThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepThenSameStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/singleElementStepTwo.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToOutsideRange.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/emptyProgression.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNegative.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepThenLegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepZero.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/legalStepThenIllegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/minValueToMaxValueStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/mixedTypeStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepOneThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepThenSameStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/oneToMaxValueStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/singleElementStepTwo.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToOutsideRange.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/zeroToMaxValueStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgression.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgressionToMinValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNegative.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepThenLegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepZero.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/legalStepThenIllegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/minValueToMaxValueStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/mixedTypeStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepOneThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepThenSameStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/progressionToNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/singleElementStepTwo.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToOutsideRange.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/zeroToMaxValueStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/emptyProgression.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNegative.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepThenLegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepZero.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/legalStepThenIllegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToMinValueStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToOneStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToZeroStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/mixedTypeStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepOneThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepThenSameStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/singleElementStepTwo.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToOutsideRange.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/emptyProgression.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNegative.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepThenLegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepZero.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/legalStepThenIllegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/minValueToMaxValueStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/mixedTypeStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepOneThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepThenSameStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/oneToMaxValueStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/singleElementStepTwo.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToOutsideRange.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/zeroToMaxValueStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgression.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgressionToMinValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNegative.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepThenLegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepZero.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/legalStepThenIllegalStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/minValueToMaxValueStepMaxValue.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/mixedTypeStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepOneThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepThenSameStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/progressionToNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStep.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStepThenReversed.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/singleElementStepTwo.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepNonConst.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepOne.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToOutsideRange.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSameLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSmallerLast.kt create mode 100644 compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/zeroToMaxValueStepMaxValue.kt diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index b42479d4492..f7747f49698 100644 --- a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -22877,6 +22877,1189 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Unsigned extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInUnsigned() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expression extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DownTo extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInDownTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("maxValueToMinValueStepMaxValue.kt") + public void testMaxValueToMinValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToMinValueStepMaxValue.kt"); + } + + @TestMetadata("maxValueToOneStepMaxValue.kt") + public void testMaxValueToOneStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToOneStepMaxValue.kt"); + } + + @TestMetadata("maxValueToZeroStepMaxValue.kt") + public void testMaxValueToZeroStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToZeroStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/mixedTypeStep.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSmallerLast.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RangeTo extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInRangeTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/mixedTypeStep.kt"); + } + + @TestMetadata("oneToMaxValueStepMaxValue.kt") + public void testOneToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/oneToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Until extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInUntil() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgression.kt"); + } + + @TestMetadata("emptyProgressionToMinValue.kt") + public void testEmptyProgressionToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgressionToMinValue.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/mixedTypeStep.kt"); + } + + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/progressionToNonConst.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Literal extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInLiteral() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DownTo extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInDownTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("maxValueToMinValueStepMaxValue.kt") + public void testMaxValueToMinValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToMinValueStepMaxValue.kt"); + } + + @TestMetadata("maxValueToOneStepMaxValue.kt") + public void testMaxValueToOneStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToOneStepMaxValue.kt"); + } + + @TestMetadata("maxValueToZeroStepMaxValue.kt") + public void testMaxValueToZeroStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToZeroStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/mixedTypeStep.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSmallerLast.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RangeTo extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInRangeTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/mixedTypeStep.kt"); + } + + @TestMetadata("oneToMaxValueStepMaxValue.kt") + public void testOneToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/oneToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Until extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInUntil() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgression.kt"); + } + + @TestMetadata("emptyProgressionToMinValue.kt") + public void testEmptyProgressionToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgressionToMinValue.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/mixedTypeStep.kt"); + } + + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/progressionToNonConst.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + } + } } @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/emptyProgression.kt new file mode 100644 index 00000000000..28ec5251fa0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/emptyProgression.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u downTo 2u + for (i in uintProgression step 2) { + uintList += i + } + assertTrue(uintList.isEmpty()) + + val ulongList = mutableListOf() + val ulongProgression = 1uL downTo 2uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertTrue(ulongList.isEmpty()) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNegative.kt new file mode 100644 index 00000000000..4059407965e --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNegative.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 7u downTo 1u + for (i in uintProgression step -1) { + } + } + + assertFailsWith { + val ulongProgression = 7uL downTo 1uL + for (i in ulongProgression step -1L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNonConst.kt new file mode 100644 index 00000000000..4bfbb0e157b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNonConst.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun zero() = 0 + +fun box(): String { + assertFailsWith { + val uintProgression = 7u downTo 1u + for (i in uintProgression step zero()) { + } + } + + assertFailsWith { + val ulongProgression = 7uL downTo 1uL + for (i in ulongProgression step zero().toLong()) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepThenLegalStep.kt new file mode 100644 index 00000000000..b11835673a0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepThenLegalStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 7u downTo 1u + for (i in uintProgression step 0 step 2) { + } + } + + assertFailsWith { + val ulongProgression = 7uL downTo 1uL + for (i in ulongProgression step 0L step 2L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepZero.kt new file mode 100644 index 00000000000..4d8f7578a5b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepZero.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 7u downTo 1u + for (i in uintProgression step 0) { + } + } + + assertFailsWith { + val ulongProgression = 7uL downTo 1uL + for (i in ulongProgression step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/legalStepThenIllegalStep.kt new file mode 100644 index 00000000000..9fb3308573a --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/legalStepThenIllegalStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 7u downTo 1u + for (i in uintProgression step 2 step 0) { + } + } + + assertFailsWith { + val ulongProgression = 7uL downTo 1uL + for (i in ulongProgression step 2L step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToMinValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToMinValueStepMaxValue.kt new file mode 100644 index 00000000000..0a341b4bbac --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToMinValueStepMaxValue.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = UInt.MAX_VALUE downTo UInt.MIN_VALUE + for (i in uintProgression step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(UInt.MAX_VALUE, 2147483648u, 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = ULong.MAX_VALUE downTo ULong.MIN_VALUE + for (i in ulongProgression step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(ULong.MAX_VALUE, 9223372036854775808uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToOneStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToOneStepMaxValue.kt new file mode 100644 index 00000000000..ccfc49f2816 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToOneStepMaxValue.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = UInt.MAX_VALUE downTo 1u + for (i in uintProgression step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(UInt.MAX_VALUE, 2147483648u, 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = ULong.MAX_VALUE downTo 1uL + for (i in ulongProgression step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(ULong.MAX_VALUE, 9223372036854775808uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToZeroStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToZeroStepMaxValue.kt new file mode 100644 index 00000000000..795ecc71c92 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToZeroStepMaxValue.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = UInt.MAX_VALUE downTo 0u + for (i in uintProgression step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(UInt.MAX_VALUE, 2147483648u, 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = ULong.MAX_VALUE downTo 0uL + for (i in ulongProgression step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(ULong.MAX_VALUE, 9223372036854775808uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/mixedTypeStep.kt new file mode 100644 index 00000000000..a69111557c4 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/mixedTypeStep.kt @@ -0,0 +1,15 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 7.toUByte() downTo 1.toUByte() + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepOneThenStepOne.kt new file mode 100644 index 00000000000..5f4c38e44ec --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepOneThenStepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 4u downTo 1u + for (i in uintProgression step 1 step 1) { + uintList += i + } + assertEquals(listOf(4u, 3u, 2u, 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 4uL downTo 1uL + for (i in ulongProgression step 1L step 1L) { + ulongList += i + } + assertEquals(listOf(4uL, 3uL, 2uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepThenSameStep.kt new file mode 100644 index 00000000000..f3fcab0911e --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepThenSameStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 8u downTo 1u + for (i in uintProgression step 2 step 2) { + uintList += i + } + assertEquals(listOf(8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 8uL downTo 1uL + for (i in ulongProgression step 2L step 2L) { + ulongList += i + } + assertEquals(listOf(8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt new file mode 100644 index 00000000000..908fa8a56b7 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 5u downTo 1u + for (i in uintProgression step 2 step 1) { + uintList += i + } + assertEquals(listOf(5u, 4u, 3u, 2u, 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 5uL downTo 1uL + for (i in ulongProgression step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(5uL, 4uL, 3uL, 2uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt new file mode 100644 index 00000000000..fbe69da2ee6 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 7u downTo 1u + for (i in uintProgression step 3 step 2) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 7uL downTo 1uL + for (i in ulongProgression step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(7uL, 5uL, 3uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..526d7c5136d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 10u downTo 1u + for (i in uintProgression step 3 step 2) { + uintList += i + } + assertEquals(listOf(10u, 8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 10uL downTo 1uL + for (i in ulongProgression step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(10uL, 8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt new file mode 100644 index 00000000000..c02f653bdfd --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 6u downTo 1u + for (i in uintProgression step 2 step 1) { + uintList += i + } + assertEquals(listOf(6u, 5u, 4u, 3u, 2u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 6uL downTo 1uL + for (i in ulongProgression step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(6uL, 5uL, 4uL, 3uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt new file mode 100644 index 00000000000..629ffc5880a --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 8u downTo 1u + for (i in uintProgression step 2 step 3) { + uintList += i + } + assertEquals(listOf(8u, 5u, 2u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 8uL downTo 1uL + for (i in ulongProgression step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(8uL, 5uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..a3163b71207 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 10u downTo 1u + for (i in uintProgression step 2 step 3) { + uintList += i + } + assertEquals(listOf(10u, 7u, 4u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 10uL downTo 1uL + for (i in ulongProgression step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(10uL, 7uL, 4uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStep.kt new file mode 100644 index 00000000000..baacf6f8231 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 8u downTo 1u + for (i in uintProgression.reversed() step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 8uL downTo 1uL + for (i in ulongProgression.reversed() step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversed.kt new file mode 100644 index 00000000000..2e7603e3149 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversed.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 8u downTo 1u + for (i in (uintProgression.reversed() step 2).reversed()) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 8uL downTo 1uL + for (i in (ulongProgression.reversed() step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(7uL, 5uL, 3uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt new file mode 100644 index 00000000000..9d08d61a6b0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 10u downTo 1u + for (i in (uintProgression.reversed() step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(9u, 6u, 3u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 10uL downTo 1uL + for (i in (ulongProgression.reversed() step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(9uL, 6uL, 3uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversed.kt new file mode 100644 index 00000000000..7529a2e60d8 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversed.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 8u downTo 1u + for (i in (uintProgression step 2).reversed()) { + uintList += i + } + assertEquals(listOf(2u, 4u, 6u, 8u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 8uL downTo 1uL + for (i in (ulongProgression step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(2uL, 4uL, 6uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStep.kt new file mode 100644 index 00000000000..65f5f80107c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 10u downTo 1u + for (i in (uintProgression step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(2u, 5u, 8u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 10uL downTo 1uL + for (i in (ulongProgression step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(2uL, 5uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt new file mode 100644 index 00000000000..3eb5aa09134 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 10u downTo 1u + for (i in ((uintProgression step 2).reversed() step 3).reversed()) { + uintList += i + } + assertEquals(listOf(8u, 5u, 2u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 10uL downTo 1uL + for (i in ((ulongProgression step 2L).reversed() step 3L).reversed()) { + ulongList += i + } + assertEquals(listOf(8uL, 5uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/singleElementStepTwo.kt new file mode 100644 index 00000000000..7bafff48aba --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/singleElementStepTwo.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u downTo 1u + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL downTo 1uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertEquals(listOf(1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepNonConst.kt new file mode 100644 index 00000000000..89d445d7ca8 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepNonConst.kt @@ -0,0 +1,24 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun two() = 2 + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 8u downTo 1u + for (i in uintProgression step two()) { + uintList += i + } + assertEquals(listOf(8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 8uL downTo 1uL + for (i in ulongProgression step two().toLong()) { + ulongList += i + } + assertEquals(listOf(8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepOne.kt new file mode 100644 index 00000000000..712ab0f373d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 4u downTo 1u + for (i in uintProgression step 1) { + uintList += i + } + assertEquals(listOf(4u, 3u, 2u, 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 4uL downTo 1uL + for (i in ulongProgression step 1L) { + ulongList += i + } + assertEquals(listOf(4uL, 3uL, 2uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToOutsideRange.kt new file mode 100644 index 00000000000..dfa9cd0ad06 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToOutsideRange.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 7u downTo 1u + for (i in uintProgression step 7) { + uintList += i + } + assertEquals(listOf(7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 7uL downTo 1uL + for (i in ulongProgression step 7L) { + ulongList += i + } + assertEquals(listOf(7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSameLast.kt new file mode 100644 index 00000000000..63524bcb543 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSameLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 7u downTo 1u + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 7uL downTo 1uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertEquals(listOf(7uL, 5uL, 3uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSmallerLast.kt new file mode 100644 index 00000000000..d83f9150771 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSmallerLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 8u downTo 1u + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 8uL downTo 1uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertEquals(listOf(8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/emptyProgression.kt new file mode 100644 index 00000000000..91bf49f20fd --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/emptyProgression.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 2u..1u + for (i in uintProgression step 2) { + uintList += i + } + assertTrue(uintList.isEmpty()) + + val ulongList = mutableListOf() + val ulongProgression = 2uL..1uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertTrue(ulongList.isEmpty()) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNegative.kt new file mode 100644 index 00000000000..fb1e0eb9d53 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNegative.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 1u..7u + for (i in uintProgression step -1) { + } + } + + assertFailsWith { + val ulongProgression = 1uL..7uL + for (i in ulongProgression step -1L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNonConst.kt new file mode 100644 index 00000000000..43d1cd2a120 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNonConst.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun zero() = 0 + +fun box(): String { + assertFailsWith { + val uintProgression = 1u..7u + for (i in uintProgression step zero()) { + } + } + + assertFailsWith { + val ulongProgression = 1uL..7uL + for (i in ulongProgression step zero().toLong()) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepThenLegalStep.kt new file mode 100644 index 00000000000..9bebf6f2b95 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepThenLegalStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 1u..7u + for (i in uintProgression step 0 step 2) { + } + } + + assertFailsWith { + val ulongProgression = 1uL..7uL + for (i in ulongProgression step 0L step 2L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepZero.kt new file mode 100644 index 00000000000..e0dcb770ace --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepZero.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 1u..7u + for (i in uintProgression step 0) { + } + } + + assertFailsWith { + val ulongProgression = 1uL..7uL + for (i in ulongProgression step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/legalStepThenIllegalStep.kt new file mode 100644 index 00000000000..cab81d9639c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/legalStepThenIllegalStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 1u..7u + for (i in uintProgression step 2 step 0) { + } + } + + assertFailsWith { + val ulongProgression = 1uL..7uL + for (i in ulongProgression step 2L step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/minValueToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/minValueToMaxValueStepMaxValue.kt new file mode 100644 index 00000000000..dca73f8d250 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/minValueToMaxValueStepMaxValue.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = UInt.MIN_VALUE..UInt.MAX_VALUE + for (i in uintProgression step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(UInt.MIN_VALUE, 2147483647u, UInt.MAX_VALUE - 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = ULong.MIN_VALUE..ULong.MAX_VALUE + for (i in ulongProgression step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(ULong.MIN_VALUE, 9223372036854775807uL, ULong.MAX_VALUE - 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/mixedTypeStep.kt new file mode 100644 index 00000000000..c2b2cb43aa8 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/mixedTypeStep.kt @@ -0,0 +1,15 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1.toUByte()..7.toUByte() + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepOneThenStepOne.kt new file mode 100644 index 00000000000..5a1e472c95d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepOneThenStepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..4u + for (i in uintProgression step 1 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..4uL + for (i in ulongProgression step 1L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepThenSameStep.kt new file mode 100644 index 00000000000..4ba8228860a --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepThenSameStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..8u + for (i in uintProgression step 2 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..8uL + for (i in ulongProgression step 2L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt new file mode 100644 index 00000000000..8997e1db48f --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..5u + for (i in uintProgression step 2 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u, 5u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..5uL + for (i in ulongProgression step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL, 5uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt new file mode 100644 index 00000000000..732275ef95b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..7u + for (i in uintProgression step 3 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..7uL + for (i in ulongProgression step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..b70df5e44e4 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..10u + for (i in uintProgression step 3 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u, 9u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..10uL + for (i in ulongProgression step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL, 9uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt new file mode 100644 index 00000000000..d2607da8f9d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..6u + for (i in uintProgression step 2 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u, 5u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..6uL + for (i in ulongProgression step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL, 5uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt new file mode 100644 index 00000000000..f7ee65411f9 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..8u + for (i in uintProgression step 2 step 3) { + uintList += i + } + assertEquals(listOf(1u, 4u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..8uL + for (i in ulongProgression step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(1uL, 4uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..62f716a1773 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..10u + for (i in uintProgression step 2 step 3) { + uintList += i + } + assertEquals(listOf(1u, 4u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..10uL + for (i in ulongProgression step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(1uL, 4uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/oneToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/oneToMaxValueStepMaxValue.kt new file mode 100644 index 00000000000..4c3cc84c351 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/oneToMaxValueStepMaxValue.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..UInt.MAX_VALUE + for (i in uintProgression step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(1u, 2147483648u, UInt.MAX_VALUE), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..ULong.MAX_VALUE + for (i in ulongProgression step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(1uL, 9223372036854775808uL, ULong.MAX_VALUE), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStep.kt new file mode 100644 index 00000000000..3b8f4c67734 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..8u + for (i in uintProgression.reversed() step 2) { + uintList += i + } + assertEquals(listOf(8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..8uL + for (i in ulongProgression.reversed() step 2L) { + ulongList += i + } + assertEquals(listOf(8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversed.kt new file mode 100644 index 00000000000..bfa5ea1431c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversed.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..8u + for (i in (uintProgression.reversed() step 2).reversed()) { + uintList += i + } + assertEquals(listOf(2u, 4u, 6u, 8u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..8uL + for (i in (ulongProgression.reversed() step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(2uL, 4uL, 6uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt new file mode 100644 index 00000000000..8d7d13edbf9 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..10u + for (i in (uintProgression.reversed() step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(2u, 5u, 8u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..10uL + for (i in (ulongProgression.reversed() step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(2uL, 5uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversed.kt new file mode 100644 index 00000000000..7538c78167d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversed.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..8u + for (i in (uintProgression step 2).reversed()) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..8uL + for (i in (ulongProgression step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(7uL, 5uL, 3uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStep.kt new file mode 100644 index 00000000000..6cb250f68e2 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..10u + for (i in (uintProgression step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(9u, 6u, 3u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..10uL + for (i in (ulongProgression step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(9uL, 6uL, 3uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt new file mode 100644 index 00000000000..95554ffd030 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..10u + for (i in ((uintProgression step 2).reversed() step 3).reversed()) { + uintList += i + } + assertEquals(listOf(3u, 6u, 9u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..10uL + for (i in ((ulongProgression step 2L).reversed() step 3L).reversed()) { + ulongList += i + } + assertEquals(listOf(3uL, 6uL, 9uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/singleElementStepTwo.kt new file mode 100644 index 00000000000..8d8d5f84e95 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/singleElementStepTwo.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..1u + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..1uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertEquals(listOf(1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepNonConst.kt new file mode 100644 index 00000000000..5adac93e69c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepNonConst.kt @@ -0,0 +1,24 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun two() = 2 + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..8u + for (i in uintProgression step two()) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..8uL + for (i in ulongProgression step two().toLong()) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepOne.kt new file mode 100644 index 00000000000..3a3b115cf60 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..4u + for (i in uintProgression step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..4uL + for (i in ulongProgression step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToOutsideRange.kt new file mode 100644 index 00000000000..7e2999a2a36 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToOutsideRange.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..7u + for (i in uintProgression step 7) { + uintList += i + } + assertEquals(listOf(1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..7uL + for (i in ulongProgression step 7L) { + ulongList += i + } + assertEquals(listOf(1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSameLast.kt new file mode 100644 index 00000000000..e25f80b4ffa --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSameLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..7u + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..7uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSmallerLast.kt new file mode 100644 index 00000000000..0dd665b1fd9 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSmallerLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u..8u + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL..8uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/zeroToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/zeroToMaxValueStepMaxValue.kt new file mode 100644 index 00000000000..506d39a0f3f --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/zeroToMaxValueStepMaxValue.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 0u..UInt.MAX_VALUE + for (i in uintProgression step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(0u, 2147483647u, UInt.MAX_VALUE - 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 0uL..ULong.MAX_VALUE + for (i in ulongProgression step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(0uL, 9223372036854775807uL, ULong.MAX_VALUE - 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgression.kt new file mode 100644 index 00000000000..f012f0d524e --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgression.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 2u until 2u + for (i in uintProgression step 2) { + uintList += i + } + assertTrue(uintList.isEmpty()) + + val ulongList = mutableListOf() + val ulongProgression = 2uL until 2uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertTrue(ulongList.isEmpty()) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgressionToMinValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgressionToMinValue.kt new file mode 100644 index 00000000000..94ef50aa51f --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgressionToMinValue.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 2u until UInt.MIN_VALUE + for (i in uintProgression step 2) { + uintList += i + } + assertTrue(uintList.isEmpty()) + + val ulongList = mutableListOf() + val ulongProgression = 2uL until ULong.MIN_VALUE + for (i in ulongProgression step 2L) { + ulongList += i + } + assertTrue(ulongList.isEmpty()) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNegative.kt new file mode 100644 index 00000000000..a1cec13bba5 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNegative.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 1u until 8u + for (i in uintProgression step -1) { + } + } + + assertFailsWith { + val ulongProgression = 1uL until 8uL + for (i in ulongProgression step -1L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNonConst.kt new file mode 100644 index 00000000000..a835e4c4696 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNonConst.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun zero() = 0 + +fun box(): String { + assertFailsWith { + val uintProgression = 1u until 7u + for (i in uintProgression step zero()) { + } + } + + assertFailsWith { + val ulongProgression = 1uL until 7uL + for (i in ulongProgression step zero().toLong()) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepThenLegalStep.kt new file mode 100644 index 00000000000..290e61850fd --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepThenLegalStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 1u until 8u + for (i in uintProgression step 0 step 2) { + } + } + + assertFailsWith { + val ulongProgression = 1uL until 8uL + for (i in ulongProgression step 0L step 2L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepZero.kt new file mode 100644 index 00000000000..31f20d82bb8 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepZero.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 1u until 8u + for (i in uintProgression step 0) { + } + } + + assertFailsWith { + val ulongProgression = 1uL until 8uL + for (i in ulongProgression step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/legalStepThenIllegalStep.kt new file mode 100644 index 00000000000..629ccfabbef --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/legalStepThenIllegalStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + val uintProgression = 1u until 8u + for (i in uintProgression step 2 step 0) { + } + } + + assertFailsWith { + val ulongProgression = 1uL until 8uL + for (i in ulongProgression step 2L step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/minValueToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/minValueToMaxValueStepMaxValue.kt new file mode 100644 index 00000000000..790f63c3b3e --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/minValueToMaxValueStepMaxValue.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = UInt.MIN_VALUE until UInt.MAX_VALUE + for (i in uintProgression step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(UInt.MIN_VALUE, 2147483647u, UInt.MAX_VALUE - 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = ULong.MIN_VALUE until ULong.MAX_VALUE + for (i in ulongProgression step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(ULong.MIN_VALUE, 9223372036854775807uL, ULong.MAX_VALUE - 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/mixedTypeStep.kt new file mode 100644 index 00000000000..d88883542fa --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/mixedTypeStep.kt @@ -0,0 +1,15 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1.toUByte() until 8.toUByte() + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepOneThenStepOne.kt new file mode 100644 index 00000000000..371ffa168c5 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepOneThenStepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 5u + for (i in uintProgression step 1 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 5uL + for (i in ulongProgression step 1L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepThenSameStep.kt new file mode 100644 index 00000000000..9295154131c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepThenSameStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 9u + for (i in uintProgression step 2 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 9uL + for (i in ulongProgression step 2L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepOne.kt new file mode 100644 index 00000000000..51d446daa1b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 6u + for (i in uintProgression step 2 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u, 5u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 6uL + for (i in ulongProgression step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL, 5uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt new file mode 100644 index 00000000000..7460a007a9e --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 8u + for (i in uintProgression step 3 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 8uL + for (i in ulongProgression step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..db522e214ce --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 11u + for (i in uintProgression step 3 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u, 9u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 11uL + for (i in ulongProgression step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL, 9uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt new file mode 100644 index 00000000000..764e3ac8ef4 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 7u + for (i in uintProgression step 2 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u, 5u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 7uL + for (i in ulongProgression step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL, 5uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt new file mode 100644 index 00000000000..35e93f87395 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 9u + for (i in uintProgression step 2 step 3) { + uintList += i + } + assertEquals(listOf(1u, 4u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 9uL + for (i in ulongProgression step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(1uL, 4uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..f2c34289ff3 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 11u + for (i in uintProgression step 2 step 3) { + uintList += i + } + assertEquals(listOf(1u, 4u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 11uL + for (i in ulongProgression step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(1uL, 4uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/progressionToNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/progressionToNonConst.kt new file mode 100644 index 00000000000..9f72749c9a8 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/progressionToNonConst.kt @@ -0,0 +1,24 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun nine() = 9 + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until nine().toUInt() + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until nine().toULong() + for (i in ulongProgression step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStep.kt new file mode 100644 index 00000000000..3c44f55302d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 9u + for (i in uintProgression.reversed() step 2) { + uintList += i + } + assertEquals(listOf(8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 9uL + for (i in ulongProgression.reversed() step 2L) { + ulongList += i + } + assertEquals(listOf(8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversed.kt new file mode 100644 index 00000000000..7a2add865b7 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversed.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 9u + for (i in (uintProgression.reversed() step 2).reversed()) { + uintList += i + } + assertEquals(listOf(2u, 4u, 6u, 8u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 9uL + for (i in (ulongProgression.reversed() step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(2uL, 4uL, 6uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversedThenStep.kt new file mode 100644 index 00000000000..ea13e5baa72 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversedThenStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 11u + for (i in (uintProgression.reversed() step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(2u, 5u, 8u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 11uL + for (i in (ulongProgression.reversed() step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(2uL, 5uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversed.kt new file mode 100644 index 00000000000..1c67f3b8398 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversed.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 9u + for (i in (uintProgression step 2).reversed()) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 9uL + for (i in (ulongProgression step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(7uL, 5uL, 3uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStep.kt new file mode 100644 index 00000000000..5fe5a1f3511 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStep.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 11u + for (i in (uintProgression step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(9u, 6u, 3u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 11uL + for (i in (ulongProgression step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(9uL, 6uL, 3uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStepThenReversed.kt new file mode 100644 index 00000000000..c22a7fd472d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStepThenReversed.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 11u + for (i in ((uintProgression step 2).reversed() step 3).reversed()) { + uintList += i + } + assertEquals(listOf(3u, 6u, 9u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 11uL + for (i in ((ulongProgression step 2L).reversed() step 3L).reversed()) { + ulongList += i + } + assertEquals(listOf(3uL, 6uL, 9uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/singleElementStepTwo.kt new file mode 100644 index 00000000000..8fbf7690631 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/singleElementStepTwo.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 2u + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 2uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertEquals(listOf(1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepNonConst.kt new file mode 100644 index 00000000000..505fe2e794c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepNonConst.kt @@ -0,0 +1,24 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun two() = 2 + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 9u + for (i in uintProgression step two()) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 9uL + for (i in ulongProgression step two().toLong()) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepOne.kt new file mode 100644 index 00000000000..7d490069007 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepOne.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 5u + for (i in uintProgression step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 5uL + for (i in ulongProgression step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToOutsideRange.kt new file mode 100644 index 00000000000..4dbd4cec779 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToOutsideRange.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 8u + for (i in uintProgression step 7) { + uintList += i + } + assertEquals(listOf(1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 8uL + for (i in ulongProgression step 7L) { + ulongList += i + } + assertEquals(listOf(1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSameLast.kt new file mode 100644 index 00000000000..1469e983358 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSameLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 8u + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 8uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSmallerLast.kt new file mode 100644 index 00000000000..faf6edaba50 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSmallerLast.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 1u until 9u + for (i in uintProgression step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 1uL until 9uL + for (i in ulongProgression step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/zeroToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/zeroToMaxValueStepMaxValue.kt new file mode 100644 index 00000000000..eaee238aa7a --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/zeroToMaxValueStepMaxValue.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + val uintProgression = 0u until UInt.MAX_VALUE + for (i in uintProgression step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(0u, 2147483647u, UInt.MAX_VALUE - 1u), uintList) + + val ulongList = mutableListOf() + val ulongProgression = 0uL until ULong.MAX_VALUE + for (i in ulongProgression step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(0uL, 9223372036854775807uL, ULong.MAX_VALUE - 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/emptyProgression.kt new file mode 100644 index 00000000000..a263caac6b0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/emptyProgression.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u downTo 2u step 2) { + uintList += i + } + assertTrue(uintList.isEmpty()) + + val ulongList = mutableListOf() + for (i in 1uL downTo 2uL step 2L) { + ulongList += i + } + assertTrue(ulongList.isEmpty()) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNegative.kt new file mode 100644 index 00000000000..8d797294ad3 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNegative.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +// 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 7u downTo 1u step -1) { + } + } + + assertFailsWith { + for (i in 7uL downTo 1uL step -1L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNonConst.kt new file mode 100644 index 00000000000..3f1b329d72d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNonConst.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +// KT-34166: Translation of loop over literal completely removes the validation of step +// DONT_TARGET_EXACT_BACKEND: JS +import kotlin.test.* + +fun zero() = 0 + +fun box(): String { + assertFailsWith { + for (i in 7u downTo 1u step zero()) { + } + } + + assertFailsWith { + for (i in 7uL downTo 1uL step zero().toLong()) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepThenLegalStep.kt new file mode 100644 index 00000000000..1d481f5726b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepThenLegalStep.kt @@ -0,0 +1,18 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + for (i in 7u downTo 1u step 0 step 2) { + } + } + + assertFailsWith { + for (i in 7uL downTo 1uL step 0L step 2L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepZero.kt new file mode 100644 index 00000000000..869e53de0cf --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepZero.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +// 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 7u downTo 1u step 0) { + } + } + + assertFailsWith { + for (i in 7uL downTo 1uL step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/legalStepThenIllegalStep.kt new file mode 100644 index 00000000000..c1e1e55e39c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/legalStepThenIllegalStep.kt @@ -0,0 +1,18 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + for (i in 7u downTo 1u step 2 step 0) { + } + } + + assertFailsWith { + for (i in 7uL downTo 1uL step 2L step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToMinValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToMinValueStepMaxValue.kt new file mode 100644 index 00000000000..4aa1ce62319 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToMinValueStepMaxValue.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in UInt.MAX_VALUE downTo UInt.MIN_VALUE step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(UInt.MAX_VALUE, 2147483648u, 1u), uintList) + + val ulongList = mutableListOf() + for (i in ULong.MAX_VALUE downTo ULong.MIN_VALUE step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(ULong.MAX_VALUE, 9223372036854775808uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToOneStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToOneStepMaxValue.kt new file mode 100644 index 00000000000..b81147e54ba --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToOneStepMaxValue.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in UInt.MAX_VALUE downTo 1u step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(UInt.MAX_VALUE, 2147483648u, 1u), uintList) + + val ulongList = mutableListOf() + for (i in ULong.MAX_VALUE downTo 1uL step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(ULong.MAX_VALUE, 9223372036854775808uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToZeroStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToZeroStepMaxValue.kt new file mode 100644 index 00000000000..ebed1788519 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToZeroStepMaxValue.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in UInt.MAX_VALUE downTo 0u step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(UInt.MAX_VALUE, 2147483648u, 1u), uintList) + + val ulongList = mutableListOf() + for (i in ULong.MAX_VALUE downTo 0uL step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(ULong.MAX_VALUE, 9223372036854775808uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/mixedTypeStep.kt new file mode 100644 index 00000000000..4164c0337a3 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/mixedTypeStep.kt @@ -0,0 +1,14 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 7.toUByte() downTo 1.toUByte() step 2) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepOneThenStepOne.kt new file mode 100644 index 00000000000..ba6ac0b3541 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepOneThenStepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 4u downTo 1u step 1 step 1) { + uintList += i + } + assertEquals(listOf(4u, 3u, 2u, 1u), uintList) + + val ulongList = mutableListOf() + for (i in 4uL downTo 1uL step 1L step 1L) { + ulongList += i + } + assertEquals(listOf(4uL, 3uL, 2uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepThenSameStep.kt new file mode 100644 index 00000000000..ead64bb55b1 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepThenSameStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 8u downTo 1u step 2 step 2) { + uintList += i + } + assertEquals(listOf(8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + for (i in 8uL downTo 1uL step 2L step 2L) { + ulongList += i + } + assertEquals(listOf(8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt new file mode 100644 index 00000000000..366f2530bc8 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 5u downTo 1u step 2 step 1) { + uintList += i + } + assertEquals(listOf(5u, 4u, 3u, 2u, 1u), uintList) + + val ulongList = mutableListOf() + for (i in 5uL downTo 1uL step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(5uL, 4uL, 3uL, 2uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt new file mode 100644 index 00000000000..c747b05f355 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 7u downTo 1u step 3 step 2) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + val ulongList = mutableListOf() + for (i in 7uL downTo 1uL step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(7uL, 5uL, 3uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..9a00ef57054 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 10u downTo 1u step 3 step 2) { + uintList += i + } + assertEquals(listOf(10u, 8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + for (i in 10uL downTo 1uL step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(10uL, 8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt new file mode 100644 index 00000000000..b9c2c8ecb98 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 6u downTo 1u step 2 step 1) { + uintList += i + } + assertEquals(listOf(6u, 5u, 4u, 3u, 2u), uintList) + + val ulongList = mutableListOf() + for (i in 6uL downTo 1uL step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(6uL, 5uL, 4uL, 3uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt new file mode 100644 index 00000000000..edcf0d9ae68 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 8u downTo 1u step 2 step 3) { + uintList += i + } + assertEquals(listOf(8u, 5u, 2u), uintList) + + val ulongList = mutableListOf() + for (i in 8uL downTo 1uL step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(8uL, 5uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..8186a183653 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 10u downTo 1u step 2 step 3) { + uintList += i + } + assertEquals(listOf(10u, 7u, 4u), uintList) + + val ulongList = mutableListOf() + for (i in 10uL downTo 1uL step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(10uL, 7uL, 4uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStep.kt new file mode 100644 index 00000000000..5182789de41 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in (8u downTo 1u).reversed() step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in (8uL downTo 1uL).reversed() step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversed.kt new file mode 100644 index 00000000000..3146aa09dd4 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversed.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in ((8u downTo 1u).reversed() step 2).reversed()) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + val ulongList = mutableListOf() + for (i in ((8uL downTo 1uL).reversed() step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(7uL, 5uL, 3uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt new file mode 100644 index 00000000000..0c5453484cb --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in ((10u downTo 1u).reversed() step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(9u, 6u, 3u), uintList) + + val ulongList = mutableListOf() + for (i in ((10uL downTo 1uL).reversed() step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(9uL, 6uL, 3uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversed.kt new file mode 100644 index 00000000000..e06dbc2ae48 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversed.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in (8u downTo 1u step 2).reversed()) { + uintList += i + } + assertEquals(listOf(2u, 4u, 6u, 8u), uintList) + + val ulongList = mutableListOf() + for (i in (8uL downTo 1uL step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(2uL, 4uL, 6uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStep.kt new file mode 100644 index 00000000000..1dddc926f91 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in (10u downTo 1u step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(2u, 5u, 8u), uintList) + + val ulongList = mutableListOf() + for (i in (10uL downTo 1uL step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(2uL, 5uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt new file mode 100644 index 00000000000..5eba927440f --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in ((10u downTo 1u step 2).reversed() step 3).reversed()) { + uintList += i + } + assertEquals(listOf(8u, 5u, 2u), uintList) + + val ulongList = mutableListOf() + for (i in ((10uL downTo 1uL step 2L).reversed() step 3L).reversed()) { + ulongList += i + } + assertEquals(listOf(8uL, 5uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/singleElementStepTwo.kt new file mode 100644 index 00000000000..8e727483005 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/singleElementStepTwo.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u downTo 1u step 2) { + uintList += i + } + assertEquals(listOf(1u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL downTo 1uL step 2L) { + ulongList += i + } + assertEquals(listOf(1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepNonConst.kt new file mode 100644 index 00000000000..9be7c4be8d4 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepNonConst.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun two() = 2 + +fun box(): String { + val uintList = mutableListOf() + for (i in 8u downTo 1u step two()) { + uintList += i + } + assertEquals(listOf(8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + for (i in 8uL downTo 1uL step two().toLong()) { + ulongList += i + } + assertEquals(listOf(8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepOne.kt new file mode 100644 index 00000000000..d090b52af22 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 4u downTo 1u step 1) { + uintList += i + } + assertEquals(listOf(4u, 3u, 2u, 1u), uintList) + + val ulongList = mutableListOf() + for (i in 4uL downTo 1uL step 1L) { + ulongList += i + } + assertEquals(listOf(4uL, 3uL, 2uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToOutsideRange.kt new file mode 100644 index 00000000000..b2b77493d68 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToOutsideRange.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 7u downTo 1u step 7) { + uintList += i + } + assertEquals(listOf(7u), uintList) + + val ulongList = mutableListOf() + for (i in 7uL downTo 1uL step 7L) { + ulongList += i + } + assertEquals(listOf(7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSameLast.kt new file mode 100644 index 00000000000..89078be53d6 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSameLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 7u downTo 1u step 2) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + val ulongList = mutableListOf() + for (i in 7uL downTo 1uL step 2L) { + ulongList += i + } + assertEquals(listOf(7uL, 5uL, 3uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSmallerLast.kt new file mode 100644 index 00000000000..65b55ae70e8 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSmallerLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 8u downTo 1u step 2) { + uintList += i + } + assertEquals(listOf(8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + for (i in 8uL downTo 1uL step 2L) { + ulongList += i + } + assertEquals(listOf(8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/emptyProgression.kt new file mode 100644 index 00000000000..b39f815a483 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/emptyProgression.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 2u..1u step 2) { + uintList += i + } + assertTrue(uintList.isEmpty()) + + val ulongList = mutableListOf() + for (i in 2uL..1uL step 2L) { + ulongList += i + } + assertTrue(ulongList.isEmpty()) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNegative.kt new file mode 100644 index 00000000000..9d83e6d274e --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNegative.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +// 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 1u..7u step -1) { + } + } + + assertFailsWith { + for (i in 1uL..7uL step -1L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNonConst.kt new file mode 100644 index 00000000000..b783e91d77f --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNonConst.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +// KT-34166: Translation of loop over literal completely removes the validation of step +// DONT_TARGET_EXACT_BACKEND: JS +import kotlin.test.* + +fun zero() = 0 + +fun box(): String { + assertFailsWith { + for (i in 1u..7u step zero()) { + } + } + + assertFailsWith { + for (i in 1uL..7uL step zero().toLong()) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepThenLegalStep.kt new file mode 100644 index 00000000000..5455b1b0b6d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepThenLegalStep.kt @@ -0,0 +1,18 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + for (i in 1u..7u step 0 step 2) { + } + } + + assertFailsWith { + for (i in 1uL..7uL step 0L step 2L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepZero.kt new file mode 100644 index 00000000000..6fa01aeafcb --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepZero.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +// 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 1u..7u step 0) { + } + } + + assertFailsWith { + for (i in 1uL..7uL step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/legalStepThenIllegalStep.kt new file mode 100644 index 00000000000..887bdeaa6f8 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/legalStepThenIllegalStep.kt @@ -0,0 +1,18 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + for (i in 1u..7u step 2 step 0) { + } + } + + assertFailsWith { + for (i in 1uL..7uL step 2L step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/minValueToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/minValueToMaxValueStepMaxValue.kt new file mode 100644 index 00000000000..22b379be03a --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/minValueToMaxValueStepMaxValue.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in UInt.MIN_VALUE..UInt.MAX_VALUE step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(UInt.MIN_VALUE, 2147483647u, UInt.MAX_VALUE - 1u), uintList) + + val ulongList = mutableListOf() + for (i in ULong.MIN_VALUE..ULong.MAX_VALUE step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(ULong.MIN_VALUE, 9223372036854775807uL, ULong.MAX_VALUE - 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/mixedTypeStep.kt new file mode 100644 index 00000000000..ee11002c4fc --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/mixedTypeStep.kt @@ -0,0 +1,14 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1.toUByte()..7.toUByte() step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepOneThenStepOne.kt new file mode 100644 index 00000000000..f53dfd90cc6 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepOneThenStepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..4u step 1 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..4uL step 1L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepThenSameStep.kt new file mode 100644 index 00000000000..e0b411e89a7 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepThenSameStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..8u step 2 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..8uL step 2L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt new file mode 100644 index 00000000000..6b1dc6fbc6b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..5u step 2 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u, 5u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..5uL step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL, 5uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt new file mode 100644 index 00000000000..377f004655d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..7u step 3 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..7uL step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..bb0ae9fae4e --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..10u step 3 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u, 9u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..10uL step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL, 9uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt new file mode 100644 index 00000000000..c5a52dffa17 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..6u step 2 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u, 5u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..6uL step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL, 5uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt new file mode 100644 index 00000000000..ba44ea177bb --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..8u step 2 step 3) { + uintList += i + } + assertEquals(listOf(1u, 4u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..8uL step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(1uL, 4uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..d5d56cd951d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..10u step 2 step 3) { + uintList += i + } + assertEquals(listOf(1u, 4u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..10uL step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(1uL, 4uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/oneToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/oneToMaxValueStepMaxValue.kt new file mode 100644 index 00000000000..05cd6325a82 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/oneToMaxValueStepMaxValue.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..UInt.MAX_VALUE step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(1u, 2147483648u, UInt.MAX_VALUE), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..ULong.MAX_VALUE step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(1uL, 9223372036854775808uL, ULong.MAX_VALUE), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStep.kt new file mode 100644 index 00000000000..45cc15a531c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in (1u..8u).reversed() step 2) { + uintList += i + } + assertEquals(listOf(8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + for (i in (1uL..8uL).reversed() step 2L) { + ulongList += i + } + assertEquals(listOf(8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversed.kt new file mode 100644 index 00000000000..12c7a3860c7 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversed.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in ((1u..8u).reversed() step 2).reversed()) { + uintList += i + } + assertEquals(listOf(2u, 4u, 6u, 8u), uintList) + + val ulongList = mutableListOf() + for (i in ((1uL..8uL).reversed() step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(2uL, 4uL, 6uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt new file mode 100644 index 00000000000..cc00adc71f0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in ((1u..10u).reversed() step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(2u, 5u, 8u), uintList) + + val ulongList = mutableListOf() + for (i in ((1uL..10uL).reversed() step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(2uL, 5uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversed.kt new file mode 100644 index 00000000000..db7f5e60fb0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversed.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in (1u..8u step 2).reversed()) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + val ulongList = mutableListOf() + for (i in (1uL..8uL step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(7uL, 5uL, 3uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStep.kt new file mode 100644 index 00000000000..2473a758efc --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in (1u..10u step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(9u, 6u, 3u), uintList) + + val ulongList = mutableListOf() + for (i in (1uL..10uL step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(9uL, 6uL, 3uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt new file mode 100644 index 00000000000..15a4ed69a95 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in ((1u..10u step 2).reversed() step 3).reversed()) { + uintList += i + } + assertEquals(listOf(3u, 6u, 9u), uintList) + + val ulongList = mutableListOf() + for (i in ((1uL..10uL step 2L).reversed() step 3L).reversed()) { + ulongList += i + } + assertEquals(listOf(3uL, 6uL, 9uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/singleElementStepTwo.kt new file mode 100644 index 00000000000..fde3fea78a8 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/singleElementStepTwo.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..1u step 2) { + uintList += i + } + assertEquals(listOf(1u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..1uL step 2L) { + ulongList += i + } + assertEquals(listOf(1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepNonConst.kt new file mode 100644 index 00000000000..79982cf52c2 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepNonConst.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun two() = 2 + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..8u step two()) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..8uL step two().toLong()) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepOne.kt new file mode 100644 index 00000000000..0710359d743 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..4u step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..4uL step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToOutsideRange.kt new file mode 100644 index 00000000000..89b13aadd9f --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToOutsideRange.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..7u step 7) { + uintList += i + } + assertEquals(listOf(1u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..7uL step 7L) { + ulongList += i + } + assertEquals(listOf(1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSameLast.kt new file mode 100644 index 00000000000..2da3fad18c0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSameLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..7u step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..7uL step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSmallerLast.kt new file mode 100644 index 00000000000..1d476974216 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSmallerLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u..8u step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL..8uL step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/zeroToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/zeroToMaxValueStepMaxValue.kt new file mode 100644 index 00000000000..64736ef6357 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/zeroToMaxValueStepMaxValue.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 0u..UInt.MAX_VALUE step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(0u, 2147483647u, UInt.MAX_VALUE - 1u), uintList) + + val ulongList = mutableListOf() + for (i in 0uL..ULong.MAX_VALUE step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(0uL, 9223372036854775807uL, ULong.MAX_VALUE - 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgression.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgression.kt new file mode 100644 index 00000000000..042afef7456 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgression.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 2u until 2u step 2) { + uintList += i + } + assertTrue(uintList.isEmpty()) + + val ulongList = mutableListOf() + for (i in 2uL until 2uL step 2L) { + ulongList += i + } + assertTrue(ulongList.isEmpty()) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgressionToMinValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgressionToMinValue.kt new file mode 100644 index 00000000000..a73ff83bb51 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgressionToMinValue.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 2u until UInt.MIN_VALUE step 2) { + uintList += i + } + assertTrue(uintList.isEmpty()) + + val ulongList = mutableListOf() + for (i in 2uL until ULong.MIN_VALUE step 2L) { + ulongList += i + } + assertTrue(ulongList.isEmpty()) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNegative.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNegative.kt new file mode 100644 index 00000000000..ad8a6e36a48 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNegative.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +// 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 1u until 8u step -1) { + } + } + + assertFailsWith { + for (i in 1uL until 8uL step -1L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNonConst.kt new file mode 100644 index 00000000000..c25d1994b9b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNonConst.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +// KT-34166: Translation of loop over literal completely removes the validation of step +// DONT_TARGET_EXACT_BACKEND: JS +import kotlin.test.* + +fun zero() = 0 + +fun box(): String { + assertFailsWith { + for (i in 1u until 7u step zero()) { + } + } + + assertFailsWith { + for (i in 1uL until 7uL step zero().toLong()) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepThenLegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepThenLegalStep.kt new file mode 100644 index 00000000000..9f40c02f23d --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepThenLegalStep.kt @@ -0,0 +1,18 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + for (i in 1u until 8u step 0 step 2) { + } + } + + assertFailsWith { + for (i in 1uL until 8uL step 0L step 2L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepZero.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepZero.kt new file mode 100644 index 00000000000..72e65b84396 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepZero.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +// 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 1u until 8u step 0) { + } + } + + assertFailsWith { + for (i in 1uL until 8uL step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/legalStepThenIllegalStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/legalStepThenIllegalStep.kt new file mode 100644 index 00000000000..cf5cc061ad5 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/legalStepThenIllegalStep.kt @@ -0,0 +1,18 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + assertFailsWith { + for (i in 1u until 8u step 2 step 0) { + } + } + + assertFailsWith { + for (i in 1uL until 8uL step 2L step 0L) { + } + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/minValueToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/minValueToMaxValueStepMaxValue.kt new file mode 100644 index 00000000000..63fee4f0f1c --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/minValueToMaxValueStepMaxValue.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in UInt.MIN_VALUE until UInt.MAX_VALUE step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(UInt.MIN_VALUE, 2147483647u, UInt.MAX_VALUE - 1u), uintList) + + val ulongList = mutableListOf() + for (i in ULong.MIN_VALUE until ULong.MAX_VALUE step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(ULong.MIN_VALUE, 9223372036854775807uL, ULong.MAX_VALUE - 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/mixedTypeStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/mixedTypeStep.kt new file mode 100644 index 00000000000..21806217fb0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/mixedTypeStep.kt @@ -0,0 +1,14 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1.toUByte() until 8.toUByte() step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepOneThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepOneThenStepOne.kt new file mode 100644 index 00000000000..f2a2996fa81 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepOneThenStepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 5u step 1 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 5uL step 1L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepThenSameStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepThenSameStep.kt new file mode 100644 index 00000000000..ae922b4e896 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepThenSameStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 9u step 2 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 9uL step 2L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepOne.kt new file mode 100644 index 00000000000..5c6707f525a --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 6u step 2 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u, 5u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 6uL step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL, 5uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt new file mode 100644 index 00000000000..e62f16e4a29 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 8u step 3 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 8uL step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..796ce706cdb --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 11u step 3 step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u, 9u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 11uL step 3L step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL, 9uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt new file mode 100644 index 00000000000..81015e606c8 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 7u step 2 step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u, 5u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 7uL step 2L step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL, 5uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt new file mode 100644 index 00000000000..27bc27d59d8 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 9u step 2 step 3) { + uintList += i + } + assertEquals(listOf(1u, 4u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 9uL step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(1uL, 4uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt new file mode 100644 index 00000000000..218cc844b1b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 11u step 2 step 3) { + uintList += i + } + assertEquals(listOf(1u, 4u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 11uL step 2L step 3L) { + ulongList += i + } + assertEquals(listOf(1uL, 4uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/progressionToNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/progressionToNonConst.kt new file mode 100644 index 00000000000..b718ed6ca74 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/progressionToNonConst.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun nine() = 9 + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until nine().toUInt() step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until nine().toULong() step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStep.kt new file mode 100644 index 00000000000..42188d20878 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in (1u until 9u).reversed() step 2) { + uintList += i + } + assertEquals(listOf(8u, 6u, 4u, 2u), uintList) + + val ulongList = mutableListOf() + for (i in (1uL until 9uL).reversed() step 2L) { + ulongList += i + } + assertEquals(listOf(8uL, 6uL, 4uL, 2uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversed.kt new file mode 100644 index 00000000000..edda45da6c0 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversed.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in ((1u until 9u).reversed() step 2).reversed()) { + uintList += i + } + assertEquals(listOf(2u, 4u, 6u, 8u), uintList) + + val ulongList = mutableListOf() + for (i in ((1uL until 9uL).reversed() step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(2uL, 4uL, 6uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversedThenStep.kt new file mode 100644 index 00000000000..3e5f602344b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversedThenStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in ((1u until 11u).reversed() step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(2u, 5u, 8u), uintList) + + val ulongList = mutableListOf() + for (i in ((1uL until 11uL).reversed() step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(2uL, 5uL, 8uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversed.kt new file mode 100644 index 00000000000..7a57ee8f8fb --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversed.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in (1u until 9u step 2).reversed()) { + uintList += i + } + assertEquals(listOf(7u, 5u, 3u, 1u), uintList) + + val ulongList = mutableListOf() + for (i in (1uL until 9uL step 2L).reversed()) { + ulongList += i + } + assertEquals(listOf(7uL, 5uL, 3uL, 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStep.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStep.kt new file mode 100644 index 00000000000..33186d2c0ad --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStep.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in (1u until 11u step 2).reversed() step 3) { + uintList += i + } + assertEquals(listOf(9u, 6u, 3u), uintList) + + val ulongList = mutableListOf() + for (i in (1uL until 11uL step 2L).reversed() step 3L) { + ulongList += i + } + assertEquals(listOf(9uL, 6uL, 3uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStepThenReversed.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStepThenReversed.kt new file mode 100644 index 00000000000..5094c60c63b --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStepThenReversed.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in ((1u until 11u step 2).reversed() step 3).reversed()) { + uintList += i + } + assertEquals(listOf(3u, 6u, 9u), uintList) + + val ulongList = mutableListOf() + for (i in ((1uL until 11uL step 2L).reversed() step 3L).reversed()) { + ulongList += i + } + assertEquals(listOf(3uL, 6uL, 9uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/singleElementStepTwo.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/singleElementStepTwo.kt new file mode 100644 index 00000000000..d83c3c7a3dc --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/singleElementStepTwo.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 2u step 2) { + uintList += i + } + assertEquals(listOf(1u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 2uL step 2L) { + ulongList += i + } + assertEquals(listOf(1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepNonConst.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepNonConst.kt new file mode 100644 index 00000000000..8f49ec3d62a --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepNonConst.kt @@ -0,0 +1,22 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun two() = 2 + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 9u step two()) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 9uL step two().toLong()) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepOne.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepOne.kt new file mode 100644 index 00000000000..f24ea7b2dc3 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepOne.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 5u step 1) { + uintList += i + } + assertEquals(listOf(1u, 2u, 3u, 4u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 5uL step 1L) { + ulongList += i + } + assertEquals(listOf(1uL, 2uL, 3uL, 4uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToOutsideRange.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToOutsideRange.kt new file mode 100644 index 00000000000..9314f9f29e2 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToOutsideRange.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 8u step 7) { + uintList += i + } + assertEquals(listOf(1u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 8uL step 7L) { + ulongList += i + } + assertEquals(listOf(1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSameLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSameLast.kt new file mode 100644 index 00000000000..88b5633e6eb --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSameLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 8u step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 8uL step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSmallerLast.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSmallerLast.kt new file mode 100644 index 00000000000..f24364b000a --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSmallerLast.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 1u until 9u step 2) { + uintList += i + } + assertEquals(listOf(1u, 3u, 5u, 7u), uintList) + + val ulongList = mutableListOf() + for (i in 1uL until 9uL step 2L) { + ulongList += i + } + assertEquals(listOf(1uL, 3uL, 5uL, 7uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/zeroToMaxValueStepMaxValue.kt b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/zeroToMaxValueStepMaxValue.kt new file mode 100644 index 00000000000..f6d8a91b8e7 --- /dev/null +++ b/compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/zeroToMaxValueStepMaxValue.kt @@ -0,0 +1,20 @@ +// Auto-generated by GenerateSteppedRangesCodegenTestData. Do not edit! +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME +import kotlin.test.* + +fun box(): String { + val uintList = mutableListOf() + for (i in 0u until UInt.MAX_VALUE step Int.MAX_VALUE) { + uintList += i + } + assertEquals(listOf(0u, 2147483647u, UInt.MAX_VALUE - 1u), uintList) + + val ulongList = mutableListOf() + for (i in 0uL until ULong.MAX_VALUE step Long.MAX_VALUE) { + ulongList += i + } + assertEquals(listOf(0uL, 9223372036854775807uL, ULong.MAX_VALUE - 1uL), ulongList) + + return "OK" +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 3441a6d5db4..65af6e070b5 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -24463,6 +24463,1189 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Unsigned extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInUnsigned() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expression extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DownTo extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInDownTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("maxValueToMinValueStepMaxValue.kt") + public void testMaxValueToMinValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToMinValueStepMaxValue.kt"); + } + + @TestMetadata("maxValueToOneStepMaxValue.kt") + public void testMaxValueToOneStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToOneStepMaxValue.kt"); + } + + @TestMetadata("maxValueToZeroStepMaxValue.kt") + public void testMaxValueToZeroStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToZeroStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/mixedTypeStep.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSmallerLast.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RangeTo extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInRangeTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/mixedTypeStep.kt"); + } + + @TestMetadata("oneToMaxValueStepMaxValue.kt") + public void testOneToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/oneToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Until extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInUntil() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgression.kt"); + } + + @TestMetadata("emptyProgressionToMinValue.kt") + public void testEmptyProgressionToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgressionToMinValue.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/mixedTypeStep.kt"); + } + + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/progressionToNonConst.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Literal extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInLiteral() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DownTo extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInDownTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("maxValueToMinValueStepMaxValue.kt") + public void testMaxValueToMinValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToMinValueStepMaxValue.kt"); + } + + @TestMetadata("maxValueToOneStepMaxValue.kt") + public void testMaxValueToOneStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToOneStepMaxValue.kt"); + } + + @TestMetadata("maxValueToZeroStepMaxValue.kt") + public void testMaxValueToZeroStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToZeroStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/mixedTypeStep.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSmallerLast.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RangeTo extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInRangeTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/mixedTypeStep.kt"); + } + + @TestMetadata("oneToMaxValueStepMaxValue.kt") + public void testOneToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/oneToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Until extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInUntil() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgression.kt"); + } + + @TestMetadata("emptyProgressionToMinValue.kt") + public void testEmptyProgressionToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgressionToMinValue.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/mixedTypeStep.kt"); + } + + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/progressionToNonConst.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + } + } } @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 5b9835aeb52..026193ac716 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -22877,6 +22877,1189 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Unsigned extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInUnsigned() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expression extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DownTo extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDownTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("maxValueToMinValueStepMaxValue.kt") + public void testMaxValueToMinValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToMinValueStepMaxValue.kt"); + } + + @TestMetadata("maxValueToOneStepMaxValue.kt") + public void testMaxValueToOneStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToOneStepMaxValue.kt"); + } + + @TestMetadata("maxValueToZeroStepMaxValue.kt") + public void testMaxValueToZeroStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToZeroStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/mixedTypeStep.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSmallerLast.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RangeTo extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInRangeTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/mixedTypeStep.kt"); + } + + @TestMetadata("oneToMaxValueStepMaxValue.kt") + public void testOneToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/oneToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Until extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInUntil() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgression.kt"); + } + + @TestMetadata("emptyProgressionToMinValue.kt") + public void testEmptyProgressionToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgressionToMinValue.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/mixedTypeStep.kt"); + } + + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/progressionToNonConst.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Literal extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInLiteral() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DownTo extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDownTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("maxValueToMinValueStepMaxValue.kt") + public void testMaxValueToMinValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToMinValueStepMaxValue.kt"); + } + + @TestMetadata("maxValueToOneStepMaxValue.kt") + public void testMaxValueToOneStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToOneStepMaxValue.kt"); + } + + @TestMetadata("maxValueToZeroStepMaxValue.kt") + public void testMaxValueToZeroStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToZeroStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/mixedTypeStep.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSmallerLast.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RangeTo extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInRangeTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/mixedTypeStep.kt"); + } + + @TestMetadata("oneToMaxValueStepMaxValue.kt") + public void testOneToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/oneToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Until extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInUntil() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgression.kt"); + } + + @TestMetadata("emptyProgressionToMinValue.kt") + public void testEmptyProgressionToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgressionToMinValue.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/mixedTypeStep.kt"); + } + + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/progressionToNonConst.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + } + } } @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateSteppedRangesCodegenTestData.kt b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateSteppedRangesCodegenTestData.kt index 56f2a92c4e4..b9a7562aa71 100644 --- a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateSteppedRangesCodegenTestData.kt +++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateSteppedRangesCodegenTestData.kt @@ -10,6 +10,7 @@ import java.io.PrintWriter object GenerateSteppedRangesCodegenTestData { private val TEST_DATA_DIR = File("compiler/testData/codegen/box/ranges/stepped") + private val UNSIGNED_TEST_DATA_DIR = File(TEST_DATA_DIR, "unsigned") private val PREAMBLE_MESSAGE = "Auto-generated by ${GenerateSteppedRangesCodegenTestData::class.java.simpleName}. Do not edit!" private val KT_34166_HEADER = """ @@ -17,22 +18,28 @@ object GenerateSteppedRangesCodegenTestData { |// 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' - }, + private enum class Type(val type: String, val isLong: Boolean = false, val isUnsigned: Boolean = false) { + INT("Int"), + LONG("Long", isLong = true), CHAR("Char") { - override fun convertIntValue(i: Int) = "'${'a' - 1 + i}'" + override fun convertIntValue(i: Int, forStep: Boolean) = "'${'a' - 1 + i}'" + }, + UINT("UInt", isUnsigned = true) { + // Step is unsigned for UIntProgression. + override fun convertIntValue(i: Int, forStep: Boolean) = if (forStep) INT.convertValue(i) else "${i}u" + }, + ULONG("ULong", isUnsigned = true, isLong = true) { + // Step is unsigned for ULongProgression. + override fun convertIntValue(i: Int, forStep: Boolean) = if (forStep) LONG.convertValue(i) else "${i}uL" }; - protected abstract fun convertIntValue(i: Int): String - fun convertValue(i: Any) = when (i) { - is Int -> convertIntValue(i) + protected open fun convertIntValue(i: Int, forStep: Boolean): String = + i.toString() + (if (isUnsigned) "u" else "") + (if (isLong) "L" else "") + + fun convertValue(i: Any, forStep: Boolean = false) = when (i) { + is Int -> convertIntValue(i, forStep) // 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.") + else -> i.toString().replace("U?Int\\.".toRegex(), "$type.") } } @@ -80,8 +87,8 @@ object GenerateSteppedRangesCodegenTestData { when (op) { is Step -> { append(" step ").append(op.step) - if (type == Type.LONG) { - append("L") + if (type.isLong) { + append('L') } } is StepExpression -> { @@ -151,16 +158,10 @@ object GenerateSteppedRangesCodegenTestData { fileName: String, typeToBuilderMap: Map, function: Function, - extraCode: String? = null, - subdir: String? = null, + extraCode: String?, + fullSubdir: File, 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) { @@ -187,6 +188,43 @@ object GenerateSteppedRangesCodegenTestData { } } + 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 (unsignedTests, signedTests) = typeToBuilderMap.asSequence().partition { (type, _) -> type.isUnsigned } + if (unsignedTests.isNotEmpty()) { + generateTestsForFunction( + fileName, + unsignedTests.associate { it.toPair() }, + function, + extraCode, + File(UNSIGNED_TEST_DATA_DIR, fullSubdirPath.toString()), + asLiteral + ) + } + if (signedTests.isNotEmpty()) { + generateTestsForFunction( + fileName, + signedTests.associate { it.toPair() }, + function, + extraCode, + File(TEST_DATA_DIR, fullSubdirPath.toString()), + asLiteral + ) + } + } + private fun PrintWriter.printTestForFunctionAndType(builder: TestBuilder, function: Function, type: Type, asLiteral: Boolean) { val shouldFail = (builder.expectedValuesOrFailIfNull == null) val listVarName = type.type.toLowerCase() + "List" @@ -231,17 +269,6 @@ object GenerateSteppedRangesCodegenTestData { 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)) @@ -390,7 +417,9 @@ object GenerateSteppedRangesCodegenTestData { 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'") + Type.CHAR to TestBuilder("'a'" to "('a' - 1 + nine())").step(2).expectValues("'a'", "'c'", "'e'", "'g'"), + Type.UINT to TestBuilder(1 to "nine().toUInt()").step(2).expectValues(1, 3, 5, 7), + Type.ULONG to TestBuilder(1 to "nine().toULong()").step(2).expectValues(1, 3, 5, 7) ), Function.UNTIL, extraCode = "fun nine() = 9" @@ -400,10 +429,12 @@ object GenerateSteppedRangesCodegenTestData { "illegalStepNonConst.kt", TestBuilder(1 to 7).step("zero()").shouldFail().let { mapOf( + // Argument for (U)LongProgression.step() must be a Long 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 + Type.CHAR to it, + Type.UINT to it, + Type.ULONG to TestBuilder(1 to 7).step("zero().toLong()").shouldFail() ) }, function, @@ -414,10 +445,12 @@ object GenerateSteppedRangesCodegenTestData { "illegalStepNonConst.kt", TestBuilder(7 to 1).step("zero()").shouldFail().let { mapOf( + // Argument for (U)LongProgression.step() must be a Long 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 + Type.CHAR to it, + Type.UINT to it, + Type.ULONG to TestBuilder(7 to 1).step("zero().toLong()").shouldFail(), ) }, Function.DOWN_TO, @@ -427,10 +460,12 @@ object GenerateSteppedRangesCodegenTestData { "stepNonConst.kt", TestBuilder(1 to 8).step("two()").expectValues(1, 3, 5, 7).let { mapOf( + // Argument for (U)LongProgression.step() must be a Long 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 + Type.CHAR to it, + Type.UINT to it, + Type.ULONG to TestBuilder(1 to 8).step("two().toLong()").expectValues(1, 3, 5, 7), ) }, Function.RANGE_TO, @@ -440,10 +475,12 @@ object GenerateSteppedRangesCodegenTestData { "stepNonConst.kt", TestBuilder(1 to 9).step("two()").expectValues(1, 3, 5, 7).let { mapOf( + // Argument for (U)LongProgression.step() must be a Long 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 + Type.CHAR to it, + Type.UINT to it, + Type.ULONG to TestBuilder(1 to 9).step("two().toLong()").expectValues(1, 3, 5, 7), ) }, Function.UNTIL, @@ -453,10 +490,12 @@ object GenerateSteppedRangesCodegenTestData { "stepNonConst.kt", TestBuilder(8 to 1).step("two()").expectValues(8, 6, 4, 2).let { mapOf( + // Argument for (U)LongProgression.step() must be a Long 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 + Type.CHAR to it, + Type.UINT to it, + Type.ULONG to TestBuilder(8 to 1).step("two().toLong()").expectValues(8, 6, 4, 2) ) }, Function.DOWN_TO, @@ -466,7 +505,8 @@ object GenerateSteppedRangesCodegenTestData { "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) + Type.LONG to TestBuilder("1L" to "7").step("2").expectValues(1, 3, 5, 7), + Type.UINT to TestBuilder("1.toUByte()" to "7.toUByte()").step(2).expectValues(1, 3, 5, 7), ), Function.RANGE_TO ) @@ -474,7 +514,8 @@ object GenerateSteppedRangesCodegenTestData { "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) + Type.LONG to TestBuilder("1L" to "8").step("2").expectValues(1, 3, 5, 7), + Type.UINT to TestBuilder("1.toUByte()" to "8.toUByte()").step(2).expectValues(1, 3, 5, 7), ), Function.UNTIL ) @@ -482,7 +523,8 @@ object GenerateSteppedRangesCodegenTestData { "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) + Type.LONG to TestBuilder("7" to "1L").step("2").expectValues(7, 5, 3, 1), + Type.UINT to TestBuilder("7.toUByte()" to "1.toUByte()").step(2).expectValues(7, 5, 3, 1), ), Function.DOWN_TO ) @@ -501,7 +543,17 @@ object GenerateSteppedRangesCodegenTestData { ), Type.CHAR to TestBuilder( "Char.MIN_VALUE" to "Char.MAX_VALUE" - ).step("Char.MAX_VALUE.toInt()").expectValues("Char.MIN_VALUE", "Char.MAX_VALUE") + ).step("Char.MAX_VALUE.toInt()").expectValues("Char.MIN_VALUE", "Char.MAX_VALUE"), + Type.UINT to TestBuilder("UInt.MIN_VALUE" to "UInt.MAX_VALUE").step("Int.MAX_VALUE").expectValues( + "UInt.MIN_VALUE", + "2147483647u", + "UInt.MAX_VALUE - 1u" + ), + Type.ULONG to TestBuilder("ULong.MIN_VALUE" to "ULong.MAX_VALUE").step("Long.MAX_VALUE").expectValues( + "ULong.MIN_VALUE", + "9223372036854775807uL", + "ULong.MAX_VALUE - 1uL" + ) ), Function.RANGE_TO ) @@ -517,6 +569,16 @@ object GenerateSteppedRangesCodegenTestData { "Long.MIN_VALUE", -1, "Long.MAX_VALUE - 1" + ), + Type.UINT to TestBuilder("UInt.MIN_VALUE" to "UInt.MAX_VALUE").step("Int.MAX_VALUE").expectValues( + "UInt.MIN_VALUE", + "2147483647u", + "UInt.MAX_VALUE - 1u" + ), + Type.ULONG to TestBuilder("ULong.MIN_VALUE" to "ULong.MAX_VALUE").step("Long.MAX_VALUE").expectValues( + "ULong.MIN_VALUE", + "9223372036854775807uL", + "ULong.MAX_VALUE - 1uL" ) ), Function.UNTIL @@ -526,7 +588,15 @@ object GenerateSteppedRangesCodegenTestData { 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()") + Type.CHAR to TestBuilder("1.toChar()" to "Char.MAX_VALUE").step("Char.MAX_VALUE.toInt()").expectValues("1.toChar()"), + Type.UINT to TestBuilder(1 to "UInt.MAX_VALUE").step("Int.MAX_VALUE").expectValues( + 1, "2147483648u", + "UInt.MAX_VALUE" + ), + Type.ULONG to TestBuilder(1 to "ULong.MAX_VALUE").step("Long.MAX_VALUE").expectValues( + 1, "9223372036854775808uL", + "ULong.MAX_VALUE" + ), ), Function.RANGE_TO ) @@ -538,7 +608,10 @@ object GenerateSteppedRangesCodegenTestData { Type.CHAR to TestBuilder("0.toChar()" to "Char.MAX_VALUE").step("Char.MAX_VALUE.toInt()").expectValues( "0.toChar()", "Char.MAX_VALUE" - ) + ), + Type.UINT to TestBuilder(0 to "UInt.MAX_VALUE").step("Int.MAX_VALUE").expectValues(0, "2147483647u", "UInt.MAX_VALUE - 1u"), + Type.ULONG to TestBuilder(0 to "ULong.MAX_VALUE").step("Long.MAX_VALUE") + .expectValues(0, "9223372036854775807uL", "ULong.MAX_VALUE - 1uL") ), Function.RANGE_TO ) @@ -547,7 +620,10 @@ object GenerateSteppedRangesCodegenTestData { 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()") + Type.CHAR to TestBuilder("0.toChar()" to "Char.MAX_VALUE").step("Char.MAX_VALUE.toInt()").expectValues("0.toChar()"), + Type.UINT to TestBuilder(0 to "UInt.MAX_VALUE").step("Int.MAX_VALUE").expectValues(0, "2147483647u", "UInt.MAX_VALUE - 1u"), + Type.ULONG to TestBuilder(0 to "ULong.MAX_VALUE").step("Long.MAX_VALUE") + .expectValues(0, "9223372036854775807uL", "ULong.MAX_VALUE - 1uL") ), Function.UNTIL ) @@ -567,6 +643,16 @@ object GenerateSteppedRangesCodegenTestData { Type.CHAR to TestBuilder("Char.MAX_VALUE" to "Char.MIN_VALUE").step("Char.MAX_VALUE.toInt()").expectValues( "Char.MAX_VALUE", "Char.MIN_VALUE" + ), + Type.UINT to TestBuilder("UInt.MAX_VALUE" to "UInt.MIN_VALUE").step("Int.MAX_VALUE").expectValues( + "UInt.MAX_VALUE", + "2147483648u", + 1 + ), + Type.ULONG to TestBuilder("ULong.MAX_VALUE" to "ULong.MIN_VALUE").step("Long.MAX_VALUE").expectValues( + "ULong.MAX_VALUE", + "9223372036854775808uL", + 1 ) ), Function.DOWN_TO @@ -576,7 +662,10 @@ object GenerateSteppedRangesCodegenTestData { 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") + Type.CHAR to TestBuilder("Char.MAX_VALUE" to "1.toChar()").step("Char.MAX_VALUE.toInt()").expectValues("Char.MAX_VALUE"), + Type.UINT to TestBuilder("UInt.MAX_VALUE" to 1).step("Int.MAX_VALUE").expectValues("UInt.MAX_VALUE", "2147483648u", 1), + Type.ULONG to TestBuilder("ULong.MAX_VALUE" to 1).step("Long.MAX_VALUE") + .expectValues("ULong.MAX_VALUE", "9223372036854775808uL", 1), ), Function.DOWN_TO ) @@ -588,7 +677,11 @@ object GenerateSteppedRangesCodegenTestData { Type.CHAR to TestBuilder("Char.MAX_VALUE" to "0.toChar()").step("Char.MAX_VALUE.toInt()").expectValues( "Char.MAX_VALUE", "0.toChar()" - ) + ), + Type.UINT to TestBuilder("UInt.MAX_VALUE" to 0).step("Int.MAX_VALUE") + .expectValues("UInt.MAX_VALUE", "2147483648u", 1), + Type.ULONG to TestBuilder("ULong.MAX_VALUE" to 0).step("Long.MAX_VALUE") + .expectValues("ULong.MAX_VALUE", "9223372036854775808uL", 1) ), Function.DOWN_TO ) 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 fb366e8f6bd..c3159028832 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 @@ -19278,6 +19278,1189 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Unsigned extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInUnsigned() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expression extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DownTo extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInDownTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("maxValueToMinValueStepMaxValue.kt") + public void testMaxValueToMinValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToMinValueStepMaxValue.kt"); + } + + @TestMetadata("maxValueToOneStepMaxValue.kt") + public void testMaxValueToOneStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToOneStepMaxValue.kt"); + } + + @TestMetadata("maxValueToZeroStepMaxValue.kt") + public void testMaxValueToZeroStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToZeroStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/mixedTypeStep.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSmallerLast.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RangeTo extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInRangeTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/mixedTypeStep.kt"); + } + + @TestMetadata("oneToMaxValueStepMaxValue.kt") + public void testOneToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/oneToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Until extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInUntil() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgression.kt"); + } + + @TestMetadata("emptyProgressionToMinValue.kt") + public void testEmptyProgressionToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgressionToMinValue.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/mixedTypeStep.kt"); + } + + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/progressionToNonConst.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Literal extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInLiteral() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DownTo extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInDownTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("maxValueToMinValueStepMaxValue.kt") + public void testMaxValueToMinValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToMinValueStepMaxValue.kt"); + } + + @TestMetadata("maxValueToOneStepMaxValue.kt") + public void testMaxValueToOneStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToOneStepMaxValue.kt"); + } + + @TestMetadata("maxValueToZeroStepMaxValue.kt") + public void testMaxValueToZeroStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToZeroStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/mixedTypeStep.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSmallerLast.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RangeTo extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInRangeTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/mixedTypeStep.kt"); + } + + @TestMetadata("oneToMaxValueStepMaxValue.kt") + public void testOneToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/oneToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Until extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInUntil() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgression.kt"); + } + + @TestMetadata("emptyProgressionToMinValue.kt") + public void testEmptyProgressionToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgressionToMinValue.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/mixedTypeStep.kt"); + } + + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/progressionToNonConst.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + } + } } @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") 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 5a923ba16b3..71ecbb85ab7 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 @@ -19338,6 +19338,1144 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Unsigned extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInUnsigned() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expression extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DownTo extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInDownTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("maxValueToMinValueStepMaxValue.kt") + public void testMaxValueToMinValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToMinValueStepMaxValue.kt"); + } + + @TestMetadata("maxValueToOneStepMaxValue.kt") + public void testMaxValueToOneStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToOneStepMaxValue.kt"); + } + + @TestMetadata("maxValueToZeroStepMaxValue.kt") + public void testMaxValueToZeroStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/maxValueToZeroStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/mixedTypeStep.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/stepToSmallerLast.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RangeTo extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInRangeTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/mixedTypeStep.kt"); + } + + @TestMetadata("oneToMaxValueStepMaxValue.kt") + public void testOneToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/oneToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Until extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInUntil() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgression.kt"); + } + + @TestMetadata("emptyProgressionToMinValue.kt") + public void testEmptyProgressionToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/emptyProgressionToMinValue.kt"); + } + + @TestMetadata("illegalStepNegative.kt") + public void testIllegalStepNegative() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNegative.kt"); + } + + @TestMetadata("illegalStepNonConst.kt") + public void testIllegalStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepNonConst.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("illegalStepZero.kt") + public void testIllegalStepZero() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/illegalStepZero.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/mixedTypeStep.kt"); + } + + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/progressionToNonConst.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Literal extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInLiteral() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DownTo extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInDownTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("maxValueToMinValueStepMaxValue.kt") + public void testMaxValueToMinValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToMinValueStepMaxValue.kt"); + } + + @TestMetadata("maxValueToOneStepMaxValue.kt") + public void testMaxValueToOneStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToOneStepMaxValue.kt"); + } + + @TestMetadata("maxValueToZeroStepMaxValue.kt") + public void testMaxValueToZeroStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/maxValueToZeroStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/mixedTypeStep.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/stepToSmallerLast.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RangeTo extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInRangeTo() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/emptyProgression.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/mixedTypeStep.kt"); + } + + @TestMetadata("oneToMaxValueStepMaxValue.kt") + public void testOneToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/oneToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Until extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInUntil() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("emptyProgression.kt") + public void testEmptyProgression() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgression.kt"); + } + + @TestMetadata("emptyProgressionToMinValue.kt") + public void testEmptyProgressionToMinValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/emptyProgressionToMinValue.kt"); + } + + @TestMetadata("illegalStepThenLegalStep.kt") + public void testIllegalStepThenLegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/illegalStepThenLegalStep.kt"); + } + + @TestMetadata("legalStepThenIllegalStep.kt") + public void testLegalStepThenIllegalStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/legalStepThenIllegalStep.kt"); + } + + @TestMetadata("minValueToMaxValueStepMaxValue.kt") + public void testMinValueToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/minValueToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("mixedTypeStep.kt") + public void testMixedTypeStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/mixedTypeStep.kt"); + } + + @TestMetadata("progressionToNonConst.kt") + public void testProgressionToNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/progressionToNonConst.kt"); + } + + @TestMetadata("singleElementStepTwo.kt") + public void testSingleElementStepTwo() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/singleElementStepTwo.kt"); + } + + @TestMetadata("stepNonConst.kt") + public void testStepNonConst() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepNonConst.kt"); + } + + @TestMetadata("stepOne.kt") + public void testStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepOne.kt"); + } + + @TestMetadata("stepToOutsideRange.kt") + public void testStepToOutsideRange() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToOutsideRange.kt"); + } + + @TestMetadata("stepToSameLast.kt") + public void testStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLast.kt") + public void testStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/stepToSmallerLast.kt"); + } + + @TestMetadata("zeroToMaxValueStepMaxValue.kt") + public void testZeroToMaxValueStepMaxValue() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/zeroToMaxValueStepMaxValue.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedStep extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInNestedStep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("stepOneThenStepOne.kt") + public void testStepOneThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepOneThenStepOne.kt"); + } + + @TestMetadata("stepThenSameStep.kt") + public void testStepThenSameStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepThenSameStep.kt"); + } + + @TestMetadata("stepToSameLastThenStepOne.kt") + public void testStepToSameLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepOne.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSameLast.kt") + public void testStepToSameLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSameLastThenStepToSmallerLast.kt") + public void testStepToSameLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSameLastThenStepToSmallerLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepOne.kt") + public void testStepToSmallerLastThenStepOne() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepOne.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSameLast.kt") + public void testStepToSmallerLastThenStepToSameLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSameLast.kt"); + } + + @TestMetadata("stepToSmallerLastThenStepToSmallerLast.kt") + public void testStepToSmallerLastThenStepToSmallerLast() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep/stepToSmallerLastThenStepToSmallerLast.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reversed extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInReversed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("reversedThenStep.kt") + public void testReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStep.kt"); + } + + @TestMetadata("reversedThenStepThenReversed.kt") + public void testReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversed.kt"); + } + + @TestMetadata("reversedThenStepThenReversedThenStep.kt") + public void testReversedThenStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/reversedThenStepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversed.kt") + public void testStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversed.kt"); + } + + @TestMetadata("stepThenReversedThenStep.kt") + public void testStepThenReversedThenStep() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStep.kt"); + } + + @TestMetadata("stepThenReversedThenStepThenReversed.kt") + public void testStepThenReversedThenStepThenReversed() throws Exception { + runTest("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed/stepThenReversedThenStepThenReversed.kt"); + } + } + } + } + } } @TestMetadata("compiler/testData/codegen/box/ranges/unsigned")