diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-11 22:09:41 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-11 22:09:41 +0400 |
commit | b511259a37aa9feee06a3ca92b7967552aa34104 (patch) | |
tree | 683946a6e0868c10e95f814ec8996b99a9fab08d /test/src/model/FunctionTest.kt | |
parent | c0f820f4a4dfddbee06cb4c62a3b4609611dac62 (diff) | |
download | dokka-b511259a37aa9feee06a3ca92b7967552aa34104.tar.gz dokka-b511259a37aa9feee06a3ca92b7967552aa34104.tar.bz2 dokka-b511259a37aa9feee06a3ca92b7967552aa34104.zip |
Support type parameters for functions and classes.
Diffstat (limited to 'test/src/model/FunctionTest.kt')
-rw-r--r-- | test/src/model/FunctionTest.kt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt index 528166e6..c2a444b9 100644 --- a/test/src/model/FunctionTest.kt +++ b/test/src/model/FunctionTest.kt @@ -18,6 +18,28 @@ public class FunctionTest { } } + Test fun genericFunction() { + verifyModel("test/data/functions/genericFunction.kt") { model -> + with(model.nodes.single().members.single()) { + assertEquals("generic", name) + assertEquals(DocumentationNodeKind.Function, kind) + assertEquals("generic function", doc) + + with(details.single()) { + assertEquals("T", name) + assertEquals(DocumentationNodeKind.TypeParameter, kind) + assertEquals("", doc) + assertTrue(details.none()) + assertTrue(members.none()) + assertTrue(links.none()) + } + + assertTrue(members.none()) + assertTrue(links.none()) + } + } + } + Test fun functionWithParams() { verifyModel("test/data/functions/functionWithParams.kt") { model -> with(model.nodes.single().members.single()) { |