diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2016-11-17 22:06:53 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2016-11-24 20:15:50 +0300 |
commit | 4b86a1410d0427178132c07f6f04033645663bb0 (patch) | |
tree | 0df16b5c6c9e5c6a33e0d021e7a5706d9eb6980b /core/src | |
parent | d769c4db3fdd0f2075fdfb2f9109327f3b1ef386 (diff) | |
download | dokka-4b86a1410d0427178132c07f6f04033645663bb0.tar.gz dokka-4b86a1410d0427178132c07f6f04033645663bb0.tar.bz2 dokka-4b86a1410d0427178132c07f6f04033645663bb0.zip |
Fixup, added some type alias rendering tests
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/kotlin/Formats/StructuredFormatService.kt | 2 | ||||
-rw-r--r-- | core/src/test/kotlin/format/MarkdownFormatTest.kt | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt index b7306486..a7a50f91 100644 --- a/core/src/main/kotlin/Formats/StructuredFormatService.kt +++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt @@ -372,7 +372,7 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, appendSection("Types", node.members.filter { it.kind in NodeKind.classLike && it.kind != NodeKind.TypeAlias && it.kind != NodeKind.AnnotationClass && it.kind != NodeKind.Exception }) appendSection("Annotations", node.members(NodeKind.AnnotationClass)) appendSection("Exceptions", node.members(NodeKind.Exception)) - appendSection("Type aliases", node.members(NodeKind.TypeAlias)) + appendSection("Type Aliases", node.members(NodeKind.TypeAlias)) appendSection("Extensions for External Classes", node.members(NodeKind.ExternalClass)) appendSection("Enum Values", node.members(NodeKind.EnumItem), sortMembers = false) appendSection("Constructors", node.members(NodeKind.Constructor)) diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt index c9f86503..6e4c44c8 100644 --- a/core/src/test/kotlin/format/MarkdownFormatTest.kt +++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt @@ -227,6 +227,11 @@ class MarkdownFormatTest { verifyMarkdownNodeByName("qualifiedNameLink", "foo", withKotlinRuntime = true) } + @Test fun typeAliases() { + verifyMarkdownNode("typeAliases") + verifyMarkdownPackage("typeAliases") + } + private fun verifyMarkdownPackage(fileName: String, withKotlinRuntime: Boolean = false) { verifyOutput("testdata/format/$fileName.kt", ".package.md", withKotlinRuntime = withKotlinRuntime) { model, output -> markdownService.createOutputBuilder(output, tempLocation).appendNodes(model.members) |