From b8c11e696e91807ef615a0f76b5bc0199415e544 Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Mon, 13 Jul 2020 13:47:19 +0200 Subject: Single platform bubbles fix --- .../test/kotlin/renderers/html/DivergentTest.kt | 22 ----------------- .../renderers/html/HtmlRenderingOnlyTestBase.kt | 28 +++++++++++++++++++++- 2 files changed, 27 insertions(+), 23 deletions(-) (limited to 'plugins/base/src/test/kotlin') diff --git a/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt b/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt index 54d55721..734bea1d 100644 --- a/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt +++ b/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt @@ -12,28 +12,6 @@ import utils.Span import utils.match class DivergentTest : HtmlRenderingOnlyTestBase() { - private val js = defaultSourceSet.copy( - "root", - "JS", - defaultSourceSet.sourceSetID.copy(sourceSetName = "js"), - analysisPlatform = Platform.js, - sourceRoots = listOf(SourceRootImpl("pl1")) - ) - private val jvm = defaultSourceSet.copy( - "root", - "JVM", - defaultSourceSet.sourceSetID.copy(sourceSetName = "jvm"), - - analysisPlatform = Platform.jvm, - sourceRoots = listOf(SourceRootImpl("pl1")) - ) - private val native = defaultSourceSet.copy( - "root", - "NATIVE", - defaultSourceSet.sourceSetID.copy(sourceSetName = "native"), - analysisPlatform = Platform.native, - sourceRoots = listOf(SourceRootImpl("pl1")) - ) @Test fun simpleWrappingCase() { diff --git a/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt b/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt index d533988d..b6765fda 100644 --- a/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt +++ b/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt @@ -1,6 +1,8 @@ package renderers.html import org.jetbrains.dokka.DokkaConfigurationImpl +import org.jetbrains.dokka.Platform +import org.jetbrains.dokka.SourceRootImpl import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.renderers.DefaultTabSortingStrategy import org.jetbrains.dokka.base.renderers.RootCreator @@ -14,9 +16,33 @@ import org.jsoup.nodes.Node import org.jsoup.nodes.TextNode import renderers.RenderingOnlyTestBase import utils.TestOutputWriter +import renderers.defaultSourceSet abstract class HtmlRenderingOnlyTestBase : RenderingOnlyTestBase() { + protected val js = defaultSourceSet.copy( + "root", + "JS", + defaultSourceSet.sourceSetID.copy(sourceSetName = "js"), + analysisPlatform = Platform.js, + sourceRoots = listOf(SourceRootImpl("pl1")) + ) + protected val jvm = defaultSourceSet.copy( + "root", + "JVM", + defaultSourceSet.sourceSetID.copy(sourceSetName = "jvm"), + + analysisPlatform = Platform.jvm, + sourceRoots = listOf(SourceRootImpl("pl1")) + ) + protected val native = defaultSourceSet.copy( + "root", + "NATIVE", + defaultSourceSet.sourceSetID.copy(sourceSetName = "native"), + analysisPlatform = Platform.native, + sourceRoots = listOf(SourceRootImpl("pl1")) + ) + val files = TestOutputWriter() override val context = MockContext( DokkaBase().outputWriter to { _ -> files }, @@ -26,7 +52,7 @@ abstract class HtmlRenderingOnlyTestBase : RenderingOnlyTestBase() { DokkaBase().externalLocationProviderFactory to { ::DokkaExternalLocationProviderFactory }, DokkaBase().tabSortingStrategy to { DefaultTabSortingStrategy() }, testConfiguration = DokkaConfigurationImpl( - "", null, false, emptyList(), emptyList(), emptyMap(), emptyList(), false + "", null, false, listOf(js, jvm, native), emptyList(), emptyMap(), emptyList(), false ) ) -- cgit