diff options
author | Andrey Tyrin <andrei.tyrin@jetbrains.com> | 2023-01-12 20:03:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 20:03:06 +0100 |
commit | 303c937a7c33fa9df5c28079c423ee071e87e410 (patch) | |
tree | 6849bd6114d2711fe49be4d9f06a7fc089399c38 /plugins/kotlin-as-java/src/test | |
parent | 8d1536bdbadbab7e1b89902b0cc920c36a6103ad (diff) | |
download | dokka-303c937a7c33fa9df5c28079c423ee071e87e410.tar.gz dokka-303c937a7c33fa9df5c28079c423ee071e87e410.tar.bz2 dokka-303c937a7c33fa9df5c28079c423ee071e87e410.zip |
Default Java constructor (#2795)
Diffstat (limited to 'plugins/kotlin-as-java/src/test')
-rw-r--r-- | plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt b/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt index b43cea05..24c58e8e 100644 --- a/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt +++ b/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt @@ -13,8 +13,13 @@ import org.jetbrains.kotlin.utils.addToStdlib.cast import org.junit.Assert import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test -import signatures.* -import utils.* +import signatures.Parameter +import signatures.Parameters +import signatures.firstSignature +import signatures.renderedContent +import utils.A +import utils.TestOutputWriterPlugin +import utils.match import kotlin.test.assertEquals class KotlinAsJavaPluginTest : BaseAbstractTest() { @@ -134,9 +139,18 @@ class KotlinAsJavaPluginTest : BaseAbstractTest() { } classes["TestJ"].let { - it?.children.orEmpty().assertCount(1, "(Java) TestJ members: ") - it!!.children.first() - .let { assert(it.name == "testF") { "(Java) Expected method name: testF, got: ${it.name}" } } + it?.children.orEmpty().assertCount(2, "(Java) TestJ members: ") // constructor + method + it!!.children.map { it.name } + .let { + assert( + it.containsAll( + setOf( + "testF", + "TestJ" + ) + ) + ) { "(Java) Expected method name: testF, got: $it" } + } } } } @@ -220,8 +234,9 @@ class KotlinAsJavaPluginTest : BaseAbstractTest() { val testClass = root.dfs { it.name == "TestJ" } as? ClasslikePageNode assert(testClass != null) (testClass!!.content as ContentGroup).children.last().assertNode { + skipAllNotMatching() group { - header(2){ + header(2) { +"Properties" } table { |