aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-06-21 15:25:29 +0200
committerKamil Doległo <kamilok1965@interia.pl>2019-06-21 15:25:29 +0200
commita5ba1b51d076fc661f776a18dd51bc8d2182b04a (patch)
tree9cc06478c25e54b9c7881cd2d709c7c2887a72c3
parent24bc551f38cb8ce6c983d19832b69ef24dc8674e (diff)
downloaddokka-a5ba1b51d076fc661f776a18dd51bc8d2182b04a.tar.gz
dokka-a5ba1b51d076fc661f776a18dd51bc8d2182b04a.tar.bz2
dokka-a5ba1b51d076fc661f776a18dd51bc8d2182b04a.zip
Fix groupNode tests, expected needs checking
-rw-r--r--core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt17
-rw-r--r--core/src/test/kotlin/format/MarkdownFormatTest.kt14
-rw-r--r--core/testdata/format/multiplatform/breadcrumbsInMemberOfMemberOfGroupNode/multiplatform.md2
-rw-r--r--core/testdata/format/multiplatform/groupNode/multiplatform.md12
-rw-r--r--core/testdata/format/multiplatform/implied/foo.md2
-rw-r--r--core/testdata/format/multiplatform/mergeMembers/foo.md2
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
-| [&lt;init&gt;](-some/-init-.md) | `Some()` |
+| (JS) [&lt;init&gt;](-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) [&lt;init&gt;](-init-.md) | `Foo()`<br>This is a foo. |
+| (JVM, JS) [&lt;init&gt;](-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) [&lt;init&gt;](-init-.md) | `Foo()`<br>This is a foo. |
+| (JVM, JS) [&lt;init&gt;](-init-.md) | `<init>()`<br>This is a foo. |
### Properties