Support const-bound counter loop generation for 'downTo'

This commit is contained in:
Dmitry Petrov
2017-12-12 13:47:17 +03:00
parent 2f0df832c0
commit 5f7460a8c7
14 changed files with 213 additions and 10 deletions
@@ -16519,6 +16519,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
doTest(fileName);
}
@TestMetadata("forIntInDownToWithNonConstBounds.kt")
public void testForIntInDownToWithNonConstBounds() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt");
doTest(fileName);
}
@TestMetadata("forIntInNonOptimizedDownTo.kt")
public void testForIntInNonOptimizedDownTo() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt");
@@ -16795,6 +16801,24 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forWithPossibleOverflow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
}
@TestMetadata("forInDownToCharMinValue.kt")
public void testForInDownToCharMinValue() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValue.kt");
doTest(fileName);
}
@TestMetadata("forInDownToIntMinValue.kt")
public void testForInDownToIntMinValue() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValue.kt");
doTest(fileName);
}
@TestMetadata("forInDownToLongMinValue.kt")
public void testForInDownToLongMinValue() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValue.kt");
doTest(fileName);
}
@TestMetadata("forInRangeToCharMaxValue.kt")
public void testForInRangeToCharMaxValue() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValue.kt");