aboutsummaryrefslogtreecommitdiff
path: root/core/src/test
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-03-01 22:26:28 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-03-01 22:26:28 +0300
commitabe161a118d3d7df40ad0e1df8b8adf07773103b (patch)
tree4176768eaaac9eec7240fdcbb954238d790edae8 /core/src/test
parent1934463c0a2a708acfde371daf0692811f479a7a (diff)
downloaddokka-abe161a118d3d7df40ad0e1df8b8adf07773103b.tar.gz
dokka-abe161a118d3d7df40ad0e1df8b8adf07773103b.tar.bz2
dokka-abe161a118d3d7df40ad0e1df8b8adf07773103b.zip
Correct merging of different type namesake declarations between platforms
Diffstat (limited to 'core/src/test')
-rw-r--r--core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt10
-rw-r--r--core/src/test/kotlin/format/MarkdownFormatTest.kt10
2 files changed, 20 insertions, 0 deletions
diff --git a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
index 2d86ba5b..9565263f 100644
--- a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
+++ b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
@@ -1,6 +1,7 @@
package org.jetbrains.dokka.tests
import org.jetbrains.dokka.*
+import org.jetbrains.kotlin.utils.addToStdlib.singletonOrEmptyList
import org.junit.Test
class KotlinWebSiteFormatTest {
@@ -23,6 +24,15 @@ class KotlinWebSiteFormatTest {
verifyMultiplatformPackage(module, "dataTags")
}
+ @Test fun dataTagsInGroupNode() {
+ val path = "dataTagsInGroupNode"
+ val module = buildMultiplePlatforms(path)
+ verifyModelOutput(module, ".md", "testdata/format/website/$path/multiplatform.kt") { model, output ->
+ kwsService.createOutputBuilder(output, tempLocation).appendNodes(model.members.single().members.find { it.kind == NodeKind.GroupNode }.singletonOrEmptyList())
+ }
+ verifyMultiplatformPackage(module, path)
+ }
+
private fun verifyKWSNodeByName(fileName: String, name: String) {
verifyOutput("testdata/format/website/$fileName.kt", ".md", format = "kotlin-website") { model, output ->
kwsService.createOutputBuilder(output, tempLocation).appendNodes(model.members.single().members.filter { it.name == name })
diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt
index 04c2dc62..2753e18d 100644
--- a/core/src/test/kotlin/format/MarkdownFormatTest.kt
+++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt
@@ -1,6 +1,7 @@
package org.jetbrains.dokka.tests
import org.jetbrains.dokka.*
+import org.jetbrains.kotlin.utils.addToStdlib.singletonOrEmptyList
import org.junit.Test
class MarkdownFormatTest {
@@ -304,6 +305,15 @@ class MarkdownFormatTest {
verifyMultiplatformPackage(module, path)
}
+ @Test fun multiplePlatformsGroupNode() {
+ val path = "multiplatform/groupNode"
+ val module = buildMultiplePlatforms(path)
+ verifyModelOutput(module, ".md", "testdata/format/$path/multiplatform.kt") { model, output ->
+ markdownService.createOutputBuilder(output, tempLocation).appendNodes(model.members.single().members.find { it.kind == NodeKind.GroupNode }.singletonOrEmptyList())
+ }
+ verifyMultiplatformPackage(module, path)
+ }
+
private fun buildMultiplePlatforms(path: String): DocumentationModule {
val module = DocumentationModule("test")
val options = DocumentationOptions("", "html", generateIndexPages = false)