JS: coroutines: fix translation of try/finally block without catch

This commit is contained in:
Alexey Andreev
2016-11-09 17:39:44 +03:00
parent 0015f7518e
commit 2d315c3df8
5 changed files with 150 additions and 18 deletions
@@ -4716,14 +4716,8 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ControlFlow extends AbstractBlackBoxCodegenTest {
@TestMetadata("returnFromFinally.kt")
public void ignoredReturnFromFinally() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt");
doTest(fileName);
}
public void testAllFilesPresentInControlFlow() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/controlFlow"), Pattern.compile("^(.+)\\.kt$"), true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/controlFlow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("breakFinally.kt")
@@ -4756,6 +4750,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("throwFromCatch.kt")
public void testThrowFromCatch() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt");
doTest(fileName);
}
@TestMetadata("whileStatement.kt")
public void testWhileStatement() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt");
@@ -4837,7 +4837,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class MultiModule extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInMultiModule() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/multiModule"), Pattern.compile("^(.+)\\.kt$"), true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/multiModule"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("simple.kt")