Add more tests for constructor call evaluation order

- break in arguments
- continue in arguments
- early return in arguments
- non-local return in arguments
- nested constructor call in arguments
This commit is contained in:
Dmitry Petrov
2017-10-03 15:42:12 +03:00
parent c3d74bdabb
commit 7e808bd3ea
9 changed files with 343 additions and 0 deletions
@@ -4283,6 +4283,24 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/constructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("breakInConstructorArguments.kt")
public void testBreakInConstructorArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/breakInConstructorArguments.kt");
doTest(fileName);
}
@TestMetadata("continueInConstructorArguments.kt")
public void testContinueInConstructorArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/continueInConstructorArguments.kt");
doTest(fileName);
}
@TestMetadata("earlyReturnInConstructorArguments.kt")
public void testEarlyReturnInConstructorArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/earlyReturnInConstructorArguments.kt");
doTest(fileName);
}
@TestMetadata("inlineFunInConstructorCallEvaluationOrder.kt")
public void testInlineFunInConstructorCallEvaluationOrder() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallEvaluationOrder.kt");
@@ -4301,6 +4319,24 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("nestedConstructorCallWithJumpOutInConstructorArguments.kt")
public void testNestedConstructorCallWithJumpOutInConstructorArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/nestedConstructorCallWithJumpOutInConstructorArguments.kt");
doTest(fileName);
}
@TestMetadata("nonLocalReturnInConstructorArguments.kt")
public void testNonLocalReturnInConstructorArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/nonLocalReturnInConstructorArguments.kt");
doTest(fileName);
}
@TestMetadata("possiblyPoppedUnitializedValueInArguments.kt")
public void testPossiblyPoppedUnitializedValueInArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/possiblyPoppedUnitializedValueInArguments.kt");
doTest(fileName);
}
@TestMetadata("regularConstructorCallEvaluationOrder.kt")
public void testRegularConstructorCallEvaluationOrder() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/regularConstructorCallEvaluationOrder.kt");
@@ -4283,6 +4283,24 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/constructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("breakInConstructorArguments.kt")
public void testBreakInConstructorArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/breakInConstructorArguments.kt");
doTest(fileName);
}
@TestMetadata("continueInConstructorArguments.kt")
public void testContinueInConstructorArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/continueInConstructorArguments.kt");
doTest(fileName);
}
@TestMetadata("earlyReturnInConstructorArguments.kt")
public void testEarlyReturnInConstructorArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/earlyReturnInConstructorArguments.kt");
doTest(fileName);
}
@TestMetadata("inlineFunInConstructorCallEvaluationOrder.kt")
public void testInlineFunInConstructorCallEvaluationOrder() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallEvaluationOrder.kt");
@@ -4301,6 +4319,24 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
doTest(fileName);
}
@TestMetadata("nestedConstructorCallWithJumpOutInConstructorArguments.kt")
public void testNestedConstructorCallWithJumpOutInConstructorArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/nestedConstructorCallWithJumpOutInConstructorArguments.kt");
doTest(fileName);
}
@TestMetadata("nonLocalReturnInConstructorArguments.kt")
public void testNonLocalReturnInConstructorArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/nonLocalReturnInConstructorArguments.kt");
doTest(fileName);
}
@TestMetadata("possiblyPoppedUnitializedValueInArguments.kt")
public void testPossiblyPoppedUnitializedValueInArguments() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/possiblyPoppedUnitializedValueInArguments.kt");
doTest(fileName);
}
@TestMetadata("regularConstructorCallEvaluationOrder.kt")
public void testRegularConstructorCallEvaluationOrder() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/regularConstructorCallEvaluationOrder.kt");