aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin
diff options
context:
space:
mode:
authorvmishenev <vad-mishenev@yandex.ru>2021-08-09 12:51:59 +0300
committerGitHub <noreply@github.com>2021-08-09 11:51:59 +0200
commitd197f0544b4cd1ade870ebde0d6a6a43a94daf9a (patch)
tree979d44a4e5b127956987f0d0d234b90594ce3152 /plugins/base/src/test/kotlin
parentec2bf8a57c744008c30d03c4aec0921a091faa81 (diff)
downloaddokka-d197f0544b4cd1ade870ebde0d6a6a43a94daf9a.tar.gz
dokka-d197f0544b4cd1ade870ebde0d6a6a43a94daf9a.tar.bz2
dokka-d197f0544b4cd1ade870ebde0d6a6a43a94daf9a.zip
Property annotation for getter and setter (#2049)
Diffstat (limited to 'plugins/base/src/test/kotlin')
-rw-r--r--plugins/base/src/test/kotlin/signatures/SignatureTest.kt34
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/signatures/SignatureTest.kt b/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
index 35590d52..a56c408b 100644
--- a/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
+++ b/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
@@ -280,6 +280,40 @@ class SignatureTest : BaseAbstractTest() {
}
@Test
+ fun `property with annotation`() {
+ val source = """
+ |/src/main/kotlin/test/Test.kt
+ |package example
+ |
+ | @MustBeDocumented()
+ | @Target(AnnotationTarget.FUNCTION)
+ | annotation class Marking
+ |
+ | @get:Marking()
+ | @set:Marking()
+ | var str: String
+ """.trimIndent()
+ val writerPlugin = TestOutputWriterPlugin()
+
+ testInline(
+ source,
+ configuration,
+ pluginOverrides = listOf(writerPlugin)
+ ) {
+ renderingStage = { _, _ ->
+ writerPlugin.writer.renderedContent("root/example/str.html").firstSignature().match(
+ Div(
+ Div("@get:", A("Marking")),
+ Div("@set:", A("Marking"))
+ ),
+ "var ", A("str"),
+ ": ", A("String"), Span()
+ )
+ }
+ }
+ }
+
+ @Test
fun `fun with two annotations`() {
val source = """
|/src/main/kotlin/test/Test.kt