aboutsummaryrefslogtreecommitdiff
path: root/test/src/FunctionTest.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-11 20:16:27 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-11 20:16:27 +0400
commitf2f6fd9fa48aaa49e16eaa78b86be89e1a232ad7 (patch)
tree0f05fcea870074df16c7d2481ac52476d40c5fd5 /test/src/FunctionTest.kt
parentcc008898485627a805c8275dede9883529712cb9 (diff)
downloaddokka-f2f6fd9fa48aaa49e16eaa78b86be89e1a232ad7.tar.gz
dokka-f2f6fd9fa48aaa49e16eaa78b86be89e1a232ad7.tar.bz2
dokka-f2f6fd9fa48aaa49e16eaa78b86be89e1a232ad7.zip
Add top level property tests.
Diffstat (limited to 'test/src/FunctionTest.kt')
-rw-r--r--test/src/FunctionTest.kt13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/src/FunctionTest.kt b/test/src/FunctionTest.kt
index 2c0955d1..11cfbb6b 100644
--- a/test/src/FunctionTest.kt
+++ b/test/src/FunctionTest.kt
@@ -9,8 +9,8 @@ public class FunctionTest {
Test fun function() {
verifyModel("test/data/functions/function.kt") { model ->
with(model.nodes.single().members.single()) {
- assertEquals(DocumentationNodeKind.Function, kind)
assertEquals("fn", name)
+ assertEquals(DocumentationNodeKind.Function, kind)
assertEquals("Function fn", doc)
assertTrue(details.none())
assertTrue(members.none())
@@ -22,14 +22,19 @@ public class FunctionTest {
Test fun functionWithParams() {
verifyModel("test/data/functions/functionWithParams.kt") { model ->
with(model.nodes.single().members.single()) {
- assertEquals(DocumentationNodeKind.Function, kind)
assertEquals("function", name)
+ assertEquals(DocumentationNodeKind.Function, kind)
assertEquals("""Multiline
Function
Documentation"""
, doc)
- assertEquals("x", details.single().name)
- assertEquals(DocumentationNodeKind.Parameter, details.single().kind)
+ with(details.single()) {
+ assertEquals("x", name)
+ assertEquals(DocumentationNodeKind.Parameter, kind)
+ assertTrue(details.none())
+ assertTrue(members.none())
+ assertTrue(links.none())
+ }
assertTrue(members.none())
assertTrue(links.none())