From 40e81322426a925f3fe88e867a8a0e9858847835 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Wed, 2 Nov 2016 16:05:47 +0300 Subject: Fix for GH #98 : Added tests, altered fix code for corner cases --- core/src/test/kotlin/javadoc/JavadocTest.kt | 11 +++++++++++ core/src/test/kotlin/model/JavaTest.kt | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'core/src/test') diff --git a/core/src/test/kotlin/javadoc/JavadocTest.kt b/core/src/test/kotlin/javadoc/JavadocTest.kt index 6c572c10..41d22b47 100644 --- a/core/src/test/kotlin/javadoc/JavadocTest.kt +++ b/core/src/test/kotlin/javadoc/JavadocTest.kt @@ -96,6 +96,17 @@ class JavadocTest { } } + @Test fun testSuppress() { + verifyJavadoc("testdata/javadoc/suppress.kt", withKotlinRuntime = true) { doc -> + assertNull(doc.classNamed("Some")) + assertNull(doc.classNamed("SomeAgain")) + assertNull(doc.classNamed("Interface")) + val classSame = doc.classNamed("Same")!! + assertTrue(classSame.fields().isEmpty()) + assertTrue(classSame.methods().isEmpty()) + } + } + private fun verifyJavadoc(name: String, withJdk: Boolean = false, withKotlinRuntime: Boolean = false, diff --git a/core/src/test/kotlin/model/JavaTest.kt b/core/src/test/kotlin/model/JavaTest.kt index a89b7a11..c0e68304 100644 --- a/core/src/test/kotlin/model/JavaTest.kt +++ b/core/src/test/kotlin/model/JavaTest.kt @@ -3,6 +3,7 @@ package org.jetbrains.dokka.tests import org.jetbrains.dokka.NodeKind import org.jetbrains.dokka.RefKind import org.junit.Assert.* +import org.junit.Ignore import org.junit.Test public class JavaTest { @@ -146,7 +147,13 @@ public class JavaTest { } } - @Test fun suppressTag() { + /** + * `@suppress` not supported in Java! + * + * [Proposed tags](http://www.oracle.com/technetwork/java/javase/documentation/proposed-tags-142378.html) + * Proposed tag `@exclude` for it, but not supported yet + */ + @Ignore("@suppress not supported in Java!") @Test fun suppressTag() { verifyJavaPackageMember("testdata/java/suppressTag.java") { cls -> assertEquals(1, cls.members(NodeKind.Function).size) } -- cgit