KT-30330 Support KotlinNothingValueException in JVM

This commit is contained in:
Dmitry Petrov
2020-04-07 13:36:00 +03:00
parent 9941c255b9
commit f42d9eefa1
8 changed files with 144 additions and 1 deletions
@@ -13902,6 +13902,24 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/nothingValue")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class NothingValue extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInNothingValue() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/nothingValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("nothingValueException.kt")
public void testNothingValueException() throws Exception {
runTest("compiler/testData/codegen/box/nothingValue/nothingValueException.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/nullCheckOptimization")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -13967,6 +13967,24 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/nothingValue")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class NothingValue extends AbstractJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInNothingValue() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/nothingValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("nothingValueException.kt")
public void testNothingValueException() throws Exception {
runTest("compiler/testData/codegen/box/nothingValue/nothingValueException.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/nullCheckOptimization")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)