diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2022-08-03 13:51:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-03 13:51:50 +0200 |
commit | 3994c42f2f2366d2e551e62412518a210581cb3a (patch) | |
tree | 8f67a972f4ae055f8e6177cf43aaf4cc1f06e5d6 /plugins/base/src/test/kotlin/content/seealso | |
parent | 018af7d18f50b0677a31714e29744ac2d8713c4f (diff) | |
download | dokka-3994c42f2f2366d2e551e62412518a210581cb3a.tar.gz dokka-3994c42f2f2366d2e551e62412518a210581cb3a.tar.bz2 dokka-3994c42f2f2366d2e551e62412518a210581cb3a.zip |
Apply the same style to all KDoc tags, including throws/see/parameters (#2587)
Diffstat (limited to 'plugins/base/src/test/kotlin/content/seealso')
-rw-r--r-- | plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt | 78 |
1 files changed, 65 insertions, 13 deletions
diff --git a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt index 4096640a..5c1fd054 100644 --- a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt +++ b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt @@ -97,13 +97,12 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { ) } after { - header(2) { +"See also" } + header(4) { +"See also" } group { table { group { //DRI should be "test//abc/#/-1/" link { +"abc" } - group { } } } } @@ -150,7 +149,7 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { ) } after { - header(2) { +"See also" } + header(4) { +"See also" } group { table { group { @@ -171,6 +170,60 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { } @Test + fun `should use fully qualified name for unresolved link`() { + testInline( + """ + |/src/main/kotlin/test/source.kt + |package test + | /** + | * @see com.example.NonExistingClass description for non-existing + | */ + |fun function(abc: String) { + | println(abc) + |} + """.trimIndent(), testConfiguration + ) { + pagesTransformationStage = { module -> + val page = module.children.single { it.name == "test" } + .children.single { it.name == "function" } as ContentPage + page.content.assertNode { + group { + header(1) { +"function" } + } + divergentGroup { + divergentInstance { + divergent { + bareSignature( + emptyMap(), + "", + "", + emptySet(), + "function", + null, + "abc" to ParamAttributes(emptyMap(), emptySet(), "String") + ) + } + after { + header(4) { +"See also" } + group { + table { + group { + +"com.example.NonExistingClass" + group { + group { +"description for non-existing" } + } + } + } + } + } + } + } + } + } + } + } + + @Test fun `undocumented seealso with stdlib link`() { testInline( """ @@ -205,7 +258,7 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { ) } after { - header(2) { +"See also" } + header(4) { +"See also" } group { table { group { @@ -216,9 +269,8 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { (this as ContentDRILink).address.toString() ) } - +"kotlin.collections.Collection" + +"Collection" } - group { } } } } @@ -265,12 +317,12 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { ) } after { - header(2) { +"See also" } + header(4) { +"See also" } group { table { group { //DRI should be "test//abc/#/-1/" - link { +"kotlin.collections.Collection" } + link { +"Collection" } group { group { +"Comment to stdliblink" } } @@ -327,12 +379,12 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { unnamedTag("Author") { comment { +"pikinier20" } } unnamedTag("Since") { comment { +"0.11" } } - header(2) { +"See also" } + header(4) { +"See also" } group { table { group { //DRI should be "test//abc/#/-1/" - link { +"kotlin.collections.Collection" } + link { +"Collection" } group { group { +"Comment to stdliblink" } } @@ -383,7 +435,7 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { ) } after { - header(2) { +"See also" } + header(4) { +"See also" } group { table { group { @@ -439,7 +491,7 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { ) } after { - header(2) { +"See also" } + header(4) { +"See also" } group { table { group { @@ -451,7 +503,7 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { } group { //DRI should be "test//abc/#/-1/" - link { +"kotlin.collections.Collection" } + link { +"Collection" } group { group { +"Comment to collection" } } } } |