diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-02-27 18:30:30 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-02-27 18:30:30 +0300 |
commit | ef753c8a1b9f02d9f6f026d555d628fbb207c574 (patch) | |
tree | 6c70dec31eb1a010f6b9db44dcac7a7720ab8d56 /core/src/test/kotlin | |
parent | 289d287993b4618f73ebcbc5056a5495238a5836 (diff) | |
download | dokka-ef753c8a1b9f02d9f6f026d555d628fbb207c574.tar.gz dokka-ef753c8a1b9f02d9f6f026d555d628fbb207c574.tar.bz2 dokka-ef753c8a1b9f02d9f6f026d555d628fbb207c574.zip |
Package platforms detected based on it's members, refactored multiplatform tests layout
Diffstat (limited to 'core/src/test/kotlin')
-rw-r--r-- | core/src/test/kotlin/format/MarkdownFormatTest.kt | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt index 4830d760..e87811ee 100644 --- a/core/src/test/kotlin/format/MarkdownFormatTest.kt +++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt @@ -255,35 +255,44 @@ class MarkdownFormatTest { } @Test fun multiplePlatforms() { - verifyMultiplatformPackage(buildMultiplePlatforms("multiplatform"), "multiplatform") + verifyMultiplatformPackage(buildMultiplePlatforms("multiplatform/simple"), "multiplatform/simple") } @Test fun multiplePlatformsMerge() { - verifyMultiplatformPackage(buildMultiplePlatforms("multiplatformMerge"), "multiplatformMerge") + verifyMultiplatformPackage(buildMultiplePlatforms("multiplatform/merge"), "multiplatform/merge") } @Test fun multiplePlatformsMergeMembers() { - val module = buildMultiplePlatforms("multiplatformMergeMembers") - verifyModelOutput(module, ".md", "testdata/format/multiplatformMergeMembers/foo.kt") { model, output -> + val module = buildMultiplePlatforms("multiplatform/mergeMembers") + verifyModelOutput(module, ".md", "testdata/format/multiplatform/mergeMembers/foo.kt") { model, output -> markdownService.createOutputBuilder(output, tempLocation).appendNodes(model.members.single().members) } } @Test fun multiplePlatformsOmitRedundant() { - val module = buildMultiplePlatforms("multiplatformOmitRedundant") - verifyModelOutput(module, ".md", "testdata/format/multiplatformOmitRedundant/foo.kt") { model, output -> + val module = buildMultiplePlatforms("multiplatform/omitRedundant") + verifyModelOutput(module, ".md", "testdata/format/multiplatform/omitRedundant/foo.kt") { model, output -> markdownService.createOutputBuilder(output, tempLocation).appendNodes(model.members.single().members) } } @Test fun multiplePlatformsImplied() { - val module = buildMultiplePlatforms("multiplatformImplied") - verifyModelOutput(module, ".md", "testdata/format/multiplatformImplied/foo.kt") { model, output -> + val module = buildMultiplePlatforms("multiplatform/implied") + verifyModelOutput(module, ".md", "testdata/format/multiplatform/implied/foo.kt") { model, output -> MarkdownFormatService(InMemoryLocationService, KotlinLanguageService(), listOf("JVM", "JS")) .createOutputBuilder(output, tempLocation).appendNodes(model.members.single().members) } } + @Test fun multiplePlatformsPackagePlatformFromMembers() { + val module = buildMultiplePlatforms("multiplatform/packagePlatformsFromMembers") + verifyModelOutput(module, ".md", "testdata/format/multiplatform/packagePlatformsFromMembers/multiplatform.index.kt") { + model, output -> + MarkdownFormatService(InMemoryLocationService, KotlinLanguageService(), listOf()) + .createOutputBuilder(output, tempLocation).appendNodes(model.members) + } + } + private fun buildMultiplePlatforms(path: String): DocumentationModule { val module = DocumentationModule("test") val options = DocumentationOptions("", "html", generateIndexPages = false) |