Add more tests for for-in-array

#KT-21354 Fixed Target versions 1.2.20
 #KT-21321 Fixed Target versions 1.2.20
This commit is contained in:
Dmitry Petrov
2017-12-05 12:55:53 +03:00
parent e4ecc13e13
commit 3d473f608e
15 changed files with 294 additions and 150 deletions
@@ -5243,12 +5243,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
doTest(fileName);
}
@TestMetadata("forIntArray.kt")
public void testForIntArray() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forIntArray.kt");
doTest(fileName);
}
@TestMetadata("forLoopMemberExtensionAll.kt")
public void testForLoopMemberExtensionAll() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionAll.kt");
@@ -5273,18 +5267,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
@TestMetadata("forNullableIntArray.kt")
public void testForNullableIntArray() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forNullableIntArray.kt");
doTest(fileName);
}
@TestMetadata("forPrimitiveIntArray.kt")
public void testForPrimitiveIntArray() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forPrimitiveIntArray.kt");
doTest(fileName);
}
@TestMetadata("forUserType.kt")
public void testForUserType() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forUserType.kt");
@@ -5714,6 +5696,69 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/controlStructures/forInArray")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ForInArray extends AbstractJsCodegenBoxTest {
public void testAllFilesPresentInForInArray() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArray"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
}
@TestMetadata("forInArrayWithArrayPropertyUpdatedInLoopBody.kt")
public void testForInArrayWithArrayPropertyUpdatedInLoopBody() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt");
doTest(fileName);
}
@TestMetadata("forInArrayWithArrayVarUpdatedInLoopBody12.kt")
public void testForInArrayWithArrayVarUpdatedInLoopBody12() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.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("forInArrayWithArrayVarUpdatedInLoopBody13.kt")
public void testForInArrayWithArrayVarUpdatedInLoopBody13() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt");
doTest(fileName);
}
@TestMetadata("forInDelegatedPropertyUpdatedInLoopBody.kt")
public void testForInDelegatedPropertyUpdatedInLoopBody() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt");
doTest(fileName);
}
@TestMetadata("forInFieldUpdatedInLoopBody.kt")
public void testForInFieldUpdatedInLoopBody() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt");
doTest(fileName);
}
@TestMetadata("forIntArray.kt")
public void testForIntArray() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt");
doTest(fileName);
}
@TestMetadata("forNullableIntArray.kt")
public void testForNullableIntArray() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt");
doTest(fileName);
}
@TestMetadata("forPrimitiveIntArray.kt")
public void testForPrimitiveIntArray() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -15821,30 +15866,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
doTest(fileName);
}
@TestMetadata("forInArrayWithArrayPropertyUpdatedInLoopBody.kt")
public void testForInArrayWithArrayPropertyUpdatedInLoopBody() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInArrayWithArrayPropertyUpdatedInLoopBody.kt");
doTest(fileName);
}
@TestMetadata("forInArrayWithArrayVarUpdatedInLoopBody12.kt")
public void testForInArrayWithArrayVarUpdatedInLoopBody12() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInArrayWithArrayVarUpdatedInLoopBody12.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("forInArrayWithArrayVarUpdatedInLoopBody13.kt")
public void testForInArrayWithArrayVarUpdatedInLoopBody13() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInArrayWithArrayVarUpdatedInLoopBody13.kt");
doTest(fileName);
}
@TestMetadata("forInRangeLiteralWithMixedTypeBounds.kt")
public void testForInRangeLiteralWithMixedTypeBounds() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInRangeLiteralWithMixedTypeBounds.kt");