aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt17
-rw-r--r--core/src/test/kotlin/format/MarkdownFormatTest.kt14
2 files changed, 20 insertions, 11 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) {