aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/signatures
diff options
context:
space:
mode:
authorGoooler <wangzongler@gmail.com>2022-02-21 22:01:06 +0800
committerGitHub <noreply@github.com>2022-02-21 17:01:06 +0300
commitf5b7797255576e5f1c230e2ca3fcb5f4e602387c (patch)
tree25fd98250066c4ed6c2fff1104be533604bbf1b9 /plugins/base/src/test/kotlin/signatures
parentdf4780c31026aaa626746f49f0e6fa3fa0278a05 (diff)
downloaddokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.tar.gz
dokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.tar.bz2
dokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.zip
Code cleanups (#2165)
Diffstat (limited to 'plugins/base/src/test/kotlin/signatures')
-rw-r--r--plugins/base/src/test/kotlin/signatures/AbstractRenderingTest.kt13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/base/src/test/kotlin/signatures/AbstractRenderingTest.kt b/plugins/base/src/test/kotlin/signatures/AbstractRenderingTest.kt
index 171e510c..65ac1224 100644
--- a/plugins/base/src/test/kotlin/signatures/AbstractRenderingTest.kt
+++ b/plugins/base/src/test/kotlin/signatures/AbstractRenderingTest.kt
@@ -3,11 +3,13 @@ package signatures
import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
import org.jsoup.Jsoup
import org.jsoup.nodes.Element
+import org.jsoup.select.Elements
import utils.TestOutputWriterPlugin
+import java.nio.file.Path
import java.nio.file.Paths
abstract class AbstractRenderingTest : BaseAbstractTest() {
- val testDataDir = getTestDataDir("multiplatform/basicMultiplatformTest").toAbsolutePath()
+ val testDataDir: Path = getTestDataDir("multiplatform/basicMultiplatformTest").toAbsolutePath()
val configuration = dokkaConfiguration {
moduleName = "example"
@@ -42,11 +44,14 @@ abstract class AbstractRenderingTest : BaseAbstractTest() {
}
}
- fun TestOutputWriterPlugin.renderedContent(path: String) = writer.contents.getValue(path)
+ fun TestOutputWriterPlugin.renderedContent(path: String): Element = writer.contents.getValue(path)
.let { Jsoup.parse(it) }.select("#content").single()
- fun TestOutputWriterPlugin.renderedDivergentContent(path: String) = renderedContent(path).select("div.divergent-group")
- fun TestOutputWriterPlugin.renderedSourceDepenentContent(path: String) = renderedContent(path).select("div.sourceset-depenent-content")
+ fun TestOutputWriterPlugin.renderedDivergentContent(path: String): Elements =
+ renderedContent(path).select("div.divergent-group")
+
+ fun TestOutputWriterPlugin.renderedSourceDepenentContent(path: String): Elements =
+ renderedContent(path).select("div.sourceset-depenent-content")
val Element.brief: String
get() = children().select("p").text()