aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/content
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/content')
-rw-r--r--plugins/base/src/test/kotlin/content/annotations/SinceKotlinTest.kt95
-rw-r--r--plugins/base/src/test/kotlin/content/exceptions/ContentForExceptions.kt1
-rw-r--r--plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt1
3 files changed, 78 insertions, 19 deletions
diff --git a/plugins/base/src/test/kotlin/content/annotations/SinceKotlinTest.kt b/plugins/base/src/test/kotlin/content/annotations/SinceKotlinTest.kt
index 4cb25704..6ee95bbd 100644
--- a/plugins/base/src/test/kotlin/content/annotations/SinceKotlinTest.kt
+++ b/plugins/base/src/test/kotlin/content/annotations/SinceKotlinTest.kt
@@ -14,10 +14,7 @@ import org.jetbrains.dokka.model.doc.CustomTagWrapper
import org.jetbrains.dokka.model.doc.Text
import org.jetbrains.dokka.pages.ContentPage
import signatures.AbstractRenderingTest
-import utils.ParamAttributes
-import utils.TestOutputWriterPlugin
-import utils.assertNotNull
-import utils.bareSignature
+import utils.*
import kotlin.test.*
@@ -125,30 +122,58 @@ class SinceKotlinTest : AbstractRenderingTest() {
val configuration = dokkaConfiguration {
sourceSets {
sourceSet {
- sourceRoots = listOf("src/")
+ sourceRoots = listOf("src/jvm/")
analysisPlatform = "jvm"
}
sourceSet {
- sourceRoots = listOf("src/")
+ sourceRoots = listOf("src/native/")
analysisPlatform = "native"
+ name = "native"
}
sourceSet {
- sourceRoots = listOf("src/")
+ sourceRoots = listOf("src/common/")
analysisPlatform = "common"
+ name = "common"
}
sourceSet {
- sourceRoots = listOf("src/")
+ sourceRoots = listOf("src/js/")
analysisPlatform = "js"
+ name = "js"
}
sourceSet {
- sourceRoots = listOf("src/")
+ sourceRoots = listOf("src/wasm/")
analysisPlatform = "wasm"
+ name = "wasm"
}
}
}
testInline(
"""
- |/src/main/kotlin/test/source.kt
+ |/src/jvm/kotlin/test/source.kt
+ |package test
+ |
+ |fun ring(abc: String): String {
+ | return "My precious " + abc
+ |}
+ |/src/native/kotlin/test/source.kt
+ |package test
+ |
+ |fun ring(abc: String): String {
+ | return "My precious " + abc
+ |}
+ |/src/common/kotlin/test/source.kt
+ |package test
+ |
+ |fun ring(abc: String): String {
+ | return "My precious " + abc
+ |}
+ |/src/js/kotlin/test/source.kt
+ |package test
+ |
+ |fun ring(abc: String): String {
+ | return "My precious " + abc
+ |}
+ |/src/wasm/kotlin/test/source.kt
|package test
|
|fun ring(abc: String): String {
@@ -185,33 +210,69 @@ class SinceKotlinTest : AbstractRenderingTest() {
val configuration = dokkaConfiguration {
sourceSets {
sourceSet {
- sourceRoots = listOf("src/")
+ sourceRoots = listOf("src/jvm/")
classpath = listOfNotNull(jvmStdlibPath)
analysisPlatform = "jvm"
}
sourceSet {
- sourceRoots = listOf("src/")
+ sourceRoots = listOf("src/native/")
analysisPlatform = "native"
+ name = "native"
}
sourceSet {
- sourceRoots = listOf("src/")
+ sourceRoots = listOf("src/common/")
classpath = listOfNotNull(commonStdlibPath)
analysisPlatform = "common"
+ name = "common"
}
sourceSet {
- sourceRoots = listOf("src/")
+ sourceRoots = listOf("src/js/")
classpath = listOfNotNull(jsStdlibPath)
analysisPlatform = "js"
+ name = "js"
}
sourceSet {
- sourceRoots = listOf("src/")
+ sourceRoots = listOf("src/wasm/")
analysisPlatform = "wasm"
+ name = "wasm"
}
}
}
testInline(
"""
- |/src/main/kotlin/test/source.kt
+ |/src/jvm/kotlin/test/source.kt
+ |package test
+ |
+ |/** dssdd */
+ |@SinceKotlin("1.3")
+ |fun ring(abc: String): String {
+ | return "My precious " + abc
+ |}
+ |/src/native/kotlin/test/source.kt
+ |package test
+ |
+ |/** dssdd */
+ |@SinceKotlin("1.3")
+ |fun ring(abc: String): String {
+ | return "My precious " + abc
+ |}
+ |/src/common/kotlin/test/source.kt
+ |package test
+ |
+ |/** dssdd */
+ |@SinceKotlin("1.3")
+ |fun ring(abc: String): String {
+ | return "My precious " + abc
+ |}
+ |/src/js/kotlin/test/source.kt
+ |package test
+ |
+ |/** dssdd */
+ |@SinceKotlin("1.3")
+ |fun ring(abc: String): String {
+ | return "My precious " + abc
+ |}
+ |/src/wasm/kotlin/test/source.kt
|package test
|
|/** dssdd */
@@ -238,7 +299,7 @@ class SinceKotlinTest : AbstractRenderingTest() {
find { it.sourceSets.first().analysisPlatform == i.key }?.documentation?.values?.first()
?.dfs { it is CustomTagWrapper && it.name == "Since Kotlin" }
.assertNotNull("SinceKotlin[${i.key}]")
- assertEquals((tag.children.first() as Text).body, i.value.toString())
+ assertEquals(i.value.toString(), (tag.children.first() as Text).body , "Platform ${i.key}")
}
}
}
diff --git a/plugins/base/src/test/kotlin/content/exceptions/ContentForExceptions.kt b/plugins/base/src/test/kotlin/content/exceptions/ContentForExceptions.kt
index 9a9fd8b4..22becb93 100644
--- a/plugins/base/src/test/kotlin/content/exceptions/ContentForExceptions.kt
+++ b/plugins/base/src/test/kotlin/content/exceptions/ContentForExceptions.kt
@@ -339,7 +339,6 @@ class ContentForExceptions : BaseAbstractTest() {
}
}
- @OnlyDescriptorsMPP("Return type for native `function` should be null rather than kotlin/Unit")
@Test
fun `throws in merged functions`() {
testInline(
diff --git a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt
index 2790d8b6..fb72178b 100644
--- a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt
+++ b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt
@@ -759,7 +759,6 @@ class ContentForSeeAlsoTest : BaseAbstractTest() {
}
}
- @OnlyDescriptorsMPP
@Test
fun `multiplatform class with seealso in few platforms`() {
testInline(