aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/data/functions/genericFunctionWithConstraints.kt2
-rw-r--r--test/src/model/FunctionTest.kt12
2 files changed, 11 insertions, 3 deletions
diff --git a/test/data/functions/genericFunctionWithConstraints.kt b/test/data/functions/genericFunctionWithConstraints.kt
index 11598ae7..dc7fa3bb 100644
--- a/test/data/functions/genericFunctionWithConstraints.kt
+++ b/test/data/functions/genericFunctionWithConstraints.kt
@@ -2,5 +2,5 @@
/**
* generic function
*/
-fun <T : CharSequence> generic() {
+fun <T : R, R> generic() {
} \ No newline at end of file
diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt
index 217e97f4..aa22ee0f 100644
--- a/test/src/model/FunctionTest.kt
+++ b/test/src/model/FunctionTest.kt
@@ -66,12 +66,13 @@ public class FunctionTest {
assertEquals(DocumentationNodeKind.Function, kind)
assertEquals("generic function", doc)
- with(details.single()) {
+ assertEquals(2, details.count())
+ with(details.elementAt(0)) {
assertEquals("T", name)
assertEquals(DocumentationNodeKind.TypeParameter, kind)
assertEquals("", doc)
with(details.single()) {
- assertEquals("CharSequence", name)
+ assertEquals("R", name)
assertEquals(DocumentationNodeKind.UpperBound, kind)
assertEquals("", doc)
assertTrue(details.none())
@@ -81,6 +82,13 @@ public class FunctionTest {
assertTrue(members.none())
assertTrue(links.none())
}
+ with(details.elementAt(1)) {
+ assertEquals("R", name)
+ assertEquals(DocumentationNodeKind.TypeParameter, kind)
+ assertEquals("", doc)
+ assertTrue(members.none())
+ assertTrue(links.none())
+ }
assertTrue(members.none())
assertTrue(links.none())