FE MPP: add a test with expect value class B : interface with toString
Related to KT-54844
This commit is contained in:
committed by
Space Team
parent
f67f8c393b
commit
0ea0346ec1
+6
@@ -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);
|
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
|
@Test
|
||||||
@TestMetadata("expectDataObject.kt")
|
@TestMetadata("expectDataObject.kt")
|
||||||
public void testExpectDataObject() throws Exception {
|
public void testExpectDataObject() throws Exception {
|
||||||
|
|||||||
+6
@@ -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);
|
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
|
@Test
|
||||||
@TestMetadata("expectDataObject.kt")
|
@TestMetadata("expectDataObject.kt")
|
||||||
public void testExpectDataObject() throws Exception {
|
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
|
||||||
Generated
+6
@@ -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);
|
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
|
@Test
|
||||||
@TestMetadata("expectDataObject.kt")
|
@TestMetadata("expectDataObject.kt")
|
||||||
public void testExpectDataObject() throws Exception {
|
public void testExpectDataObject() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user