diff options
author | Simon Ogorodnik <sem-oro@yandex.ru> | 2017-02-28 12:24:31 +0300 |
---|---|---|
committer | Simon Ogorodnik <sem-oro@yandex.ru> | 2017-02-28 12:24:31 +0300 |
commit | 6276fd0e68085c9b0994f8f947bf904b9b285b34 (patch) | |
tree | 8a725f2d4113bad7f0479677f49d619566601541 /core/src/test | |
parent | d43d47b9486bbd7e926cf1a3fc6372f2a457a5e5 (diff) | |
download | dokka-6276fd0e68085c9b0994f8f947bf904b9b285b34.tar.gz dokka-6276fd0e68085c9b0994f8f947bf904b9b285b34.tar.bz2 dokka-6276fd0e68085c9b0994f8f947bf904b9b285b34.zip |
Split data tags for kotlin-website format
Diffstat (limited to 'core/src/test')
-rw-r--r-- | core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt index 27c84aca..2d86ba5b 100644 --- a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt +++ b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt @@ -1,7 +1,6 @@ package org.jetbrains.dokka.tests -import org.jetbrains.dokka.KotlinLanguageService -import org.jetbrains.dokka.KotlinWebsiteFormatService +import org.jetbrains.dokka.* import org.junit.Test class KotlinWebSiteFormatTest { @@ -19,9 +18,30 @@ class KotlinWebSiteFormatTest { verifyKWSNodeByName("overloadGroup", "magic") } + @Test fun dataTags() { + val module = buildMultiplePlatforms("dataTags") + verifyMultiplatformPackage(module, "dataTags") + } + 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 }) } } + + private fun buildMultiplePlatforms(path: String): DocumentationModule { + val module = DocumentationModule("test") + val options = DocumentationOptions("", "html", generateIndexPages = false) + appendDocumentation(module, contentRootFromPath("testdata/format/website/$path/jvm.kt"), defaultPlatforms = listOf("JVM"), options = options) + appendDocumentation(module, contentRootFromPath("testdata/format/website/$path/jre7.kt"), defaultPlatforms = listOf("JVM", "JRE7"), options = options) + appendDocumentation(module, contentRootFromPath("testdata/format/website/$path/js.kt"), defaultPlatforms = listOf("JS"), options = options) + return module + } + + private fun verifyMultiplatformPackage(module: DocumentationModule, path: String) { + verifyModelOutput(module, ".package.md", "testdata/format/website/$path/multiplatform.kt") { model, output -> + kwsService.createOutputBuilder(output, tempLocation).appendNodes(model.members) + } + } + } |