aboutsummaryrefslogtreecommitdiff
path: root/test/src/model/FunctionTest.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-11 22:25:01 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-11 22:25:01 +0400
commit09935fc1657670eaa8beb1b56718ed267404d7db (patch)
treed43ad32d8a29fa0e0d73de641b4f459463b16e30 /test/src/model/FunctionTest.kt
parentb511259a37aa9feee06a3ca92b7967552aa34104 (diff)
downloaddokka-09935fc1657670eaa8beb1b56718ed267404d7db.tar.gz
dokka-09935fc1657670eaa8beb1b56718ed267404d7db.tar.bz2
dokka-09935fc1657670eaa8beb1b56718ed267404d7db.zip
Support type parameter constraints as type parameter details.
Diffstat (limited to 'test/src/model/FunctionTest.kt')
-rw-r--r--test/src/model/FunctionTest.kt28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt
index c2a444b9..20ae390c 100644
--- a/test/src/model/FunctionTest.kt
+++ b/test/src/model/FunctionTest.kt
@@ -39,6 +39,34 @@ public class FunctionTest {
}
}
}
+ Test fun genericFunctionWithConstraints() {
+ verifyModel("test/data/functions/genericFunctionWithConstraints.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)
+ with(details.single()) {
+ assertEquals("CharSequence", name)
+ assertEquals(DocumentationNodeKind.UpperBound, kind)
+ assertEquals("", doc)
+ assertTrue(details.none())
+ assertTrue(members.none())
+ assertTrue(links.none())
+ }
+ assertTrue(members.none())
+ assertTrue(links.none())
+ }
+
+ assertTrue(members.none())
+ assertTrue(links.none())
+ }
+ }
+ }
Test fun functionWithParams() {
verifyModel("test/data/functions/functionWithParams.kt") { model ->