aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/kotlin/javadoc/JavadocTest.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-03-31 15:38:07 +0200
committerDmitry Jemerov <yole@jetbrains.com>2016-03-31 15:38:20 +0200
commit6051ab5051be76d6c830a9996901bfbb9e1f901e (patch)
tree458869901d1157960995e67f910093de06f494bf /core/src/test/kotlin/javadoc/JavadocTest.kt
parent8e5aaee1c45753bc9a16bf4bff2387ef0fd70661 (diff)
downloaddokka-6051ab5051be76d6c830a9996901bfbb9e1f901e.tar.gz
dokka-6051ab5051be76d6c830a9996901bfbb9e1f901e.tar.bz2
dokka-6051ab5051be76d6c830a9996901bfbb9e1f901e.zip
Fix the implementation of containingClass() in javadoc adapters. Resolves #57
Diffstat (limited to 'core/src/test/kotlin/javadoc/JavadocTest.kt')
-rw-r--r--core/src/test/kotlin/javadoc/JavadocTest.kt14
1 files changed, 10 insertions, 4 deletions
diff --git a/core/src/test/kotlin/javadoc/JavadocTest.kt b/core/src/test/kotlin/javadoc/JavadocTest.kt
index 0fc4233a..b848aaa1 100644
--- a/core/src/test/kotlin/javadoc/JavadocTest.kt
+++ b/core/src/test/kotlin/javadoc/JavadocTest.kt
@@ -2,11 +2,8 @@ package org.jetbrains.dokka.javadoc
import org.jetbrains.dokka.DokkaConsoleLogger
import org.jetbrains.dokka.tests.verifyModel
+import org.junit.Assert.*
import org.junit.Test
-import org.junit.Assert.assertEquals
-import org.junit.Assert.assertFalse
-import org.junit.Assert.assertNotNull
-import org.junit.Assert.assertTrue
class JavadocTest {
@Test fun testTypes() {
@@ -41,4 +38,13 @@ class JavadocTest {
}
}
+ @Test fun testException() {
+ verifyModel("testdata/javadoc/exception.kt", format = "javadoc", withKotlinRuntime = true) { model ->
+ val doc = ModuleNodeAdapter(model, StandardReporter(DokkaConsoleLogger), "")
+
+ val classDoc = doc.classNamed("foo.MyException")!!
+ val member = classDoc.methods().find { it.name() == "foo" }
+ assertEquals(classDoc, member!!.containingClass())
+ }
+ }
}