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/content/params/ContentForParamsTest.kt20
-rw-r--r--plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt11
-rw-r--r--plugins/base/src/test/kotlin/utils/contentUtils.kt9
3 files changed, 26 insertions, 14 deletions
diff --git a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt
index 2dce7e28..cf4fa2e7 100644
--- a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt
+++ b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt
@@ -113,6 +113,7 @@ class ContentForParamsTest : AbstractCoreTest() {
|package test
| /**
| * @author Kordyjan
+ | * @author Woolfy
| * @since 0.11
| */
|fun function(abc: String) {
@@ -141,8 +142,15 @@ class ContentForParamsTest : AbstractCoreTest() {
)
}
after {
- unnamedTag("Author") { group { +"Kordyjan" } }
- unnamedTag("Since") { group { +"0.11" } }
+ unnamedTag("Author") {
+ comment {
+ +"Kordyjan"
+ }
+ comment {
+ +"Woolfy"
+ }
+ }
+ unnamedTag("Since") { comment { +"0.11" } }
}
}
}
@@ -189,8 +197,8 @@ class ContentForParamsTest : AbstractCoreTest() {
}
after {
group { pWrapped("comment to function") }
- unnamedTag("Author") { group { +"Kordyjan" } }
- unnamedTag("Since") { group { +"0.11" } }
+ unnamedTag("Author") { comment { +"Kordyjan" } }
+ unnamedTag("Since") { comment { +"0.11" } }
}
}
}
@@ -537,8 +545,8 @@ class ContentForParamsTest : AbstractCoreTest() {
}
after {
group { pWrapped("comment to function") }
- unnamedTag("Author") { group { +"Kordyjan" } }
- unnamedTag("Since") { group { +"0.11" } }
+ unnamedTag("Author") { comment { +"Kordyjan" } }
+ unnamedTag("Since") { comment { +"0.11" } }
header(2) { +"Parameters" }
group {
diff --git a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt
index d5d1966d..a2c45f63 100644
--- a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt
+++ b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt
@@ -4,10 +4,7 @@ import matchers.content.*
import org.jetbrains.dokka.pages.ContentPage
import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
import org.junit.jupiter.api.Test
-import utils.ParamAttributes
-import utils.bareSignature
-import utils.pWrapped
-import utils.unnamedTag
+import utils.*
class ContentForSeeAlsoTest : AbstractCoreTest() {
private val testConfiguration = dokkaConfiguration {
@@ -320,9 +317,9 @@ class ContentForSeeAlsoTest : AbstractCoreTest() {
)
}
after {
- group { group { group { +"random comment"} } }
- unnamedTag("Author") { group { +"pikinier20" } }
- unnamedTag("Since") { group { +"0.11" } }
+ group { comment { +"random comment"} }
+ unnamedTag("Author") { comment { +"pikinier20" } }
+ unnamedTag("Since") { comment { +"0.11" } }
header(2) { +"See also" }
group {
diff --git a/plugins/base/src/test/kotlin/utils/contentUtils.kt b/plugins/base/src/test/kotlin/utils/contentUtils.kt
index 4cb3cfea..38d6450c 100644
--- a/plugins/base/src/test/kotlin/utils/contentUtils.kt
+++ b/plugins/base/src/test/kotlin/utils/contentUtils.kt
@@ -222,7 +222,14 @@ fun ContentMatcherBuilder<*>.pWrapped(text: String) =
fun ContentMatcherBuilder<*>.unnamedTag(tag: String, content: ContentMatcherBuilder<ContentGroup>.() -> Unit) =
group {
header(4) { +tag }
- group { content() }
+ content()
+ }
+
+fun ContentMatcherBuilder<*>.comment(content: ContentMatcherBuilder<ContentGroup>.() -> Unit) =
+ group {
+ group {
+ content()
+ }
}
fun ContentMatcherBuilder<*>.unwrapAnnotation(elem: Map.Entry<String, Set<String>>) {