aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test')
-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()