JVM_IR KT-49765 bridge for throwing stub should just throw UOE

This commit is contained in:
Dmitry Petrov
2021-12-15 19:10:47 +03:00
committed by teamcity
parent 3f22321643
commit 8c71e38c92
17 changed files with 560 additions and 13 deletions
@@ -1723,6 +1723,16 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/builtinStubMethods/customReadOnlyIterator.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods/bridgesForStubs")
@TestDataPath("$PROJECT_ROOT")
public class BridgesForStubs {
@Test
public void testAllFilesPresentInBridgesForStubs() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/bridgesForStubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections")
@TestDataPath("$PROJECT_ROOT")
@@ -1765,6 +1765,16 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/builtinStubMethods/customReadOnlyIterator.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods/bridgesForStubs")
@TestDataPath("$PROJECT_ROOT")
public class BridgesForStubs {
@Test
public void testAllFilesPresentInBridgesForStubs() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/bridgesForStubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections")
@TestDataPath("$PROJECT_ROOT")
@@ -1568,6 +1568,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/builtinStubMethods/customReadOnlyIterator.kt");
}
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods/bridgesForStubs")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class BridgesForStubs extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInBridgesForStubs() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/bridgesForStubs"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
}
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)