diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-06-21 15:25:29 +0200 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-06-21 15:25:29 +0200 |
commit | a5ba1b51d076fc661f776a18dd51bc8d2182b04a (patch) | |
tree | 9cc06478c25e54b9c7881cd2d709c7c2887a72c3 /core/src/test/kotlin/format | |
parent | 24bc551f38cb8ce6c983d19832b69ef24dc8674e (diff) | |
download | dokka-a5ba1b51d076fc661f776a18dd51bc8d2182b04a.tar.gz dokka-a5ba1b51d076fc661f776a18dd51bc8d2182b04a.tar.bz2 dokka-a5ba1b51d076fc661f776a18dd51bc8d2182b04a.zip |
Fix groupNode tests, expected needs checking
Diffstat (limited to 'core/src/test/kotlin/format')
-rw-r--r-- | core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt | 17 | ||||
-rw-r--r-- | core/src/test/kotlin/format/MarkdownFormatTest.kt | 14 |
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) { |