aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/kotlin/format
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2017-02-23 16:35:45 +0100
committerDmitry Jemerov <yole@jetbrains.com>2017-02-23 16:35:45 +0100
commit99689adee954582da57268ff0375fdec52193a01 (patch)
tree82b41b04e568a564ba91473e1dcaba25b611a2b6 /core/src/test/kotlin/format
parenta39c7a161282d132d08bcf89eed0213374a574e9 (diff)
downloaddokka-99689adee954582da57268ff0375fdec52193a01.tar.gz
dokka-99689adee954582da57268ff0375fdec52193a01.tar.bz2
dokka-99689adee954582da57268ff0375fdec52193a01.zip
Merge declarations with the same signature defined for multiple platforms
Diffstat (limited to 'core/src/test/kotlin/format')
-rw-r--r--core/src/test/kotlin/format/MarkdownFormatTest.kt26
1 files changed, 22 insertions, 4 deletions
diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt
index 967bc5e4..dda31d11 100644
--- a/core/src/test/kotlin/format/MarkdownFormatTest.kt
+++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt
@@ -243,11 +243,29 @@ class MarkdownFormatTest {
}
@Test fun multiplePlatforms() {
+ verifyMultiplatformPackage(buildMultiplePlatforms("multiplatform"), "multiplatform")
+ }
+
+ @Test fun multiplePlatformsMerge() {
+ verifyMultiplatformPackage(buildMultiplePlatforms("multiplatformMerge"), "multiplatformMerge")
+ }
+
+ @Test fun multiplePlatformsMergeMembers() {
+ val module = buildMultiplePlatforms("multiplatformMergeMembers")
+ verifyModelOutput(module, ".md", "testdata/format/multiplatformMergeMembers/foo.kt") { model, output ->
+ markdownService.createOutputBuilder(output, tempLocation).appendNodes(model.members.single().members)
+ }
+ }
+
+ private fun buildMultiplePlatforms(path: String): DocumentationModule {
val module = DocumentationModule("test")
- val sourcePath = "testdata/format/multiplatform/foo.kt"
- appendDocumentation(module, contentRootFromPath(sourcePath), implicitPlatforms = listOf("JVM"))
- appendDocumentation(module, contentRootFromPath("testdata/format/multiplatform/bar.kt"), implicitPlatforms = listOf("JS"))
- verifyModelOutput(module, ".package.md", sourcePath) { model, output ->
+ appendDocumentation(module, contentRootFromPath("testdata/format/$path/jvm.kt"), implicitPlatforms = listOf("JVM"))
+ appendDocumentation(module, contentRootFromPath("testdata/format/$path/js.kt"), implicitPlatforms = listOf("JS"))
+ return module
+ }
+
+ private fun verifyMultiplatformPackage(module: DocumentationModule, path: String) {
+ verifyModelOutput(module, ".package.md", "testdata/format/$path/multiplatform.kt") { model, output ->
markdownService.createOutputBuilder(output, tempLocation).appendNodes(model.members)
}
}