Generate proper exception table

Don't forget to split nested try blocks without finally block
 on generating finally blocks from outer ones.

 #KT-31923 InProgress
This commit is contained in:
Mikhael Bogdanov
2019-06-11 11:29:52 +02:00
parent 078cfc02a5
commit c335015c05
20 changed files with 752 additions and 65 deletions
@@ -11239,11 +11239,41 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/finally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("breakAndOuterFinally.kt")
public void testBreakAndOuterFinally() throws Exception {
runTest("compiler/testData/codegen/box/finally/breakAndOuterFinally.kt");
}
@TestMetadata("continueAndOuterFinally.kt")
public void testContinueAndOuterFinally() throws Exception {
runTest("compiler/testData/codegen/box/finally/continueAndOuterFinally.kt");
}
@TestMetadata("finallyAndFinally.kt")
public void testFinallyAndFinally() throws Exception {
runTest("compiler/testData/codegen/box/finally/finallyAndFinally.kt");
}
@TestMetadata("kt31923_break.kt")
public void testKt31923_break() throws Exception {
runTest("compiler/testData/codegen/box/finally/kt31923_break.kt");
}
@TestMetadata("kt31923_continue.kt")
public void testKt31923_continue() throws Exception {
runTest("compiler/testData/codegen/box/finally/kt31923_continue.kt");
}
@TestMetadata("kt31923_return.kt")
public void testKt31923_return() throws Exception {
runTest("compiler/testData/codegen/box/finally/kt31923_return.kt");
}
@TestMetadata("kt31923_wrong.kt")
public void testKt31923_wrong() throws Exception {
runTest("compiler/testData/codegen/box/finally/kt31923_wrong.kt");
}
@TestMetadata("kt3549.kt")
public void testKt3549() throws Exception {
runTest("compiler/testData/codegen/box/finally/kt3549.kt");
@@ -11279,6 +11309,26 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/finally/loopAndFinally.kt");
}
@TestMetadata("nestedFinallyAndNonFinallyTry.kt")
public void testNestedFinallyAndNonFinallyTry() throws Exception {
runTest("compiler/testData/codegen/box/finally/nestedFinallyAndNonFinallyTry.kt");
}
@TestMetadata("nestedFinallyAndNonFinallyTry2.kt")
public void testNestedFinallyAndNonFinallyTry2() throws Exception {
runTest("compiler/testData/codegen/box/finally/nestedFinallyAndNonFinallyTry2.kt");
}
@TestMetadata("nestedFinallyAndNonFinallyTry3.kt")
public void testNestedFinallyAndNonFinallyTry3() throws Exception {
runTest("compiler/testData/codegen/box/finally/nestedFinallyAndNonFinallyTry3.kt");
}
@TestMetadata("nestedFinallyAndNonFinallyTry4.kt")
public void testNestedFinallyAndNonFinallyTry4() throws Exception {
runTest("compiler/testData/codegen/box/finally/nestedFinallyAndNonFinallyTry4.kt");
}
@TestMetadata("notChainCatch.kt")
public void testNotChainCatch() throws Exception {
runTest("compiler/testData/codegen/box/finally/notChainCatch.kt");