diff options
Diffstat (limited to 'plugins/javadoc/src/test')
-rw-r--r-- | plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocDeprecatedTest.kt | 26 |
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) = |