[tests] Add a diagnostic test for function resolution in common module

This commit is contained in:
Pavel Kirpichenkov
2023-07-13 19:46:11 +03:00
committed by teamcity
parent 0eef12ea19
commit 71b29f0cd7
6 changed files with 52 additions and 0 deletions
@@ -40638,6 +40638,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/multiplatform"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("collections.kt")
public void testCollections() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/multiplatform/collections.kt");
}
@Test
@TestMetadata("jvmOverloads.kt")
public void testJvmOverloads() throws Exception {
@@ -40638,6 +40638,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/multiplatform"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("collections.kt")
public void testCollections() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/multiplatform/collections.kt");
}
@Test
@TestMetadata("jvmOverloads.kt")
public void testJvmOverloads() throws Exception {
@@ -40638,6 +40638,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/multiplatform"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("collections.kt")
public void testCollections() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/multiplatform/collections.kt");
}
@Test
@TestMetadata("jvmOverloads.kt")
public void testJvmOverloads() throws Exception {
@@ -40752,6 +40752,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/multiplatform"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("collections.kt")
public void testCollections() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/multiplatform/collections.kt");
}
@Test
@TestMetadata("jvmOverloads.kt")
public void testJvmOverloads() throws Exception {
@@ -0,0 +1,22 @@
// FIR_IDENTICAL
// !LANGUAGE: +MultiPlatformProjects
// MODULE: common
// FILE: common.kt
// TARGET_PLATFORM: Common
import kotlin.collections.<!UNRESOLVED_IMPORT!>listOf<!>
fun common() {
<!UNRESOLVED_REFERENCE!>listOf<!>("foo", "bar").map { <!UNRESOLVED_REFERENCE!>it<!> }
}
// MODULE: jvm
// FILE: jvm.kt
// TARGET_PLATFORM: JVM
import kotlin.collections.mapOf
fun jvm() {
mapOf(1 to "1")
}
@@ -41738,6 +41738,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/multiplatform"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("collections.kt")
public void testCollections() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/multiplatform/collections.kt");
}
@Test
@TestMetadata("jvmOverloads.kt")
public void testJvmOverloads() throws Exception {