aboutsummaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-11 18:44:53 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-11 18:44:53 +0400
commit35b64fb01d6b4da4b0dab840a787abc84d1bff06 (patch)
tree6733eeb9f157188d0b7f935e8fecaf97707b8139 /test/src
parentc540bc28a79092b212e575fa18d33399faee83b9 (diff)
downloaddokka-35b64fb01d6b4da4b0dab840a787abc84d1bff06.tar.gz
dokka-35b64fb01d6b4da4b0dab840a787abc84d1bff06.tar.bz2
dokka-35b64fb01d6b4da4b0dab840a787abc84d1bff06.zip
Build model using recursive visitor, include packages in model, add test for function with parameters, unify model and node.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/TopLevelFunctionTest.kt17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/src/TopLevelFunctionTest.kt b/test/src/TopLevelFunctionTest.kt
index a51b7bdd..dd88a1a0 100644
--- a/test/src/TopLevelFunctionTest.kt
+++ b/test/src/TopLevelFunctionTest.kt
@@ -7,8 +7,8 @@ import com.jetbrains.dokka.*
public class TopLevelFunctionTest {
Test fun function() {
- verifyFiles("test/data/function.kt") { model ->
- val item = model.nodes.single()
+ verifyFiles("test/data/functions/function.kt") { model ->
+ val item = model.nodes.single().members.single()
assertEquals(DocumentationNodeKind.Function, item.kind)
assertEquals("fn", item.name)
assertEquals("doc", item.doc)
@@ -17,4 +17,17 @@ public class TopLevelFunctionTest {
assertTrue(item.links.none())
}
}
+
+ Test fun functionWithParams() {
+ verifyFiles("test/data/functions/functionWithParams.kt") { model ->
+ val item = model.nodes.single().members.single()
+ assertEquals(DocumentationNodeKind.Function, item.kind)
+ assertEquals("function", item.name)
+ assertEquals("doc", item.doc)
+ assertEquals("x", item.details.single().name)
+
+ assertTrue(item.members.none())
+ assertTrue(item.links.none())
+ }
+ }
} \ No newline at end of file