From d47d386ad8c0ff4a2c3b9d5b4450a773bdcba2dc Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Mon, 4 May 2020 13:53:10 +0200 Subject: Enhance signature presentation. Support presetnation Java as Kotlin and Kotlin as Java. Refactor annotations creation from PSI/Descriptors. Add proper rendering of annotation signatures in both kotlin syntax and java syntax. Tests for annotations --- .../content/seealso/ContentForSeeAlsoTest.kt | 81 +++++++++++++++++++--- 1 file changed, 73 insertions(+), 8 deletions(-) (limited to 'plugins/base/src/test/kotlin/content/seealso') diff --git a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt index b5cb3b72..94288f75 100644 --- a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt +++ b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt @@ -6,6 +6,7 @@ import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest import org.junit.jupiter.api.Test import utils.bareSignature import utils.pWrapped +import utils.ParamAttributes import utils.unnamedTag class ContentForSeeAlsoTest : AbstractCoreTest() { @@ -41,7 +42,15 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } } } @@ -74,7 +83,15 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { header(2) { +"See also" } @@ -121,7 +138,15 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { header(2) { +"See also" } @@ -168,7 +193,15 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { header(2) { +"See also" } @@ -215,7 +248,15 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { header(2) { +"See also" } @@ -265,7 +306,15 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { pWrapped("random comment") @@ -317,7 +366,15 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { header(2) { +"See also" } @@ -365,7 +422,15 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { header(2) { +"See also" } -- cgit