aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/kotlin/format
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/test/kotlin/format')
-rw-r--r--core/src/test/kotlin/format/MarkdownFormatTest.kt27
1 files changed, 19 insertions, 8 deletions
diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt
index cdb55cba..04c2dc62 100644
--- a/core/src/test/kotlin/format/MarkdownFormatTest.kt
+++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt
@@ -288,17 +288,20 @@ class MarkdownFormatTest {
}
}
- @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 packagePlatformsWithExtExtensions() {
+ val path = "multiplatform/packagePlatformsWithExtExtensions"
+ val module = DocumentationModule("test")
+ val options = DocumentationOptions("", "html", generateIndexPages = false)
+ appendDocumentation(module, contentRootFromPath("testdata/format/$path/jvm.kt"), defaultPlatforms = listOf("JVM"), withKotlinRuntime = true, options = options)
+ verifyMultiplatformIndex(module, path)
+ verifyMultiplatformPackage(module, path)
}
@Test fun multiplePlatformsPackagePlatformFromMembers() {
- verifyMultiplatformPackage(buildMultiplePlatforms("multiplatform/packagePlatformsFromMembers"), "multiplatform/packagePlatformsFromMembers")
+ val path = "multiplatform/packagePlatformsFromMembers"
+ val module = buildMultiplePlatforms(path)
+ verifyMultiplatformIndex(module, path)
+ verifyMultiplatformPackage(module, path)
}
private fun buildMultiplePlatforms(path: String): DocumentationModule {
@@ -315,6 +318,14 @@ class MarkdownFormatTest {
}
}
+ private fun verifyMultiplatformIndex(module: DocumentationModule, path: String) {
+ verifyModelOutput(module, ".md", "testdata/format/$path/multiplatform.index.kt") {
+ model, output ->
+ MarkdownFormatService(InMemoryLocationService, KotlinLanguageService(), listOf())
+ .createOutputBuilder(output, tempLocation).appendNodes(listOf(model))
+ }
+ }
+
@Test fun blankLineInsideCodeBlock() {
verifyMarkdownNode("blankLineInsideCodeBlock")
}