diff options
6 files changed, 26 insertions, 23 deletions
| diff --git a/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt index 32de3fa5..ebab5f36 100644 --- a/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt +++ b/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt @@ -1,7 +1,7 @@  package org.jetbrains.dokka.tests  import org.jetbrains.dokka.* -import org.junit.Ignore +import org.jetbrains.dokka.Generation.DocumentationMerger  import org.junit.Test  abstract class BaseKotlinWebSiteHtmlFormatTest(val analysisPlatform: Platform): FileGeneratorTestCase() { @@ -64,7 +64,7 @@ abstract class BaseKotlinWebSiteHtmlFormatTest(val analysisPlatform: Platform):      }      private fun buildMultiplePlatforms(path: String): DocumentationModule { -        val module = DocumentationModule("test") +        val moduleName = "test"          val passConfiguration = PassConfigurationImpl(                  noStdlibLink = true,                  noJdkLink = true, @@ -82,26 +82,31 @@ abstract class BaseKotlinWebSiteHtmlFormatTest(val analysisPlatform: Platform):          ) +        val module1 = DocumentationModule(moduleName)          appendDocumentation( -            module, dokkaConfiguration, passConfiguration, ModelConfig( +            module1, dokkaConfiguration, passConfiguration, ModelConfig(                  roots = arrayOf(contentRootFromPath("testdata/format/website-html/$path/jvm.kt")),                  defaultPlatforms = listOf("JVM")              )          ) + +        val module2 = DocumentationModule(moduleName)          appendDocumentation( -            module, dokkaConfiguration, passConfiguration, ModelConfig( +            module2, dokkaConfiguration, passConfiguration, ModelConfig(                  roots = arrayOf(contentRootFromPath("testdata/format/website-html/$path/jre7.kt")),                  defaultPlatforms = listOf("JVM", "JRE7")              )          ) + +        val module3 = DocumentationModule(moduleName)          appendDocumentation( -            module, dokkaConfiguration, passConfiguration, ModelConfig( +            module3, dokkaConfiguration, passConfiguration, ModelConfig(                  roots = arrayOf(contentRootFromPath("testdata/format/website-html/$path/js.kt")),                  defaultPlatforms = listOf("JS")              )          ) -        return module +        return DocumentationMerger(listOf(module1, module2, module3), DokkaConsoleLogger).merge()      }      private fun verifyMultiplatformPackage(module: DocumentationModule, path: String) { diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt index 4796c17c..4984e1d5 100644 --- a/core/src/test/kotlin/format/MarkdownFormatTest.kt +++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt @@ -1,6 +1,7 @@  package org.jetbrains.dokka.tests  import org.jetbrains.dokka.* +import org.jetbrains.dokka.Generation.DocumentationMerger  import org.junit.Test  abstract class BaseMarkdownFormatTest(val analysisPlatform: Platform): FileGeneratorTestCase() { @@ -307,7 +308,7 @@ abstract class BaseMarkdownFormatTest(val analysisPlatform: Platform): FileGener          val module = buildMultiplePlatforms(path)          verifyModelOutput(module, ".md", "testdata/format/$path/multiplatform.kt") { model, output ->              buildPagesAndReadInto( -                    listOfNotNull(model.members.single().members.find { it.kind == NodeKind.GroupNode }?.member(NodeKind.Class)?.member(NodeKind.Function)), +                    listOfNotNull(model.members.single().members.find { it.kind == NodeKind.GroupNode }?.member(NodeKind.Function)),                      output              )          } @@ -386,7 +387,7 @@ abstract class BaseMarkdownFormatTest(val analysisPlatform: Platform): FileGener      private fun buildMultiplePlatforms(path: String): DocumentationModule { -        val module = DocumentationModule("test") +        val moduleName = "test"          val passConfiguration = PassConfigurationImpl(                  noStdlibLink = true,                  noJdkLink = true, @@ -402,22 +403,25 @@ abstract class BaseMarkdownFormatTest(val analysisPlatform: Platform): FileGener              )          ) +        val module1 = DocumentationModule(moduleName)          appendDocumentation( -            module, dokkaConfiguration, passConfiguration, ModelConfig( +            module1, dokkaConfiguration, passConfiguration, ModelConfig(                  roots = arrayOf(contentRootFromPath("testdata/format/$path/jvm.kt")),                  defaultPlatforms = listOf("JVM"),                  analysisPlatform = Platform.jvm              )          ) + +        val module2 = DocumentationModule(moduleName)          appendDocumentation( -            module, dokkaConfiguration, passConfiguration, ModelConfig( +            module2, dokkaConfiguration, passConfiguration, ModelConfig(                  roots = arrayOf(contentRootFromPath("testdata/format/$path/js.kt")),                  defaultPlatforms = listOf("JS"),                  analysisPlatform = Platform.js              )          ) -        return module +        return DocumentationMerger(listOf(module1, module2), DokkaConsoleLogger).merge()      }      private fun verifyMultiplatformPackage(module: DocumentationModule, path: String) { diff --git a/core/testdata/format/multiplatform/breadcrumbsInMemberOfMemberOfGroupNode/multiplatform.md b/core/testdata/format/multiplatform/breadcrumbsInMemberOfMemberOfGroupNode/multiplatform.md index 06b8ead6..d70f9d8b 100644 --- a/core/testdata/format/multiplatform/breadcrumbsInMemberOfMemberOfGroupNode/multiplatform.md +++ b/core/testdata/format/multiplatform/breadcrumbsInMemberOfMemberOfGroupNode/multiplatform.md @@ -1,4 +1,4 @@ -[test](../../../index.md) / [pack](../../index.md) / [Some](../index.md) / [Some](index.md) / [magic](./magic.md) +[test](../../index.md) / [pack](../index.md) / [Some](index.md) / [magic](./magic.md)  # magic diff --git a/core/testdata/format/multiplatform/groupNode/multiplatform.md b/core/testdata/format/multiplatform/groupNode/multiplatform.md index 74d464c9..d8b577ca 100644 --- a/core/testdata/format/multiplatform/groupNode/multiplatform.md +++ b/core/testdata/format/multiplatform/groupNode/multiplatform.md @@ -2,19 +2,13 @@  # Some -`typealias Some = SomeCoolJvmClass` - -**Platform and version requirements:** JVM - -`class Some` - -**Platform and version requirements:** JS +(JVM) `typealias Some = SomeCoolJvmClass`(JS) `class Some`  ### Constructors -| [<init>](-some/-init-.md) | `Some()` | +| (JS) [<init>](-init-.md) | `Some()` |  ### Functions -| [magic](-some/magic.md) | `fun magic(): Unit` | +| (JS) [magic](magic.md) | `fun magic(): Unit` | diff --git a/core/testdata/format/multiplatform/implied/foo.md b/core/testdata/format/multiplatform/implied/foo.md index 1329ea7a..5c43ca29 100644 --- a/core/testdata/format/multiplatform/implied/foo.md +++ b/core/testdata/format/multiplatform/implied/foo.md @@ -8,7 +8,7 @@ This is a foo.  ### Constructors -| (JVM, JS) [<init>](-init-.md) | `Foo()`<br>This is a foo. | +| (JVM, JS) [<init>](-init-.md) | `<init>()`<br>This is a foo. |  ### Properties diff --git a/core/testdata/format/multiplatform/mergeMembers/foo.md b/core/testdata/format/multiplatform/mergeMembers/foo.md index 1329ea7a..5c43ca29 100644 --- a/core/testdata/format/multiplatform/mergeMembers/foo.md +++ b/core/testdata/format/multiplatform/mergeMembers/foo.md @@ -8,7 +8,7 @@ This is a foo.  ### Constructors -| (JVM, JS) [<init>](-init-.md) | `Foo()`<br>This is a foo. | +| (JVM, JS) [<init>](-init-.md) | `<init>()`<br>This is a foo. |  ### Properties | 
