New MPP highlighting test: add test without errors (KT-27494)

This commit is contained in:
Mikhail Glukhikh
2018-10-31 18:57:14 +03:00
parent 62e9eae48d
commit 329e4f6000
6 changed files with 65 additions and 0 deletions
@@ -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'
@@ -0,0 +1,3 @@
expect class <lineMarker><lineMarker>My</lineMarker></lineMarker> {
fun <lineMarker><lineMarker>foo</lineMarker></lineMarker>()
}
@@ -0,0 +1,3 @@
actual class <lineMarker>My</lineMarker> {
actual fun <lineMarker>foo</lineMarker>() {}
}
@@ -0,0 +1,3 @@
actual class <lineMarker>My</lineMarker> {
actual fun <lineMarker>foo</lineMarker>() {}
}