diff options
| author | Dmitry Jemerov <yole@jetbrains.com> | 2017-02-23 17:05:32 +0100 |
|---|---|---|
| committer | Dmitry Jemerov <yole@jetbrains.com> | 2017-02-23 17:05:32 +0100 |
| commit | 64a86842ae06c7119cca4ef7c66b024f771ab088 (patch) | |
| tree | 7e98b4ee57c4219c1ea0bff59f289c36e2a9d750 /core/src/test/kotlin | |
| parent | 99689adee954582da57268ff0375fdec52193a01 (diff) | |
| download | dokka-64a86842ae06c7119cca4ef7c66b024f771ab088.tar.gz dokka-64a86842ae06c7119cca4ef7c66b024f771ab088.tar.bz2 dokka-64a86842ae06c7119cca4ef7c66b024f771ab088.zip | |
Don't show implied platforms in output
Diffstat (limited to 'core/src/test/kotlin')
6 files changed, 17 insertions, 9 deletions
diff --git a/core/src/test/kotlin/TestAPI.kt b/core/src/test/kotlin/TestAPI.kt index a003cd60..86111e76 100644 --- a/core/src/test/kotlin/TestAPI.kt +++ b/core/src/test/kotlin/TestAPI.kt @@ -37,7 +37,7 @@ fun appendDocumentation(documentation: DocumentationModule, withKotlinRuntime: Boolean = false, format: String = "html", includeNonPublic: Boolean = true, - implicitPlatforms: List<String> = emptyList()) { + defaultPlatforms: List<String> = emptyList()) { val messageCollector = object : MessageCollector { override fun clear() { @@ -82,7 +82,7 @@ fun appendDocumentation(documentation: DocumentationModule, sourceLinks = listOf<SourceLinkDefinition>(), generateIndexPages = false) val injector = Guice.createInjector( - DokkaAnalysisModule(environment, options, implicitPlatforms, documentation.nodeRefGraph, DokkaConsoleLogger)) + DokkaAnalysisModule(environment, options, defaultPlatforms, documentation.nodeRefGraph, DokkaConsoleLogger)) buildDocumentationModule(injector, documentation) Disposer.dispose(environment) } 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 } |
