Handle withIndex() on Iterables (including progressions) and Sequences
in ForLoopsLowering.
This commit is contained in:
committed by
max-kammerer
parent
a54d9482dd
commit
7adffe0007
+78
@@ -20265,6 +20265,84 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/ranges/forInProgressionWithIndex")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ForInProgressionWithIndex extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInForInProgressionWithIndex() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInProgressionWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("forInDownToWithIndex.kt")
|
||||
public void testForInDownToWithIndex() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInDownToWithIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInIndicesWithIndex.kt")
|
||||
public void testForInIndicesWithIndex() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInIndicesWithIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInRangeToWithIndex.kt")
|
||||
public void testForInRangeToWithIndex() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInRangeToWithIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInReversedStepWithIndex.kt")
|
||||
public void testForInReversedStepWithIndex() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInReversedStepWithIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInReversedWithIndex.kt")
|
||||
public void testForInReversedWithIndex() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInReversedWithIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInStepReversedWithIndex.kt")
|
||||
public void testForInStepReversedWithIndex() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInStepReversedWithIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInStepWithIndex.kt")
|
||||
public void testForInStepWithIndex() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInStepWithIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInUntilWithIndex.kt")
|
||||
public void testForInUntilWithIndex() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInUntilWithIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInWithIndexNoIndexOrElementVar.kt")
|
||||
public void testForInWithIndexNoIndexOrElementVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInWithIndexNoIndexOrElementVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInWithIndexNotDestructured.kt")
|
||||
public void testForInWithIndexNotDestructured() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInWithIndexNotDestructured.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInWithIndexReversed.kt")
|
||||
public void testForInWithIndexReversed() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInWithIndexReversed.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInWithIndexWithDestructuringInLoop.kt")
|
||||
public void testForInWithIndexWithDestructuringInLoop() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInWithIndexWithDestructuringInLoop.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInWithIndexWithIndex.kt")
|
||||
public void testForInWithIndexWithIndex() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/forInProgressionWithIndex/forInWithIndexWithIndex.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/ranges/forInReversed")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user