Minor. Add tests to check returning Result from functions
Mainly, that virtual functions, returning Result, are mangled. #KT-45855
This commit is contained in:
committed by
TeamCityServer
parent
613eda5016
commit
bce92d824a
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+43
@@ -14280,6 +14280,49 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ReturnResult extends AbstractIrJsCodegenBoxES6Test {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInReturnResult() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/returnResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
|
||||
@TestMetadata("class.kt")
|
||||
public void testClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/class.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classAnyOverride.kt")
|
||||
public void testClassAnyOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classAnyOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classGenericOverride.kt")
|
||||
public void testClassGenericOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classGenericOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classResultOverride.kt")
|
||||
public void testClassResultOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classResultOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interface.kt")
|
||||
public void testInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/interface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/topLevel.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+43
@@ -13701,6 +13701,49 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ReturnResult extends AbstractIrJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInReturnResult() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/returnResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("class.kt")
|
||||
public void testClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/class.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classAnyOverride.kt")
|
||||
public void testClassAnyOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classAnyOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classGenericOverride.kt")
|
||||
public void testClassGenericOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classGenericOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classResultOverride.kt")
|
||||
public void testClassResultOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classResultOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interface.kt")
|
||||
public void testInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/interface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/topLevel.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+43
@@ -13766,6 +13766,49 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ReturnResult extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInReturnResult() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/returnResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("class.kt")
|
||||
public void testClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/class.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classAnyOverride.kt")
|
||||
public void testClassAnyOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classAnyOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classGenericOverride.kt")
|
||||
public void testClassGenericOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classGenericOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classResultOverride.kt")
|
||||
public void testClassResultOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classResultOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interface.kt")
|
||||
public void testInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/interface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/topLevel.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+43
@@ -7787,6 +7787,49 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ReturnResult extends AbstractIrCodegenBoxWasmTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInReturnResult() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/returnResult"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("class.kt")
|
||||
public void testClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/class.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classAnyOverride.kt")
|
||||
public void testClassAnyOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classAnyOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classGenericOverride.kt")
|
||||
public void testClassGenericOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classGenericOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classResultOverride.kt")
|
||||
public void testClassResultOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classResultOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interface.kt")
|
||||
public void testInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/interface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/topLevel.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user