Merge together MultiplatformHighlighting and MultiplatformAnalysis tests

Basically, the former uses an old quickly-scrapped infrastructure,
which were not applicable for HMPP, so  the latter tests were written.

So, both check for one and the same thing (highlighting in MPP projects),
but MultiplatformAnalysisTest is more modern,
and has a lot of inconvenient stuff in MultiplatformHighlighting fixed
^KT-43116 Fixed
This commit is contained in:
Alexander Dudinsky
2020-12-22 12:29:43 +03:00
parent 73576c80e4
commit 10a5727260
123 changed files with 293 additions and 443 deletions
@@ -0,0 +1,11 @@
package sample
expect class <!LINE_MARKER("descr='Has actuals in JVM, JS'")!>Sample<!>() {
fun <!LINE_MARKER("descr='Has actuals in JVM, JS'")!>checkMe<!>(): Int
}
expect object <!LINE_MARKER("descr='Has actuals in JVM, JS'")!>Platform<!> {
val <!LINE_MARKER("descr='Has actuals in JVM, JS'")!>name<!>: String
}
fun hello(): String = "Hello from ${Platform.name}"
@@ -0,0 +1,8 @@
MODULE common { platform=[JVM, JS, Native]; root=common }
MODULE jvm { platform=[JVM]; root=jvm; testRoot=jvmTest}
MODULE js { platform=[JS]; root=js }
common -> STDLIB_COMMON { kind=DEPENDENCY }
jvm -> common { kind=DEPENDS_ON }
jvm -> STDLIB_JVM, KOTLIN_TEST, KOTLIN_TEST_JVM, JUNIT, MOCK_JDK { kind=DEPENDENCY }
js -> common { kind=DEPENDS_ON }
@@ -0,0 +1,9 @@
package sample
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>Sample<!> {
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>checkMe<!>() = 12
}
actual object <!LINE_MARKER("descr='Has declaration in common module'")!>Platform<!> {
actual val <!LINE_MARKER("descr='Has declaration in common module'")!>name<!>: String = "JS"
}
@@ -0,0 +1,9 @@
package sample
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>Sample<!> {
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>checkMe<!>() = 42
}
actual object <!LINE_MARKER("descr='Has declaration in common module'")!>Platform<!> {
actual val <!LINE_MARKER("descr='Has declaration in common module'")!>name<!>: String = "JVM"
}
@@ -0,0 +1,11 @@
package sample
import kotlin.test.Test
import kotlin.test.assertTrue
class <!LINE_MARKER("descr='Run Test'")!>SampleTestsJVM<!> {
@Test
fun <!LINE_MARKER("descr='Run Test'")!>testHello<!>() {
assertTrue("JVM" in hello())
}
}