blob: f8328e35e3e80213b5b36cda2f06b26be25e4e57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
package basic
import org.jetbrains.dokka.links.*
import org.junit.Assert.assertEquals
import org.junit.Test
import testApi.testRunner.AbstractCoreTest
class DRITest: AbstractCoreTest() {
@Test
fun `#634`() {
val configuration = dokkaConfiguration {
passes {
pass {
sourceRoots = listOf("src/")
}
}
}
testInline(
"""
|/src/main/kotlin/basic/Test.kt
|package toplevel
|
|inline fun <T, R : Comparable<R>> Array<out T>.mySortBy(
| crossinline selector: (T) -> R?): Array<out T> = TODO()
|}
""".trimMargin(),
configuration
) {
documentablesMergingStage = { module ->
val expected = TypeConstructor("kotlin.Function1", listOf(
TypeParam(listOf(Nullable(TypeConstructor("kotlin.Any", emptyList())))),
Nullable(TypeParam(listOf(TypeConstructor("kotlin.Comparable", listOf(SelfType)))))
))
val actual = module.packages.single()
.functions.single()
.dri.callable?.params?.single()
assertEquals(expected, actual)
}
}
}
}
|