aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/base-test-utils/src/main/kotlin/renderers
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2022-04-19 13:11:38 +0300
committerGitHub <noreply@github.com>2022-04-19 13:11:38 +0300
commit3d573827230e7a750c002cf416cf9231161dd9b3 (patch)
tree9da32e97873536db521974a004929cbb0c8a29df /plugins/base/base-test-utils/src/main/kotlin/renderers
parent2a0ed52ff33c2ea38cf2bbd439a8b5af9f692d04 (diff)
downloaddokka-3d573827230e7a750c002cf416cf9231161dd9b3.tar.gz
dokka-3d573827230e7a750c002cf416cf9231161dd9b3.tar.bz2
dokka-3d573827230e7a750c002cf416cf9231161dd9b3.zip
Update Jsoup to 1.14.3 (#2448)
* Update Jsoup to 1.14.3 * Fix Jsoup API breaking changes after the update * Fix new Qodana inspections * Replace IllegalStateException with more appropriate NoSuchElementException
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.kt3
1 files changed, 2 insertions, 1 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 1d725398..3397b2b4 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
@@ -11,7 +11,8 @@ fun TestOutputWriter.renderedContent(path: String = "root/example.html"): Elemen
.single()
fun Element.signature(): Elements = select("div.symbol.monospace")
-fun Element.firstSignature(): Element = signature().first()
+fun Element.firstSignature(): Element = signature().first() ?: throw NoSuchElementException("No signature found")
+fun Element.lastSignature(): Element = signature().last() ?: throw NoSuchElementException("No signature found")
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