aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/utils
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/utils')
-rw-r--r--plugins/base/src/test/kotlin/utils/contentUtils.kt95
1 files changed, 51 insertions, 44 deletions
diff --git a/plugins/base/src/test/kotlin/utils/contentUtils.kt b/plugins/base/src/test/kotlin/utils/contentUtils.kt
index d38af3f4..4fce1155 100644
--- a/plugins/base/src/test/kotlin/utils/contentUtils.kt
+++ b/plugins/base/src/test/kotlin/utils/contentUtils.kt
@@ -1,9 +1,7 @@
package utils
import matchers.content.*
-import org.jetbrains.dokka.pages.ContentGroup
-import org.jetbrains.dokka.pages.ContentPage
-import org.jetbrains.dokka.pages.RootPageNode
+import org.jetbrains.dokka.pages.*
//TODO: Try to unify those functions after update to 1.4
fun ContentMatcherBuilder<*>.functionSignature(
@@ -197,35 +195,43 @@ fun ContentMatcherBuilder<*>.propertySignature(
header { +"Package-level declarations" }
skipAllNotMatching()
}
- group {
+ tabbedGroup {
group {
skipAllNotMatching()
- header { +"Properties" }
- table {
- group {
- link { +name }
- platformHinted {
- group {
- annotations.entries.forEach {
- group {
- unwrapAnnotation(it)
- }
- }
- if (visibility.isNotBlank()) +"$visibility "
- if (modifier.isNotBlank()) +"$modifier "
- +("${keywords.joinToString("") { "$it " }}$preposition ")
- link { +name }
- if (type != null) {
- +(": ")
- group {
- link {
- +(type)
+ tab(BasicTabbedContentType.PROPERTY) {
+ header{ + "Properties" }
+ table {
+ group {
+ link { +name }
+ divergentGroup {
+ divergentInstance {
+ divergent {
+ group {
+ group {
+ annotations.entries.forEach {
+ group {
+ unwrapAnnotation(it)
+ }
+ }
+ if (visibility.isNotBlank()) +"$visibility "
+ if (modifier.isNotBlank()) +"$modifier "
+ +("${keywords.joinToString("") { "$it " }}$preposition ")
+ link { +name }
+ if (type != null) {
+ +(": ")
+ group {
+ link {
+ +(type)
+ }
+ }
+ }
+ if (value != null) {
+ +(" = $value")
+ }
+ }
}
}
}
- if (value != null) {
- +(" = $value")
- }
}
}
}
@@ -242,39 +248,40 @@ fun ContentMatcherBuilder<*>.typealiasSignature(name: String, expressionTarget:
}
group {
group {
- skipAllNotMatching()
- header { +"Types" }
- table {
- group {
- link { +name }
- divergentGroup {
- divergentInstance {
- group {
+ tab(BasicTabbedContentType.TYPE) {
+ header{ + "Types" }
+ table {
+ group {
+ link { +name }
+ divergentGroup {
+ divergentInstance {
group {
group {
group {
- +"typealias "
group {
+ +"typealias "
group {
- link { +name }
+ group {
+ link { +name }
+ }
+ skipAllNotMatching()
+ }
+ +" = "
+ group {
+ link { +expressionTarget }
}
- skipAllNotMatching()
- }
- +" = "
- group {
- link { +expressionTarget }
}
}
}
}
}
+ skipAllNotMatching()
}
- skipAllNotMatching()
}
+ skipAllNotMatching()
}
skipAllNotMatching()
}
- skipAllNotMatching()
}
}
}