Add test on object with tests in common module
^KT-35480 In Progress (current behavior is undesired, see fix in next commit)
This commit is contained in:
+5
@@ -31,6 +31,11 @@ class GradleTestRunConfigurationAndHighlightingTest : GradleImportingTestCase()
|
||||
doTest()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun multiplatformTestsInObject() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
private fun doTest() {
|
||||
val files = importProjectFromTestData()
|
||||
val project = myTestFixture.project
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.multiplatform' version '1.3.61'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
group 'com.example'
|
||||
version '0.0.1'
|
||||
|
||||
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')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package sample
|
||||
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
object <lineMarker descr="Run Test" settings="Nothing here">Obj</lineMarker> {
|
||||
@Test
|
||||
fun <lineMarker descr="Run Test" settings=" cleanJsBrowserTest jsBrowserTest --tests \"sample.Obj.myTest\" cleanJsNodeTest jsNodeTest --tests \"sample.Obj.myTest\" cleanJvmTest jvmTest --tests \"sample.Obj.myTest\" --continue">myTest</lineMarker>() {}
|
||||
}
|
||||
Reference in New Issue
Block a user