diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-05-04 13:53:10 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-05-26 11:32:03 +0200 |
commit | d47d386ad8c0ff4a2c3b9d5b4450a773bdcba2dc (patch) | |
tree | 364724f661349211f053ea80db1a7feb283f48ba /plugins/base/src/test/kotlin/content/params | |
parent | b1e3033fca65ac1e8e312e51d2eed4f278ddb076 (diff) | |
download | dokka-d47d386ad8c0ff4a2c3b9d5b4450a773bdcba2dc.tar.gz dokka-d47d386ad8c0ff4a2c3b9d5b4450a773bdcba2dc.tar.bz2 dokka-d47d386ad8c0ff4a2c3b9d5b4450a773bdcba2dc.zip |
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
Diffstat (limited to 'plugins/base/src/test/kotlin/content/params')
-rw-r--r-- | plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt | 95 |
1 files changed, 69 insertions, 26 deletions
diff --git a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt index 15f70eae..31f62918 100644 --- a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt +++ b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt @@ -39,7 +39,13 @@ class ContentForParamsTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), "", "", emptySet(), "function", null, "abc" to ParamAttributes( + emptyMap(), + emptySet(), + "String" + ) + ) } } } @@ -72,7 +78,15 @@ class ContentForParamsTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { pWrapped("comment to function") @@ -109,7 +123,15 @@ class ContentForParamsTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { unnamedTag("Author") { +"Kordyjan" } @@ -148,7 +170,15 @@ class ContentForParamsTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { pWrapped("comment to function") @@ -187,7 +217,15 @@ class ContentForParamsTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignature("function", null, "abc" to "String") + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { pWrapped("comment to function") @@ -238,11 +276,10 @@ class ContentForParamsTest : AbstractCoreTest() { divergentInstance { divergent { bareSignature( - "function", - null, - "first" to "String", - "second" to "Int", - "third" to "Double" + emptyMap(), "", "", emptySet(), "function", null, + "first" to ParamAttributes(emptyMap(), emptySet(), "String"), + "second" to ParamAttributes(emptyMap(), emptySet(), "Int"), + "third" to ParamAttributes(emptyMap(), emptySet(), "Double") ) } after { @@ -301,11 +338,10 @@ class ContentForParamsTest : AbstractCoreTest() { divergentInstance { divergent { bareSignature( - "function", - null, - "first" to "String", - "second" to "Int", - "third" to "Double" + emptyMap(), "", "", emptySet(), "function", null, + "first" to ParamAttributes(emptyMap(), emptySet(), "String"), + "second" to ParamAttributes(emptyMap(), emptySet(), "Int"), + "third" to ParamAttributes(emptyMap(), emptySet(), "Double") ) } after { @@ -362,7 +398,16 @@ class ContentForParamsTest : AbstractCoreTest() { divergentGroup { divergentInstance { divergent { - bareSignatureWithReceiver("String", "function", null, "abc" to "String") + bareSignatureWithReceiver( + emptyMap(), + "", + "", + emptySet(), + "String", + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) } after { pWrapped("comment to function") @@ -416,11 +461,10 @@ class ContentForParamsTest : AbstractCoreTest() { divergentInstance { divergent { bareSignature( - "function", - null, - "first" to "String", - "second" to "Int", - "third" to "Double" + emptyMap(), "", "", emptySet(), "function", null, + "first" to ParamAttributes(emptyMap(), emptySet(), "String"), + "second" to ParamAttributes(emptyMap(), emptySet(), "Int"), + "third" to ParamAttributes(emptyMap(), emptySet(), "Double") ) } after { @@ -478,11 +522,10 @@ class ContentForParamsTest : AbstractCoreTest() { divergentInstance { divergent { bareSignature( - "function", - null, - "first" to "String", - "second" to "Int", - "third" to "Double" + emptyMap(), "", "", emptySet(), "function", null, + "first" to ParamAttributes(emptyMap(), emptySet(), "String"), + "second" to ParamAttributes(emptyMap(), emptySet(), "Int"), + "third" to ParamAttributes(emptyMap(), emptySet(), "Double") ) } after { |