diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-13 17:55:18 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-13 17:55:18 +0100 |
commit | ce29c52ff50c592b724bb1ef1b06d3625679ebfa (patch) | |
tree | 4fa11e97b0752b372c262cb7c722d906ef01bd81 /test | |
parent | 2527b962c394511ef90d9d76fe66a39caeea436e (diff) | |
download | dokka-ce29c52ff50c592b724bb1ef1b06d3625679ebfa.tar.gz dokka-ce29c52ff50c592b724bb1ef1b06d3625679ebfa.tar.bz2 dokka-ce29c52ff50c592b724bb1ef1b06d3625679ebfa.zip |
handle Java constructors nicely
Diffstat (limited to 'test')
-rw-r--r-- | test/data/java/constructors.java | 7 | ||||
-rw-r--r-- | test/src/model/JavaTest.kt | 10 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/data/java/constructors.java b/test/data/java/constructors.java new file mode 100644 index 00000000..3b1838dd --- /dev/null +++ b/test/data/java/constructors.java @@ -0,0 +1,7 @@ +package test; + +class Test { + public Test() {} + + public Test(String s) {} +} diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt index 5c8163a3..ab417036 100644 --- a/test/src/model/JavaTest.kt +++ b/test/src/model/JavaTest.kt @@ -75,4 +75,14 @@ public class JavaTest { } } } + + Test fun constructors() { + verifyPackageMember("test/data/java/constructors.java") { cls -> + val constructors = cls.members(DocumentationNode.Kind.Constructor) + assertEquals(2, constructors.size()) + with(constructors[0]) { + assertEquals("<init>", name) + } + } + } } |