aboutsummaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2014-12-29 20:50:26 +0100
committerDmitry Jemerov <yole@jetbrains.com>2014-12-29 20:57:25 +0100
commitcedaeb48615cf6f9aae3cbcd3917e9827ca5e67f (patch)
tree00358b0477c93a3fd3f1d09ce81d9028dddfc145 /test/src
parent7db96f8da4317cd290ccc9f988c534f10923dbbb (diff)
downloaddokka-cedaeb48615cf6f9aae3cbcd3917e9827ca5e67f.tar.gz
dokka-cedaeb48615cf6f9aae3cbcd3917e9827ca5e67f.tar.bz2
dokka-cedaeb48615cf6f9aae3cbcd3917e9827ca5e67f.zip
put class object functions and properties in main class block
Diffstat (limited to 'test/src')
-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())
+ }
+ }
+ }
+ }
+}