diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-02-27 21:27:37 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-02-27 21:27:37 +0300 |
commit | d43d47b9486bbd7e926cf1a3fc6372f2a457a5e5 (patch) | |
tree | 925229bac0b49943f38766d07802026beed11910 /core/src/test/kotlin/format | |
parent | 05c5a8f20167b652f918e8260fd16453efadf5ff (diff) | |
parent | bc71b31be28ed558e022babcf40ec1fd3bff923a (diff) | |
download | dokka-d43d47b9486bbd7e926cf1a3fc6372f2a457a5e5.tar.gz dokka-d43d47b9486bbd7e926cf1a3fc6372f2a457a5e5.tar.bz2 dokka-d43d47b9486bbd7e926cf1a3fc6372f2a457a5e5.zip |
Merge branch 'semoro/multiplatform'
Diffstat (limited to 'core/src/test/kotlin/format')
-rw-r--r-- | core/src/test/kotlin/format/MarkdownFormatTest.kt | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt index 121e9afb..cdb55cba 100644 --- a/core/src/test/kotlin/format/MarkdownFormatTest.kt +++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt @@ -259,35 +259,48 @@ 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 multiplePlatformsPackagePlatformFromMembersIndex() { + 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(listOf(model)) + } + } + + @Test fun multiplePlatformsPackagePlatformFromMembers() { + verifyMultiplatformPackage(buildMultiplePlatforms("multiplatform/packagePlatformsFromMembers"), "multiplatform/packagePlatformsFromMembers") + } + private fun buildMultiplePlatforms(path: String): DocumentationModule { val module = DocumentationModule("test") val options = DocumentationOptions("", "html", generateIndexPages = false) |