aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/content/params
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2020-10-15 15:34:25 +0200
committerKamil Doległo <9080183+kamildoleglo@users.noreply.github.com>2020-10-15 17:04:49 +0200
commit7f948864077388e10ba3608b0d5e1d9a4ea0f4d9 (patch)
tree98ec83ad745315787d79cd662eba8a86b1f7ddcb /plugins/base/src/test/kotlin/content/params
parent9b16f25eb2c29c362f69e5e33fce164ce0dc00e1 (diff)
downloaddokka-7f948864077388e10ba3608b0d5e1d9a4ea0f4d9.tar.gz
dokka-7f948864077388e10ba3608b0d5e1d9a4ea0f4d9.tar.bz2
dokka-7f948864077388e10ba3608b0d5e1d9a4ea0f4d9.zip
Fix displaying authors
Diffstat (limited to 'plugins/base/src/test/kotlin/content/params')
-rw-r--r--plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt86
1 files changed, 86 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt
index cf4fa2e7..efe8949c 100644
--- a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt
+++ b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt
@@ -160,6 +160,92 @@ class ContentForParamsTest : AbstractCoreTest() {
}
@Test
+ fun `multiple authors`() {
+ testInline(
+ """
+ |/src/main/java/sample/DocGenProcessor.java
+ |package sample;
+ |/**
+ | * Annotation processor which visits all classes.
+ | *
+ | * @author googler1@google.com (Googler 1)
+ | * @author googler2@google.com (Googler 2)
+ | */
+ | public class DocGenProcessor { }
+ """.trimIndent(), testConfiguration
+ ) {
+ pagesTransformationStage = { module ->
+ val classPage = module.children.single { it.name == "sample" }.children.single { it.name == "DocGenProcessor" } as ContentPage
+ classPage.content.assertNode {
+ group {
+ header { +"DocGenProcessor" }
+ platformHinted {
+ group {
+ skipAllNotMatching() //Signature
+ }
+ group {
+ group {
+ group {
+ +"Annotation processor which visits all classes."
+ }
+ }
+ }
+ group {
+ header(4) { +"Author" }
+ comment { +"googler1@google.com (Googler 1)" }
+ comment { +"googler2@google.com (Googler 2)" }
+ }
+ }
+ }
+ skipAllNotMatching()
+ }
+ }
+ }
+ }
+
+ @Test
+ fun `author delimetered by space`() {
+ testInline(
+ """
+ |/src/main/java/sample/DocGenProcessor.java
+ |package sample;
+ |/**
+ | * Annotation processor which visits all classes.
+ | *
+ | * @author Marcin Aman Senior
+ | */
+ | public class DocGenProcessor { }
+ """.trimIndent(), testConfiguration
+ ) {
+ pagesTransformationStage = { module ->
+ val classPage = module.children.single { it.name == "sample" }.children.single { it.name == "DocGenProcessor" } as ContentPage
+ classPage.content.assertNode {
+ group {
+ header { +"DocGenProcessor" }
+ platformHinted {
+ group {
+ skipAllNotMatching() //Signature
+ }
+ group {
+ group {
+ group {
+ +"Annotation processor which visits all classes."
+ }
+ }
+ }
+ group {
+ header(4) { +"Author" }
+ comment { +"Marcin Aman Senior" }
+ }
+ }
+ }
+ skipAllNotMatching()
+ }
+ }
+ }
+ }
+
+ @Test
fun `undocumented parameter and other tags`() {
testInline(
"""