diff options
author | Goooler <wangzongler@gmail.com> | 2022-02-21 22:01:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 17:01:06 +0300 |
commit | f5b7797255576e5f1c230e2ca3fcb5f4e602387c (patch) | |
tree | 25fd98250066c4ed6c2fff1104be533604bbf1b9 /plugins/base/base-test-utils/src/main/kotlin/renderers | |
parent | df4780c31026aaa626746f49f0e6fa3fa0278a05 (diff) | |
download | dokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.tar.gz dokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.tar.bz2 dokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.zip |
Code cleanups (#2165)
Diffstat (limited to 'plugins/base/base-test-utils/src/main/kotlin/renderers')
-rw-r--r-- | plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt b/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt index ddaefd8c..1d725398 100644 --- a/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt +++ b/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt @@ -2,15 +2,16 @@ package signatures import org.jsoup.Jsoup import org.jsoup.nodes.Element +import org.jsoup.select.Elements import utils.Tag import utils.TestOutputWriter -fun TestOutputWriter.renderedContent(path: String = "root/example.html") = +fun TestOutputWriter.renderedContent(path: String = "root/example.html"): Element = contents.getValue(path).let { Jsoup.parse(it) }.select("#content") .single() -fun Element.signature() = select("div.symbol.monospace") -fun Element.firstSignature() = signature().first() +fun Element.signature(): Elements = select("div.symbol.monospace") +fun Element.firstSignature(): Element = signature().first() class Parameters(vararg matchers: Any) : Tag("span", *matchers, expectedClasses = listOf("parameters")) class Parameter(vararg matchers: Any) : Tag("span", *matchers, expectedClasses = listOf("parameter"))
\ No newline at end of file |