aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/content/signatures
diff options
context:
space:
mode:
authorPaweł Marks <pmarks@virtuslab.com>2020-07-10 18:52:54 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-07-13 10:14:16 +0200
commitec318a2ac97aa5ab88564dc36474131fc03cba61 (patch)
tree599aa509e8c82f406bc95e4e843b259acf891585 /plugins/base/src/test/kotlin/content/signatures
parent43957996a2c530d7c22e00d841af9ad349cbf70a (diff)
downloaddokka-ec318a2ac97aa5ab88564dc36474131fc03cba61.tar.gz
dokka-ec318a2ac97aa5ab88564dc36474131fc03cba61.tar.bz2
dokka-ec318a2ac97aa5ab88564dc36474131fc03cba61.zip
Render explicitly documented primary constructors
Diffstat (limited to 'plugins/base/src/test/kotlin/content/signatures')
-rw-r--r--plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt61
1 files changed, 61 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt b/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt
index c2fbd26f..7de48664 100644
--- a/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt
+++ b/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt
@@ -190,4 +190,65 @@ class ConstructorsSignaturesTest : AbstractCoreTest() {
}
}
}
+
+ @Test
+ fun `class with explicitly documented constructor`() {
+ testInline(
+ """
+ |/src/main/kotlin/test/source.kt
+ |package test
+ |
+ | /**
+ | * some comment
+ | * @constructor ctor comment
+ | **/
+ |class SomeClass(a: String)
+ """.trimIndent(), testConfiguration
+ ) {
+ pagesTransformationStage = { module ->
+ val page = module.children.single { it.name == "test" }
+ .children.single { it.name == "SomeClass" } as ContentPage
+ page.content.assertNode {
+ group {
+ header(1) { +"SomeClass" }
+ platformHinted {
+ skipAllNotMatching()
+ group {
+ +"class"
+ link { +"SomeClass" }
+ +"(a:"
+ group { link { +"String" } }
+ +")"
+ }
+ }
+ }
+ group {
+ header { +"Constructors" }
+ table {
+ group {
+ link { +"<init>" }
+ platformHinted {
+ group {
+ group {
+ +"ctor comment"
+ }
+ }
+ group {
+ +"fun"
+ link { +"<init>" }
+ +"(a:"
+ group {
+ link { +"String" }
+ }
+ +")"
+ }
+ }
+ }
+ }
+ skipAllNotMatching()
+ }
+ }
+ }
+ }
+ }
}