From cedaeb48615cf6f9aae3cbcd3917e9827ca5e67f Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 29 Dec 2014 20:50:26 +0100 Subject: put class object functions and properties in main class block --- test/src/model/ClassTest.kt | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'test/src/model') 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("", 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()) + } + } + } + } +} -- cgit