aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test
diff options
context:
space:
mode:
authorAndrzej Ratajczak <32793002+BarkingBad@users.noreply.github.com>2020-10-05 18:14:27 +0200
committerGitHub <noreply@github.com>2020-10-05 18:14:27 +0200
commit9eeaa967e526e7beae4de9c9b8b09ce26ff00293 (patch)
tree3fe2d30598ad1cf20bc270bc8156076311f7a908 /plugins/base/src/test
parent0235c0ee12deaffed1d69ebaad86d24e5e48d9df (diff)
downloaddokka-9eeaa967e526e7beae4de9c9b8b09ce26ff00293.tar.gz
dokka-9eeaa967e526e7beae4de9c9b8b09ce26ff00293.tar.bz2
dokka-9eeaa967e526e7beae4de9c9b8b09ce26ff00293.zip
Fix vararg signatures (#1516)
Diffstat (limited to 'plugins/base/src/test')
-rw-r--r--plugins/base/src/test/kotlin/signatures/SignatureTest.kt18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/signatures/SignatureTest.kt b/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
index b8be54aa..f8c17794 100644
--- a/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
+++ b/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
@@ -179,6 +179,24 @@ class SignatureTest : AbstractCoreTest() {
}
@Test
+ fun `fun with vararg`() {
+ val source = source("fun simpleFun(vararg params: Int): Unit")
+ val writerPlugin = TestOutputWriterPlugin()
+
+ testInline(
+ source,
+ configuration,
+ pluginOverrides = listOf(writerPlugin)
+ ) {
+ renderingStage = { _, _ ->
+ writerPlugin.writer.renderedContent("root/example/simple-fun.html").firstSignature().match(
+ "fun ", A("simpleFun"), "(vararg params: ", A("Int"), ")", Span()
+ )
+ }
+ }
+ }
+
+ @Test
fun `class with no supertype`() {
val source = source("class SimpleClass")
val writerPlugin = TestOutputWriterPlugin()