aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2022-08-26 16:38:37 +0200
committerGitHub <noreply@github.com>2022-08-26 16:38:37 +0200
commit34a8ae166e7220ddf8c3c42fab466234623501e7 (patch)
treed061a5775aa57d1d31ab8efca5f1a36ac7be3fbe /plugins/base/src/test/kotlin
parentc37c9716857d78589a9e6faba27d2c596f2384de (diff)
downloaddokka-34a8ae166e7220ddf8c3c42fab466234623501e7.tar.gz
dokka-34a8ae166e7220ddf8c3c42fab466234623501e7.tar.bz2
dokka-34a8ae166e7220ddf8c3c42fab466234623501e7.zip
Do not render constructor pages and blocks and for annotation classes (#2642)
Diffstat (limited to 'plugins/base/src/test/kotlin')
-rw-r--r--plugins/base/src/test/kotlin/content/signatures/ConstructorsSignaturesTest.kt (renamed from plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt)45
1 files changed, 45 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt b/plugins/base/src/test/kotlin/content/signatures/ConstructorsSignaturesTest.kt
index b6fc4e6b..943d1bc4 100644
--- a/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt
+++ b/plugins/base/src/test/kotlin/content/signatures/ConstructorsSignaturesTest.kt
@@ -293,4 +293,49 @@ class ConstructorsSignaturesTest : BaseAbstractTest() {
}
}
}
+
+ @Test
+ fun `should render primary constructor, but not constructors block for annotation class`() {
+ testInline(
+ """
+ |/src/main/kotlin/test/source.kt
+ |package test
+ |
+ |annotation class MyAnnotation(val param: String) {}
+ """.trimIndent(),
+ testConfiguration
+ ) {
+ pagesTransformationStage = { module ->
+ val page = module.children.single { it.name == "test" }
+ .children.single { it.name == "MyAnnotation" } as ContentPage
+ page.content.assertNode {
+ group {
+ header(1) { +"MyAnnotation" }
+ platformHinted {
+ group {
+ +"annotation class "
+ link { +"MyAnnotation" }
+ +"("
+ group {
+ group {
+ +"val param: "
+ group { link { +"String" } }
+ }
+ }
+ +")"
+ }
+ }
+ }
+ group {
+ group {
+ header { +"Properties" }
+ table {
+ skipAllNotMatching()
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}