aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/markdown
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-08-19 12:57:38 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-08-20 15:36:07 +0200
commit45bec5b68c2da35860877c6298bff04a4cb3d1d6 (patch)
treed99b27e6c6100ef93c2989caac66b55ef3ba3e21 /plugins/base/src/test/kotlin/markdown
parente4fc2c274fd982b2742eac46581b504b56b2b48f (diff)
downloaddokka-45bec5b68c2da35860877c6298bff04a4cb3d1d6.tar.gz
dokka-45bec5b68c2da35860877c6298bff04a4cb3d1d6.tar.bz2
dokka-45bec5b68c2da35860877c6298bff04a4cb3d1d6.zip
Fix LinkProvider to link properly all nested generic parameters
Diffstat (limited to 'plugins/base/src/test/kotlin/markdown')
-rw-r--r--plugins/base/src/test/kotlin/markdown/LinkTest.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/base/src/test/kotlin/markdown/LinkTest.kt b/plugins/base/src/test/kotlin/markdown/LinkTest.kt
index 32cf01a8..deef1d2d 100644
--- a/plugins/base/src/test/kotlin/markdown/LinkTest.kt
+++ b/plugins/base/src/test/kotlin/markdown/LinkTest.kt
@@ -1,5 +1,6 @@
package markdown
+import org.jetbrains.dokka.model.WithGenerics
import org.jetbrains.dokka.model.dfs
import org.jetbrains.dokka.pages.ClasslikePageNode
import org.jetbrains.dokka.pages.ContentDRILink
@@ -70,9 +71,10 @@ class LinkTest : AbstractCoreTest() {
val root = rootPageNode.children.single().children.single() as ClasslikePageNode
val innerClass = root.children.first { it is ClasslikePageNode }
val foo = innerClass.children.first { it.name == "foo" } as MemberPageNode
+ val destinationDri = (root.documentable as WithGenerics).generics.first().dri.toString()
- assertEquals(root.dri.first().toString(), "[JVM root]/Outer///PointingToDeclaration/")
- assertNotNull(foo.content.dfs { it is ContentDRILink && it.address.toString() == root.dri.first().toString() } )
+ assertEquals(destinationDri, "[JVM root]/Outer///PointingToGenericParameters(0)/")
+ assertNotNull(foo.content.dfs { it is ContentDRILink && it.address.toString() == destinationDri } )
}
}
}