aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-09-17 16:47:07 +0200
committerAndrzej Ratajczak <32793002+BarkingBad@users.noreply.github.com>2020-09-29 14:57:02 +0200
commit26415d91fcf32f0c70af4f9cea9500bca8187b0e (patch)
treea1be8fd6980fc16b0ca2957dd3f2c1d18ed80643 /plugins/base/src/test/kotlin
parent7e572b6341bc7da3eeed4aef41665097ebad9f35 (diff)
downloaddokka-26415d91fcf32f0c70af4f9cea9500bca8187b0e.tar.gz
dokka-26415d91fcf32f0c70af4f9cea9500bca8187b0e.tar.bz2
dokka-26415d91fcf32f0c70af4f9cea9500bca8187b0e.zip
Add processing of annotations to typealiases
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 c6a52271..b8be54aa 100644
--- a/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
+++ b/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
@@ -401,6 +401,40 @@ class SignatureTest : AbstractCoreTest() {
}
@Test
+ fun `plain typealias of plain class with annotation`() {
+
+ val writerPlugin = TestOutputWriterPlugin()
+
+ testInline(
+ """
+ |/src/main/kotlin/common/Test.kt
+ |package example
+ |
+ |@MustBeDocumented
+ |@Target(AnnotationTarget.TYPEALIAS)
+ |annotation class SomeAnnotation
+ |
+ |@SomeAnnotation
+ |typealias PlainTypealias = Int
+ |
+ """.trimMargin(),
+ configuration,
+ pluginOverrides = listOf(writerPlugin)
+ ) {
+ renderingStage = { _, _ ->
+ writerPlugin.writer.renderedContent("root/example/index.html").signature().first().match(
+ Div(
+ Div(
+ "@", A("SomeAnnotation"), "()"
+ )
+ ),
+ "typealias ", A("PlainTypealias"), " = ", A("Int"), Span()
+ )
+ }
+ }
+ }
+
+ @Test
fun `plain typealias of generic class`() {
val writerPlugin = TestOutputWriterPlugin()