aboutsummaryrefslogtreecommitdiff
path: root/test/src/model/ClassTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/model/ClassTest.kt')
-rw-r--r--test/src/model/ClassTest.kt11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt
index 61af5361..0a8fc147 100644
--- a/test/src/model/ClassTest.kt
+++ b/test/src/model/ClassTest.kt
@@ -253,4 +253,15 @@ public class ClassTest {
assertEquals(1, extensions.size())
}
}
+
+ Test fun secondaryConstructor() {
+ verifyPackageMember("test/data/classes/secondaryConstructor.kt") { cls ->
+ val constructors = cls.members(DocumentationNode.Kind.Constructor)
+ assertEquals(2, constructors.size())
+ with (constructors.first { it.details(DocumentationNode.Kind.Parameter).size()== 1}) {
+ assertEquals("<init>", name)
+ assertEquals("This is a secondary constructor.", summary.toTestString())
+ }
+ }
+ }
}