aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/signatures/SignatureUtils.kt
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-08-26 12:09:05 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-27 17:35:04 +0200
commit17f3fea789abe3d6fb03eec361ebac5d78a2f9fd (patch)
tree4fc1d8d6ec3344dc51dee7d124058287cf1e21ad /plugins/base/src/test/kotlin/signatures/SignatureUtils.kt
parentb05eb93d345cccd0cae9393f99acd428012d1106 (diff)
downloaddokka-17f3fea789abe3d6fb03eec361ebac5d78a2f9fd.tar.gz
dokka-17f3fea789abe3d6fb03eec361ebac5d78a2f9fd.tar.bz2
dokka-17f3fea789abe3d6fb03eec361ebac5d78a2f9fd.zip
Add tests to ensure variance
Diffstat (limited to 'plugins/base/src/test/kotlin/signatures/SignatureUtils.kt')
-rw-r--r--plugins/base/src/test/kotlin/signatures/SignatureUtils.kt12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/signatures/SignatureUtils.kt b/plugins/base/src/test/kotlin/signatures/SignatureUtils.kt
new file mode 100644
index 00000000..e77b8757
--- /dev/null
+++ b/plugins/base/src/test/kotlin/signatures/SignatureUtils.kt
@@ -0,0 +1,12 @@
+package signatures
+
+import org.jsoup.Jsoup
+import org.jsoup.nodes.Element
+import utils.TestOutputWriter
+
+fun TestOutputWriter.renderedContent(path: String = "root/example.html") =
+ contents.getValue(path).let { Jsoup.parse(it) }.select("#content")
+ .single()
+
+fun Element.signature() = select("div.symbol.monospace")
+fun Element.firstSignature() = signature().first() \ No newline at end of file