Fix loop over a range literal up to MAX_VALUE
#KT-492 In Progress For Byte, Char and Short explicit casting from Int is removed -- loop parameter is already stored in an Int anyway. For Int and Long comparison "i < end" at the beginning of the loop is replaced to "i != end" at the end of the loop + a special check for an empty loop
This commit is contained in:
+30
@@ -439,6 +439,21 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/ranges/expression/infiniteSteps.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("maxValueMinusTwoToMaxValue.kt")
|
||||
public void testMaxValueMinusTwoToMaxValue() throws Exception {
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/ranges/expression/maxValueMinusTwoToMaxValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("maxValueToMaxValue.kt")
|
||||
public void testMaxValueToMaxValue() throws Exception {
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/ranges/expression/maxValueToMaxValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("maxValueToMinValue.kt")
|
||||
public void testMaxValueToMinValue() throws Exception {
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/ranges/expression/maxValueToMinValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nanEnds.kt")
|
||||
public void testNanEnds() throws Exception {
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/ranges/expression/nanEnds.kt");
|
||||
@@ -542,6 +557,21 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/ranges/literal/infiniteSteps.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("maxValueMinusTwoToMaxValue.kt")
|
||||
public void testMaxValueMinusTwoToMaxValue() throws Exception {
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/ranges/literal/maxValueMinusTwoToMaxValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("maxValueToMaxValue.kt")
|
||||
public void testMaxValueToMaxValue() throws Exception {
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/ranges/literal/maxValueToMaxValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("maxValueToMinValue.kt")
|
||||
public void testMaxValueToMinValue() throws Exception {
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/ranges/literal/maxValueToMinValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nanEnds.kt")
|
||||
public void testNanEnds() throws Exception {
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/ranges/literal/nanEnds.kt");
|
||||
|
||||
Reference in New Issue
Block a user