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
+46
@@ -19482,6 +19482,52 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ReturnResult {
|
||||
@Test
|
||||
public void testAllFilesPresentInReturnResult() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/returnResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("class.kt")
|
||||
public void testClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/class.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classAnyOverride.kt")
|
||||
public void testClassAnyOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classAnyOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classGenericOverride.kt")
|
||||
public void testClassGenericOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classGenericOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classResultOverride.kt")
|
||||
public void testClassResultOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classResultOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interface.kt")
|
||||
public void testInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/interface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/topLevel.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
class C {
|
||||
fun foo(): Result<String> = Result.success("OK")
|
||||
}
|
||||
|
||||
fun box() = C().foo().getOrThrow()
|
||||
@@ -0,0 +1,16 @@
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
interface I {
|
||||
fun foo(): Any
|
||||
}
|
||||
|
||||
class C : I {
|
||||
override fun foo(): Result<String> = Result.success("OK")
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
if (((C() as I).foo() as Result<String>).getOrThrow() != "OK") return "FAIL 1"
|
||||
return C().foo().getOrThrow()
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
interface I<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
class C : I<Result<String>> {
|
||||
override fun foo(): Result<String> = Result.success("OK")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (((C() as I<Result<String>>).foo() as Result<String>).getOrThrow() != "OK") return "FAIL 1"
|
||||
return C().foo().getOrThrow()
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
interface I {
|
||||
fun foo(): Result<String>
|
||||
}
|
||||
|
||||
class C : I {
|
||||
override fun foo(): Result<String> = Result.success("OK")
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
if ((C() as I).foo().getOrThrow() != "OK") return "FAIL 1"
|
||||
return C().foo().getOrThrow()
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
interface I {
|
||||
fun foo(): Result<String>
|
||||
}
|
||||
|
||||
fun box() = object : I {
|
||||
override fun foo() = Result.success("OK")
|
||||
}.foo().getOrThrow()
|
||||
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
fun foo(): Result<String> = Result.success("OK")
|
||||
|
||||
fun box() = foo().getOrThrow()
|
||||
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class C {
|
||||
fun foo(): Result<Boolean> = TODO()
|
||||
}
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@kotlin.Metadata
|
||||
public final class C {
|
||||
// source: 'class.kt'
|
||||
public method <init>(): void
|
||||
public final @org.jetbrains.annotations.NotNull method foo-d1pmJ48(): java.lang.Object
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface I {
|
||||
fun foo(): Any
|
||||
}
|
||||
|
||||
class C : I {
|
||||
override fun foo(): Result<Boolean> = TODO()
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
@kotlin.Metadata
|
||||
public final class C {
|
||||
// source: 'classAnyOverride.kt'
|
||||
public method <init>(): void
|
||||
public synthetic bridge method foo(): java.lang.Object
|
||||
public @org.jetbrains.annotations.NotNull method foo-d1pmJ48(): java.lang.Object
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public interface I {
|
||||
// source: 'classAnyOverride.kt'
|
||||
public abstract @org.jetbrains.annotations.NotNull method foo(): java.lang.Object
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface I<T> {
|
||||
fun foo(): T = TODO()
|
||||
}
|
||||
|
||||
class C : I<Result<Boolean>> {
|
||||
override fun foo(): Result<Boolean> = TODO()
|
||||
}
|
||||
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
@kotlin.Metadata
|
||||
public final class C {
|
||||
// source: 'classGenericOverride.kt'
|
||||
public method <init>(): void
|
||||
public synthetic bridge method foo(): java.lang.Object
|
||||
public @org.jetbrains.annotations.NotNull method foo-d1pmJ48(): java.lang.Object
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class I$DefaultImpls {
|
||||
// source: 'classGenericOverride.kt'
|
||||
public static method foo(@org.jetbrains.annotations.NotNull p0: I): java.lang.Object
|
||||
public final inner class I$DefaultImpls
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public interface I {
|
||||
// source: 'classGenericOverride.kt'
|
||||
public abstract method foo(): java.lang.Object
|
||||
public final inner class I$DefaultImpls
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface I {
|
||||
fun foo(): Result<Boolean>
|
||||
}
|
||||
|
||||
class C : I {
|
||||
override fun foo(): Result<Boolean> = TODO()
|
||||
}
|
||||
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
@kotlin.Metadata
|
||||
public final class C {
|
||||
// source: 'classResultOverride.kt'
|
||||
public method <init>(): void
|
||||
public @org.jetbrains.annotations.NotNull method foo-d1pmJ48(): java.lang.Object
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public interface I {
|
||||
// source: 'classResultOverride.kt'
|
||||
public abstract @org.jetbrains.annotations.NotNull method foo-d1pmJ48(): java.lang.Object
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface I {
|
||||
fun foo(): Result<Boolean>
|
||||
}
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
@kotlin.Metadata
|
||||
public interface I {
|
||||
// source: 'interface.kt'
|
||||
public abstract @org.jetbrains.annotations.NotNull method foo-d1pmJ48(): java.lang.Object
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(): Result<Boolean> = TODO()
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
@kotlin.Metadata
|
||||
public final class TopLevelKt {
|
||||
// source: 'topLevel.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull method foo(): java.lang.Object
|
||||
}
|
||||
+46
@@ -19464,6 +19464,52 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ReturnResult {
|
||||
@Test
|
||||
public void testAllFilesPresentInReturnResult() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/returnResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("class.kt")
|
||||
public void testClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/class.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classAnyOverride.kt")
|
||||
public void testClassAnyOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classAnyOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classGenericOverride.kt")
|
||||
public void testClassGenericOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classGenericOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classResultOverride.kt")
|
||||
public void testClassResultOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classResultOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interface.kt")
|
||||
public void testInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/interface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/topLevel.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+46
@@ -19482,6 +19482,52 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ReturnResult {
|
||||
@Test
|
||||
public void testAllFilesPresentInReturnResult() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/returnResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("class.kt")
|
||||
public void testClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/class.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classAnyOverride.kt")
|
||||
public void testClassAnyOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classAnyOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classGenericOverride.kt")
|
||||
public void testClassGenericOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classGenericOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classResultOverride.kt")
|
||||
public void testClassResultOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/classResultOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interface.kt")
|
||||
public void testInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/interface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/returnResult/topLevel.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+43
@@ -1361,6 +1361,49 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ReturnResult extends AbstractBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInReturnResult() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("class.kt")
|
||||
public void testClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/class.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classAnyOverride.kt")
|
||||
public void testClassAnyOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/classAnyOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classGenericOverride.kt")
|
||||
public void testClassGenericOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/classGenericOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classResultOverride.kt")
|
||||
public void testClassResultOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/classResultOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interface.kt")
|
||||
public void testInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/interface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/topLevel.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/stdlibManglingIn1430")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+43
@@ -16206,6 +16206,49 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ReturnResult extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInReturnResult() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/returnResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, 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)
|
||||
|
||||
+43
@@ -1361,6 +1361,49 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ReturnResult extends AbstractIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInReturnResult() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("class.kt")
|
||||
public void testClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/class.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classAnyOverride.kt")
|
||||
public void testClassAnyOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/classAnyOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classGenericOverride.kt")
|
||||
public void testClassGenericOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/classGenericOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classResultOverride.kt")
|
||||
public void testClassResultOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/classResultOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interface.kt")
|
||||
public void testInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/interface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/returnResult/topLevel.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/stdlibManglingIn1430")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
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