From d2738c02cc0272b32f7bb86d022cfa503d926a0f Mon Sep 17 00:00:00 2001 From: Georgy Bronnikov Date: Fri, 17 Dec 2021 14:11:45 +0300 Subject: [PATCH] Add test for IR serialization --- .../FirBlackBoxInlineCodegenTestGenerated.java | 6 ++++++ .../boxInline/signatureMangling/inheritFromJava.kt | 13 +++++++++++++ .../IrBlackBoxInlineCodegenTestGenerated.java | 6 ++++++ ...mpileKotlinAgainstInlineKotlinTestGenerated.java | 6 ++++++ ...mpileKotlinAgainstInlineKotlinTestGenerated.java | 6 ++++++ .../JvmIrAgainstOldBoxInlineTestGenerated.java | 6 ++++++ 6 files changed, 43 insertions(+) create mode 100644 compiler/testData/codegen/boxInline/signatureMangling/inheritFromJava.kt diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java index 4ca08bb2796..95335adb981 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java @@ -4216,6 +4216,12 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn runTest("compiler/testData/codegen/boxInline/signatureMangling/indices.kt"); } + @Test + @TestMetadata("inheritFromJava.kt") + public void testInheritFromJava() throws Exception { + runTest("compiler/testData/codegen/boxInline/signatureMangling/inheritFromJava.kt"); + } + @Test @TestMetadata("rawType.kt") public void testRawType() throws Exception { diff --git a/compiler/testData/codegen/boxInline/signatureMangling/inheritFromJava.kt b/compiler/testData/codegen/boxInline/signatureMangling/inheritFromJava.kt new file mode 100644 index 00000000000..d1f2327b33d --- /dev/null +++ b/compiler/testData/codegen/boxInline/signatureMangling/inheritFromJava.kt @@ -0,0 +1,13 @@ +// TARGET_BACKEND: JVM_IR +// FILE: Base.java +public class Base { + public String ok() { return "OK"; } +} + +// FILE: Derived.kt +class Derived: Base() + +inline fun ok() = Derived().ok() + +// FILE: box.kt +fun box() = ok() \ No newline at end of file diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java index 81f9e51945e..c2a0a03812e 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java @@ -4216,6 +4216,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli runTest("compiler/testData/codegen/boxInline/signatureMangling/indices.kt"); } + @Test + @TestMetadata("inheritFromJava.kt") + public void testInheritFromJava() throws Exception { + runTest("compiler/testData/codegen/boxInline/signatureMangling/inheritFromJava.kt"); + } + @Test @TestMetadata("rawType.kt") public void testRawType() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index 3eb9ac8be61..6e3f1a1bb15 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -4216,6 +4216,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC runTest("compiler/testData/codegen/boxInline/signatureMangling/indices.kt"); } + @Test + @TestMetadata("inheritFromJava.kt") + public void testInheritFromJava() throws Exception { + runTest("compiler/testData/codegen/boxInline/signatureMangling/inheritFromJava.kt"); + } + @Test @TestMetadata("rawType.kt") public void testRawType() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index b4bf5659640..9312700d337 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -4216,6 +4216,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab runTest("compiler/testData/codegen/boxInline/signatureMangling/indices.kt"); } + @Test + @TestMetadata("inheritFromJava.kt") + public void testInheritFromJava() throws Exception { + runTest("compiler/testData/codegen/boxInline/signatureMangling/inheritFromJava.kt"); + } + @Test @TestMetadata("rawType.kt") public void testRawType() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java index fa22f9756a8..1489a1acde4 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java @@ -4216,6 +4216,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO runTest("compiler/testData/codegen/boxInline/signatureMangling/indices.kt"); } + @Test + @TestMetadata("inheritFromJava.kt") + public void testInheritFromJava() throws Exception { + runTest("compiler/testData/codegen/boxInline/signatureMangling/inheritFromJava.kt"); + } + @Test @TestMetadata("rawType.kt") public void testRawType() throws Exception {