diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2022-04-19 13:11:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-19 13:11:38 +0300 |
commit | 3d573827230e7a750c002cf416cf9231161dd9b3 (patch) | |
tree | 9da32e97873536db521974a004929cbb0c8a29df /plugins/base/base-test-utils | |
parent | 2a0ed52ff33c2ea38cf2bbd439a8b5af9f692d04 (diff) | |
download | dokka-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')
-rw-r--r-- | plugins/base/base-test-utils/api/base-test-utils.api | 1 | ||||
-rw-r--r-- | plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/base/base-test-utils/api/base-test-utils.api b/plugins/base/base-test-utils/api/base-test-utils.api index a0b535f2..6a31e468 100644 --- a/plugins/base/base-test-utils/api/base-test-utils.api +++ b/plugins/base/base-test-utils/api/base-test-utils.api @@ -95,6 +95,7 @@ public final class signatures/Parameters : utils/Tag { public final class signatures/SignatureUtilsKt { public static final fun firstSignature (Lorg/jsoup/nodes/Element;)Lorg/jsoup/nodes/Element; + public static final fun lastSignature (Lorg/jsoup/nodes/Element;)Lorg/jsoup/nodes/Element; public static final fun renderedContent (Lutils/TestOutputWriter;Ljava/lang/String;)Lorg/jsoup/nodes/Element; public static synthetic fun renderedContent$default (Lutils/TestOutputWriter;Ljava/lang/String;ILjava/lang/Object;)Lorg/jsoup/nodes/Element; public static final fun signature (Lorg/jsoup/nodes/Element;)Lorg/jsoup/select/Elements; 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 |