aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/kotlin/format
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2017-02-23 17:05:32 +0100
committerDmitry Jemerov <yole@jetbrains.com>2017-02-23 17:05:32 +0100
commit64a86842ae06c7119cca4ef7c66b024f771ab088 (patch)
tree7e98b4ee57c4219c1ea0bff59f289c36e2a9d750 /core/src/test/kotlin/format
parent99689adee954582da57268ff0375fdec52193a01 (diff)
downloaddokka-64a86842ae06c7119cca4ef7c66b024f771ab088.tar.gz
dokka-64a86842ae06c7119cca4ef7c66b024f771ab088.tar.bz2
dokka-64a86842ae06c7119cca4ef7c66b024f771ab088.zip
Don't show implied platforms in output
Diffstat (limited to 'core/src/test/kotlin/format')
-rw-r--r--core/src/test/kotlin/format/GFMFormatTest.kt2
-rw-r--r--core/src/test/kotlin/format/HtmlFormatTest.kt2
-rw-r--r--core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt2
-rw-r--r--core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt2
-rw-r--r--core/src/test/kotlin/format/MarkdownFormatTest.kt14
5 files changed, 15 insertions, 7 deletions
diff --git a/core/src/test/kotlin/format/GFMFormatTest.kt b/core/src/test/kotlin/format/GFMFormatTest.kt
index 5327c9dc..c097c5c8 100644
--- a/core/src/test/kotlin/format/GFMFormatTest.kt
+++ b/core/src/test/kotlin/format/GFMFormatTest.kt
@@ -5,7 +5,7 @@ import org.jetbrains.dokka.KotlinLanguageService
import org.junit.Test
class GFMFormatTest {
- private val gfmService = GFMFormatService(InMemoryLocationService, KotlinLanguageService())
+ private val gfmService = GFMFormatService(InMemoryLocationService, KotlinLanguageService(), listOf())
@Test fun sample() {
verifyGFMNodeByName("sample", "Foo")
diff --git a/core/src/test/kotlin/format/HtmlFormatTest.kt b/core/src/test/kotlin/format/HtmlFormatTest.kt
index 1816c075..221ee811 100644
--- a/core/src/test/kotlin/format/HtmlFormatTest.kt
+++ b/core/src/test/kotlin/format/HtmlFormatTest.kt
@@ -7,7 +7,7 @@ import org.junit.Test
import java.io.File
class HtmlFormatTest {
- private val htmlService = HtmlFormatService(InMemoryLocationService, KotlinLanguageService(), HtmlTemplateService.default())
+ private val htmlService = HtmlFormatService(InMemoryLocationService, KotlinLanguageService(), HtmlTemplateService.default(), listOf())
@Test fun classWithCompanionObject() {
verifyHtmlNode("classWithCompanionObject")
diff --git a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
index 3363b0a3..27c84aca 100644
--- a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
+++ b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
@@ -5,7 +5,7 @@ import org.jetbrains.dokka.KotlinWebsiteFormatService
import org.junit.Test
class KotlinWebSiteFormatTest {
- private val kwsService = KotlinWebsiteFormatService(InMemoryLocationService, KotlinLanguageService())
+ private val kwsService = KotlinWebsiteFormatService(InMemoryLocationService, KotlinLanguageService(), listOf())
@Test fun sample() {
verifyKWSNodeByName("sample", "foo")
diff --git a/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt
index 742d2908..ca38c604 100644
--- a/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt
+++ b/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt
@@ -5,7 +5,7 @@ import org.jetbrains.dokka.KotlinWebsiteRunnableSamplesFormatService
import org.junit.Test
class KotlinWebSiteRunnableSamplesFormatTest {
- private val kwsService = KotlinWebsiteRunnableSamplesFormatService(InMemoryLocationService, KotlinLanguageService())
+ private val kwsService = KotlinWebsiteRunnableSamplesFormatService(InMemoryLocationService, KotlinLanguageService(), listOf())
@Test fun dropImport() {
diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt
index dda31d11..c09f2624 100644
--- a/core/src/test/kotlin/format/MarkdownFormatTest.kt
+++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt
@@ -4,7 +4,7 @@ import org.jetbrains.dokka.*
import org.junit.Test
class MarkdownFormatTest {
- private val markdownService = MarkdownFormatService(InMemoryLocationService, KotlinLanguageService())
+ private val markdownService = MarkdownFormatService(InMemoryLocationService, KotlinLanguageService(), listOf())
@Test fun emptyDescription() {
verifyMarkdownNode("emptyDescription")
@@ -257,10 +257,18 @@ class MarkdownFormatTest {
}
}
+ @Test fun multiplePlatformsImplied() {
+ val module = buildMultiplePlatforms("multiplatformImplied")
+ verifyModelOutput(module, ".md", "testdata/format/multiplatformImplied/foo.kt") { model, output ->
+ MarkdownFormatService(InMemoryLocationService, KotlinLanguageService(), listOf("JVM", "JS"))
+ .createOutputBuilder(output, tempLocation).appendNodes(model.members.single().members)
+ }
+ }
+
private fun buildMultiplePlatforms(path: String): DocumentationModule {
val module = DocumentationModule("test")
- appendDocumentation(module, contentRootFromPath("testdata/format/$path/jvm.kt"), implicitPlatforms = listOf("JVM"))
- appendDocumentation(module, contentRootFromPath("testdata/format/$path/js.kt"), implicitPlatforms = listOf("JS"))
+ appendDocumentation(module, contentRootFromPath("testdata/format/$path/jvm.kt"), defaultPlatforms = listOf("JVM"))
+ appendDocumentation(module, contentRootFromPath("testdata/format/$path/js.kt"), defaultPlatforms = listOf("JS"))
return module
}