diff options
author | Marcin Aman <maman@virtuslab.com> | 2020-07-22 13:27:31 +0200 |
---|---|---|
committer | Kamil Doległo <9080183+kamildoleglo@users.noreply.github.com> | 2020-07-22 18:26:32 +0200 |
commit | 189bc1e2a9110a945afa8c36f2ffa0c9ef4c4d56 (patch) | |
tree | 3b8298639a51ae252590b7fb51b26a13ba88e7c0 /plugins/base/src/test/kotlin | |
parent | 12526287c6f87ac57883a23c9924bfe0f4e71286 (diff) | |
download | dokka-189bc1e2a9110a945afa8c36f2ffa0c9ef4c4d56.tar.gz dokka-189bc1e2a9110a945afa8c36f2ffa0c9ef4c4d56.tar.bz2 dokka-189bc1e2a9110a945afa8c36f2ffa0c9ef4c4d56.zip |
Rename constructors to a classname
Diffstat (limited to 'plugins/base/src/test/kotlin')
3 files changed, 6 insertions, 5 deletions
diff --git a/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt b/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt index 7de48664..90a38055 100644 --- a/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt +++ b/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt @@ -174,13 +174,13 @@ class ConstructorsSignaturesTest : AbstractCoreTest() { header { +"Constructors" } table { group { - link { +"<init>" } + link { +"SomeClass" } functionSignature( annotations = emptyMap(), visibility = "", modifier = "", keywords = emptySet(), - name = "<init>" + name = "SomeClass" ) } } @@ -226,7 +226,7 @@ class ConstructorsSignaturesTest : AbstractCoreTest() { header { +"Constructors" } table { group { - link { +"<init>" } + link { +"SomeClass" } platformHinted { group { group { @@ -235,7 +235,7 @@ class ConstructorsSignaturesTest : AbstractCoreTest() { } group { +"fun" - link { +"<init>" } + link { +"SomeClass" } +"(a:" group { link { +"String" } diff --git a/plugins/base/src/test/kotlin/model/ClassesTest.kt b/plugins/base/src/test/kotlin/model/ClassesTest.kt index 5dc8812e..1bf55235 100644 --- a/plugins/base/src/test/kotlin/model/ClassesTest.kt +++ b/plugins/base/src/test/kotlin/model/ClassesTest.kt @@ -332,7 +332,7 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class name equals "C" constructors counts 2 - constructors.map { it.name } allEquals "<init>" + constructors.map { it.name } allEquals "C" with(constructors.find { it.parameters.isNullOrEmpty() } notNull "C()") { parameters counts 0 diff --git a/plugins/base/src/test/kotlin/model/JavaTest.kt b/plugins/base/src/test/kotlin/model/JavaTest.kt index 1f042304..237131d3 100644 --- a/plugins/base/src/test/kotlin/model/JavaTest.kt +++ b/plugins/base/src/test/kotlin/model/JavaTest.kt @@ -161,6 +161,7 @@ class JavaTest : AbstractModelTest("/src/main/kotlin/java/Test.java", "java") { name equals "Test" constructors counts 2 + constructors.forEach { it.name equals "Test" } constructors.find { it.parameters.isNullOrEmpty() }.assertNotNull("Test()") with(constructors.find { it.parameters.isNotEmpty() }.assertNotNull("Test(String)")) { |