aboutsummaryrefslogtreecommitdiff
path: root/test/src/ClassTest.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-11 20:07:35 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-11 20:07:35 +0400
commitcc008898485627a805c8275dede9883529712cb9 (patch)
treef4759bbb7f751336b22755689971a27468eeca40 /test/src/ClassTest.kt
parente4a6e2d908b285a3a92a65d99322f810fb5ff37d (diff)
downloaddokka-cc008898485627a805c8275dede9883529712cb9.tar.gz
dokka-cc008898485627a805c8275dede9883529712cb9.tar.bz2
dokka-cc008898485627a805c8275dede9883529712cb9.zip
Process properties in classes without accessors
Diffstat (limited to 'test/src/ClassTest.kt')
-rw-r--r--test/src/ClassTest.kt41
1 files changed, 39 insertions, 2 deletions
diff --git a/test/src/ClassTest.kt b/test/src/ClassTest.kt
index 348e74d4..328cc358 100644
--- a/test/src/ClassTest.kt
+++ b/test/src/ClassTest.kt
@@ -31,13 +31,18 @@ public class ClassTest {
with(members.elementAt(0)) {
assertEquals("<init>", name)
assertEquals("", doc)
+ assertEquals(DocumentationNodeKind.Constructor, kind)
assertEquals(1, details.count())
with(details.elementAt(0)) {
assertEquals("name", name)
+ assertEquals(DocumentationNodeKind.Parameter, kind)
assertEquals("", doc)
+ assertTrue(details.none())
+ assertTrue(links.none())
+ assertTrue(members.none())
}
- assertTrue(members.none())
assertTrue(links.none())
+ assertTrue(members.none())
}
}
}
@@ -56,13 +61,45 @@ public class ClassTest {
with(members.elementAt(0)) {
assertEquals("<init>", name)
assertEquals("", doc)
+ assertEquals(DocumentationNodeKind.Constructor, kind)
assertTrue(details.none())
- assertTrue(members.none())
assertTrue(links.none())
+ assertTrue(members.none())
}
with(members.elementAt(1)) {
assertEquals("fn", name)
assertEquals("", doc)
+ assertEquals(DocumentationNodeKind.Function, kind)
+ assertTrue(details.none())
+ assertTrue(links.none())
+ assertTrue(members.none())
+ }
+ }
+ }
+ }
+
+ Test fun classWithProperty() {
+ verifyModel("test/data/classes/classWithProperty.kt") { model ->
+ with(model.nodes.single().members.single()) {
+ assertEquals(DocumentationNodeKind.Class, kind)
+ assertEquals("Klass", name)
+ assertEquals("", doc)
+ assertTrue(details.none())
+ assertTrue(links.none())
+
+ assertEquals(2, members.count())
+ with(members.elementAt(0)) {
+ assertEquals("<init>", name)
+ assertEquals("", doc)
+ assertEquals(DocumentationNodeKind.Constructor, kind)
+ assertTrue(details.none())
+ assertTrue(members.none())
+ assertTrue(links.none())
+ }
+ with(members.elementAt(1)) {
+ assertEquals("name", name)
+ assertEquals("", doc)
+ assertEquals(DocumentationNodeKind.Property, kind)
assertTrue(details.none())
assertTrue(members.none())
assertTrue(links.none())