Add first test for new multiplatform highlighting #KT-27494 Fixed

This commit is contained in:
Mikhail Glukhikh
2018-10-31 15:39:39 +03:00
parent 948e4a48af
commit 9be23bb21c
6 changed files with 148 additions and 0 deletions
@@ -0,0 +1,30 @@
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 <error descr="[NO_ACTUAL_FOR_EXPECT] Expected class 'My' has no actual declaration in module first_jsMain for JS">My</error> {
fun foo()
}
@@ -0,0 +1 @@
fun foo() = "Java Script"
@@ -0,0 +1,5 @@
actual class My {
actual fun foo() {}
actual fun <error descr="[ACTUAL_WITHOUT_EXPECT] Actual function 'bar' has no corresponding expected declaration">bar</error>() {}
}