aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/model
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2020-12-03 12:39:39 +0100
committerGitHub <noreply@github.com>2020-12-03 12:39:39 +0100
commit6b383541d110ba4f32c9c9ae6c0af8aeeedd0b80 (patch)
tree57963d77754ab2b0de7eb5abe74b0c1ffd9fc825 /plugins/base/src/test/kotlin/model
parent80d8991fc572bd145e873ae368dca0b201e069cf (diff)
downloaddokka-6b383541d110ba4f32c9c9ae6c0af8aeeedd0b80.tar.gz
dokka-6b383541d110ba4f32c9c9ae6c0af8aeeedd0b80.tar.bz2
dokka-6b383541d110ba4f32c9c9ae6c0af8aeeedd0b80.zip
Resolve DRI-s from valueOf and values in java enum (#1655)
Diffstat (limited to 'plugins/base/src/test/kotlin/model')
-rw-r--r--plugins/base/src/test/kotlin/model/JavaTest.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/model/JavaTest.kt b/plugins/base/src/test/kotlin/model/JavaTest.kt
index 51d7556c..18927218 100644
--- a/plugins/base/src/test/kotlin/model/JavaTest.kt
+++ b/plugins/base/src/test/kotlin/model/JavaTest.kt
@@ -2,6 +2,8 @@ package model
import org.jetbrains.dokka.base.transformers.documentables.InheritorsInfo
import org.jetbrains.dokka.links.DRI
+import org.jetbrains.dokka.links.JavaClassReference
+import org.jetbrains.dokka.links.PointingToDeclaration
import org.jetbrains.dokka.links.sureClassNames
import org.jetbrains.dokka.model.*
import org.jetbrains.dokka.model.doc.Param
@@ -11,6 +13,7 @@ import org.junit.jupiter.api.Test
import utils.AbstractModelTest
import utils.assertNotNull
import utils.name
+import org.jetbrains.dokka.links.Callable as DRICallable
class JavaTest : AbstractModelTest("/src/main/kotlin/java/Test.java", "java") {
@@ -312,6 +315,10 @@ class JavaTest : AbstractModelTest("/src/main/kotlin/java/Test.java", "java") {
with((this / "java" / "E").cast<DEnum>()) {
name equals "E"
entries counts 1
+ functions.sortedBy { it.name }.map { it.dri } equals listOf(
+ DRI("java", "E", DRICallable("valueOf", null, listOf(JavaClassReference("java.lang.String"))), PointingToDeclaration),
+ DRI("java", "E", DRICallable("values", null, emptyList()), PointingToDeclaration),
+ )
with((this / "Foo").cast<DEnumEntry>()) {
name equals "Foo"