Add test on expect class with test methods inside
^KT-34503 In Progress (current behaviour is undesired, see next commit for fix)
This commit is contained in:
@@ -0,0 +1,55 @@
|
|||||||
|
plugins {
|
||||||
|
id 'org.jetbrains.kotlin.multiplatform' version '1.3.61'
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
group 'com.example'
|
||||||
|
version '0.0.1'
|
||||||
|
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvm()
|
||||||
|
js {
|
||||||
|
browser {
|
||||||
|
}
|
||||||
|
nodejs {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
commonMain {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('stdlib-common')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
commonTest {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('test-common')
|
||||||
|
implementation kotlin('test-annotations-common')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jvmMain {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('stdlib-jdk8')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jvmTest {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('test')
|
||||||
|
implementation kotlin('test-junit')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jsMain {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('stdlib-js')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jsTest {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('test-js')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
kotlin.code.style=official
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
rootProject.name = 'mppLibrary'
|
||||||
|
|
||||||
|
enableFeaturePreview('GRADLE_METADATA')
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
package sample
|
||||||
|
|
||||||
|
import kotlin.test.Test
|
||||||
|
import kotlin.test.assertTrue
|
||||||
|
|
||||||
|
expect class <lineMarker descr="Run Test" settings="Nothing here"><lineMarker descr="Has actuals in JS, JVM">SampleTests</lineMarker></lineMarker> {
|
||||||
|
@Test
|
||||||
|
fun <lineMarker descr="Run Test" settings="Nothing here"><lineMarker descr="Has actuals in JS, JVM">testMe</lineMarker></lineMarker>()
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package sample
|
||||||
|
|
||||||
|
import kotlin.test.Test
|
||||||
|
import kotlin.test.assertTrue
|
||||||
|
|
||||||
|
// JS
|
||||||
|
actual class <lineMarker descr="Run Test" settings=" cleanJsBrowserTest jsBrowserTest --tests \"sample.SampleTests\" cleanJsNodeTest jsNodeTest --tests \"sample.SampleTests\" --continue"><lineMarker descr="Has declaration in common module">SampleTests</lineMarker></lineMarker> {
|
||||||
|
@Test
|
||||||
|
actual fun <lineMarker descr="Run Test" settings=" cleanJsBrowserTest jsBrowserTest --tests \"sample.SampleTests.testMe\" cleanJsNodeTest jsNodeTest --tests \"sample.SampleTests.testMe\" --continue"><lineMarker descr="Has declaration in common module">testMe</lineMarker></lineMarker>() {
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package sample
|
||||||
|
|
||||||
|
import kotlin.test.Test
|
||||||
|
import kotlin.test.assertTrue
|
||||||
|
|
||||||
|
// JVM
|
||||||
|
actual class <lineMarker descr="Run Test" settings="cleanJvmTest jvmTest --tests \"sample.SampleTests\""><lineMarker descr="Has declaration in common module">SampleTests</lineMarker></lineMarker> {
|
||||||
|
@Test
|
||||||
|
actual fun <lineMarker descr="Run Test" settings="cleanJvmTest jvmTest --tests \"sample.SampleTests.testMe\""><lineMarker descr="Has declaration in common module">testMe</lineMarker></lineMarker>() {
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user