From a39c7a161282d132d08bcf89eed0213374a574e9 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Thu, 23 Feb 2017 15:21:03 +0100 Subject: Allow specifying implicit platforms for each source root --- core/src/test/kotlin/format/MarkdownFormatTest.kt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'core/src/test/kotlin/format') diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt index 4dd01a20..967bc5e4 100644 --- a/core/src/test/kotlin/format/MarkdownFormatTest.kt +++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt @@ -1,9 +1,6 @@ package org.jetbrains.dokka.tests -import org.jetbrains.dokka.DocumentationModule -import org.jetbrains.dokka.DocumentationNode -import org.jetbrains.dokka.KotlinLanguageService -import org.jetbrains.dokka.MarkdownFormatService +import org.jetbrains.dokka.* import org.junit.Test class MarkdownFormatTest { @@ -245,6 +242,16 @@ class MarkdownFormatTest { verifyMarkdownPackage("sinceKotlin") } + @Test fun multiplePlatforms() { + 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 -> + markdownService.createOutputBuilder(output, tempLocation).appendNodes(model.members) + } + } + private fun verifyMarkdownPackage(fileName: String, withKotlinRuntime: Boolean = false) { verifyOutput("testdata/format/$fileName.kt", ".package.md", withKotlinRuntime = withKotlinRuntime) { model, output -> markdownService.createOutputBuilder(output, tempLocation).appendNodes(model.members) -- cgit