aboutsummaryrefslogtreecommitdiff
path: root/test/src/model/ClassTest.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2014-12-30 16:34:47 +0100
committerDmitry Jemerov <intelliyole@gmail.com>2014-12-30 16:34:47 +0100
commit5f47bc17630ef1457b36054dc8b19011d9d14132 (patch)
tree876215d35aa29f49d25645ad92edfe190f3364e6 /test/src/model/ClassTest.kt
parent7db96f8da4317cd290ccc9f988c534f10923dbbb (diff)
parent3fc3e33a0eff0198ed89cc94197cb21653bf1ca2 (diff)
downloaddokka-5f47bc17630ef1457b36054dc8b19011d9d14132.tar.gz
dokka-5f47bc17630ef1457b36054dc8b19011d9d14132.tar.bz2
dokka-5f47bc17630ef1457b36054dc8b19011d9d14132.zip
Merge pull request #8 from orangy/class-object
Include class object properties and functions in the list of class members
Diffstat (limited to 'test/src/model/ClassTest.kt')
-rw-r--r--test/src/model/ClassTest.kt32
1 files changed, 31 insertions, 1 deletions
diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt
index 65363c92..b95a31dc 100644
--- a/test/src/model/ClassTest.kt
+++ b/test/src/model/ClassTest.kt
@@ -136,4 +136,34 @@ public class ClassTest {
}
}
}
-} \ No newline at end of file
+
+ Test fun classWithClassObject() {
+ verifyModel("test/data/classes/classWithClassObject.kt") { model ->
+ with(model.members.single().members.single()) {
+ assertEquals(DocumentationNode.Kind.Class, kind)
+ assertEquals("Klass", name)
+ assertEquals(Content.Empty, content)
+ assertEquals(2, details.count())
+ assertTrue(links.none())
+
+ assertEquals(3, members.count())
+ with(members.elementAt(0)) {
+ assertEquals("<init>", name)
+ assertEquals(Content.Empty, content)
+ }
+ with(members.elementAt(1)) {
+ assertEquals("x", name)
+ assertEquals(DocumentationNode.Kind.ClassObjectProperty, kind)
+ assertTrue(members.none())
+ assertTrue(links.none())
+ }
+ with(members.elementAt(2)) {
+ assertEquals("foo", name)
+ assertEquals(DocumentationNode.Kind.ClassObjectFunction, kind)
+ assertTrue(members.none())
+ assertTrue(links.none())
+ }
+ }
+ }
+ }
+}