aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/Kotlin/DocumentationBuilder.kt1
-rw-r--r--core/src/test/kotlin/format/MarkdownFormatTest.kt4
-rw-r--r--core/src/test/kotlin/model/FunctionTest.kt14
3 files changed, 13 insertions, 6 deletions
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
index 177c6f50..856127d3 100644
--- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
@@ -726,6 +726,7 @@ class DocumentationBuilder
}
node.appendType(constraint, NodeKind.UpperBound)
}
+ register(this, node)
return node
}
diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt
index 5fbd80fb..a2891c47 100644
--- a/core/src/test/kotlin/format/MarkdownFormatTest.kt
+++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt
@@ -388,6 +388,10 @@ class MarkdownFormatTest {
verifyMarkdownNodeByName("extensionScope", "test")
}
+ @Test fun typeParameterReference() {
+ verifyMarkdownNode("typeParameterReference")
+ }
+
private fun buildMultiplePlatforms(path: String): DocumentationModule {
val module = DocumentationModule("test")
val options = DocumentationOptions("", "html", generateIndexPages = false, noStdlibLink = true)
diff --git a/core/src/test/kotlin/model/FunctionTest.kt b/core/src/test/kotlin/model/FunctionTest.kt
index 065decef..32910682 100644
--- a/core/src/test/kotlin/model/FunctionTest.kt
+++ b/core/src/test/kotlin/model/FunctionTest.kt
@@ -5,6 +5,7 @@ import org.jetbrains.dokka.NodeKind
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
+import kotlin.test.assertNotNull
class FunctionTest {
@Test fun function() {
@@ -83,9 +84,10 @@ class FunctionTest {
assertEquals(NodeKind.Function, kind)
assertEquals("generic function", content.summary.toTestString())
- assertEquals("public", details.elementAt(0).name)
- assertEquals("final", details.elementAt(1).name)
- with(details.elementAt(3)) {
+ val functionDetails = details
+ assertEquals("public", functionDetails.elementAt(0).name)
+ assertEquals("final", functionDetails.elementAt(1).name)
+ with(functionDetails.elementAt(3)) {
assertEquals("T", name)
assertEquals(NodeKind.TypeParameter, kind)
assertEquals(Content.Empty, content)
@@ -95,19 +97,19 @@ class FunctionTest {
assertEquals(Content.Empty, content)
assertTrue(details.none())
assertTrue(members.none())
- assertTrue(links.none())
+ assertTrue(links.singleOrNull() == functionDetails.elementAt(4))
}
assertTrue(members.none())
assertTrue(links.none())
}
- with(details.elementAt(4)) {
+ with(functionDetails.elementAt(4)) {
assertEquals("R", name)
assertEquals(NodeKind.TypeParameter, kind)
assertEquals(Content.Empty, content)
assertTrue(members.none())
assertTrue(links.none())
}
- assertEquals("Unit", details.elementAt(5).name)
+ assertEquals("Unit", functionDetails.elementAt(5).name)
assertTrue(members.none())
assertTrue(links.none())