FE MPP: add a test with expect value class B : interface with toString

Related to KT-54844
This commit is contained in:
Mikhail Glukhikh
2023-05-23 10:37:41 +02:00
committed by Space Team
parent f67f8c393b
commit 0ea0346ec1
4 changed files with 41 additions and 0 deletions
@@ -25,6 +25,12 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("expectAbstractToString.kt")
public void testExpectAbstractToString() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/expectAbstractToString.kt");
}
@Test
@TestMetadata("expectDataObject.kt")
public void testExpectDataObject() throws Exception {
@@ -25,6 +25,12 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("expectAbstractToString.kt")
public void testExpectAbstractToString() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/expectAbstractToString.kt");
}
@Test
@TestMetadata("expectDataObject.kt")
public void testExpectDataObject() throws Exception {
@@ -0,0 +1,23 @@
// FIR_IDENTICAL
// WITH_STDLIB
// MODULE: m1-common
// FILE: common.kt
interface B {
override fun toString(): String
}
expect value class C(val s: String) : B
expect value class D(val s: String) : B
// MODULE: m1-jvm()()(m1-common)
// FILE: jvm.kt
@JvmInline
actual value class C(actual val s: String) : B {
override fun toString(): String = s
}
@JvmInline
actual value class D(actual val s: String) : B
@@ -22330,6 +22330,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("expectAbstractToString.kt")
public void testExpectAbstractToString() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/expectAbstractToString.kt");
}
@Test
@TestMetadata("expectDataObject.kt")
public void testExpectDataObject() throws Exception {