New MPP highlighting test: add test without errors (KT-27494)
This commit is contained in:
+6
@@ -30,6 +30,12 @@ class GradleMultiplatformHighlightingTest : GradleImportingTestCase() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
@TargetVersions("4.7+")
|
||||
@Test
|
||||
fun testNoErrors() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
private fun doTest() {
|
||||
val files = importProjectFromTestData()
|
||||
val project = myTestFixture.project
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
// NO_ERRORS_EXPECTED
|
||||
|
||||
plugins {
|
||||
id 'kotlin-multiplatform' version '1.3.0'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
kotlin {
|
||||
targets {
|
||||
fromPreset(presets.jvm, 'jvm')
|
||||
fromPreset(presets.js, 'js')
|
||||
}
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
|
||||
}
|
||||
}
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
|
||||
}
|
||||
}
|
||||
jsMain {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
pluginManagement {
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == "kotlin-multiplatform") {
|
||||
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
maven { url 'https://plugins.gradle.org/m2/' }
|
||||
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
rootProject.name = 'first'
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expect class <lineMarker><lineMarker>My</lineMarker></lineMarker> {
|
||||
fun <lineMarker><lineMarker>foo</lineMarker></lineMarker>()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
actual class <lineMarker>My</lineMarker> {
|
||||
actual fun <lineMarker>foo</lineMarker>() {}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
actual class <lineMarker>My</lineMarker> {
|
||||
actual fun <lineMarker>foo</lineMarker>() {}
|
||||
}
|
||||
Reference in New Issue
Block a user