Add test for array modification within for-in-array-withIndex loop body

This commit is contained in:
Dmitry Petrov
2018-01-22 11:07:28 +03:00
parent 40d1925e19
commit 72ffbb9825
5 changed files with 60 additions and 0 deletions
@@ -5768,6 +5768,18 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
}
@TestMetadata("forInArrayWithIndexContinuesAsUnmodified.kt")
public void testForInArrayWithIndexContinuesAsUnmodified() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt");
try {
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
@TestMetadata("forInArrrayWithIndexNoElementVar.kt")
public void testForInArrrayWithIndexNoElementVar() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt");