aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc/src/test/kotlin
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-08-21 15:26:17 +0200
committerBłażej Kardyś <bkardys@virtuslab.com>2020-08-21 15:48:01 +0200
commit39b64feead5718ae9d3e4293407cf0858057493a (patch)
tree0c33c8ee5d213004f3fce9846448bb56e9d026b1 /plugins/javadoc/src/test/kotlin
parentfaf621b643ad2b4b7103d921d4a2d9d4838a21d6 (diff)
downloaddokka-39b64feead5718ae9d3e4293407cf0858057493a.tar.gz
dokka-39b64feead5718ae9d3e4293407cf0858057493a.tar.bz2
dokka-39b64feead5718ae9d3e4293407cf0858057493a.zip
Adding missing deprecated exception section to Deprecated page
Diffstat (limited to 'plugins/javadoc/src/test/kotlin')
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt26
1 files changed, 25 insertions, 1 deletions
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt
index 97865c0f..982d356a 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt
@@ -10,7 +10,7 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
@Test
fun `generates correct number of sections`() {
testDeprecatedPageTemplateMaps { templateMap ->
- Assertions.assertEquals(5, (templateMap["sections"] as List<TemplateMap>).size)
+ Assertions.assertEquals(6, (templateMap["sections"] as List<TemplateMap>).size)
}
}
@@ -47,6 +47,14 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
}
@Test
+ fun `finds correct number of deprecated exceptions`() {
+ testDeprecatedPageTemplateMaps { templateMap ->
+ val map = templateMap.section("Exceptions")
+ Assertions.assertEquals(2, map.elements().size)
+ }
+ }
+
+ @Test
fun `finds correct number of deprecated methods`() {
testDeprecatedPageTemplateMaps { templateMap ->
//We are checking whether we will have an additional function for enum classes
@@ -133,6 +141,22 @@ internal class JavadocDeprecatedTest : AbstractJavadocTemplateMapTest() {
@Deprecated(forRemoval = true)
public void deprecatedMethod() {}
}
+
+ /src/source5.java
+ package package1;
+ /**
+ * Documentation for ClassJavaException
+ */
+ @Deprecated
+ public class ClassJavaException extends Exception { }
+
+ /src/source6.kt
+ package package1
+ /**
+ * Documentation for ClassKotlinException
+ */
+ @Deprecated
+ class ClassKotlinException: Exception() {}
""".trimIndent()
private fun testDeprecatedPageTemplateMaps(operation: (TemplateMap) -> Unit) =