aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt7
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt10
-rw-r--r--testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt3
3 files changed, 13 insertions, 7 deletions
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt
index ff254f99..68b45678 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/AbstractJavadocTemplateMapTest.kt
@@ -1,10 +1,9 @@
package org.jetbrains.dokka.javadoc
+import org.jetbrains.dokka.DokkaConfigurationImpl
import org.jetbrains.dokka.javadoc.pages.JavadocPageNode
import org.jetbrains.dokka.javadoc.pages.preprocessors
import org.jetbrains.dokka.javadoc.renderer.JavadocContentToTemplateMapTranslator
-import org.jetbrains.dokka.DokkaConfigurationImpl
-import org.jetbrains.dokka.javadoc.JavadocPlugin
import org.jetbrains.dokka.model.withDescendants
import org.jetbrains.dokka.pages.RootPageNode
import org.jetbrains.dokka.plugability.DokkaContext
@@ -20,6 +19,10 @@ internal abstract class AbstractJavadocTemplateMapTest : AbstractCoreTest() {
sourceSet {
sourceRoots = listOf("src")
analysisPlatform = "jvm"
+ externalDocumentationLinks = listOf(
+ externalDocumentationLink("https://docs.oracle.com/javase/8/docs/api/"),
+ externalDocumentationLink("https://kotlinlang.org/api/latest/jvm/stdlib/")
+ )
}
}
}
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt
index 1e161666..2ae5302d 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt
@@ -93,7 +93,7 @@ internal class JavadocClasslikeTemplateMapTest : AbstractJavadocTemplateMapTest(
0, assertIsInstance<List<*>>(method["parameters"]).size,
"Expected no parameters"
)
- assertEquals("final String", method.modifiers())
+ assertEquals("final <a href=https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>String</a>", method.modifiers())
assertEquals("<a href=TestClass.html#testFunction()>testFunction</a>()", method.signatureWithoutModifiers())
}
}
@@ -257,19 +257,19 @@ internal class JavadocClasslikeTemplateMapTest : AbstractJavadocTemplateMapTest(
assertParameterNode(
node = first,
expectedName = "simple",
- expectedType = "String",
+ expectedType = "<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>String</a>",
expectedDescription = "simple String parameter"
)
assertParameterNode(
node = second,
expectedName = "parameters",
- expectedType = "Integer",
+ expectedType = "<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html>Integer</a>",
expectedDescription = "simple Integer parameter"
)
assertParameterNode(
node = third,
expectedName = "list",
- expectedType = "Boolean",
+ expectedType = "<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html>Boolean</a>",
expectedDescription = "simple Boolean parameter"
)
}
@@ -305,7 +305,7 @@ internal class JavadocClasslikeTemplateMapTest : AbstractJavadocTemplateMapTest(
assertEquals("Generic", map["name"])
assertEquals(
- "public final class <a href=Generic.html>Generic</a>&lt;T extends Serializable&gt;",
+ "public final class <a href=Generic.html>Generic</a>&lt;T extends <a href=https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html>Serializable</a>&gt;",
map.signatureWithModifiers()
)
val methods = assertIsInstance<Map<Any, Any?>>(map["methods"])
diff --git a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
index 333642b1..0b3a6058 100644
--- a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
+++ b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
@@ -246,6 +246,9 @@ abstract class AbstractCoreTest(
)
}
+ fun externalDocumentationLink(url: String, packageListUrl: String? = null) =
+ DokkaConfiguration.ExternalDocumentationLink.Builder(url, packageListUrl).build() as ExternalDocumentationLinkImpl
+
protected val jvmStdlibPath: String? by lazy {
PathManager.getResourceRoot(Strictfp::class.java, "/kotlin/jvm/Strictfp.class")
}