diff options
author | Simon Ogorodnik <sem-oro@yandex.ru> | 2016-11-28 18:31:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-28 18:31:56 +0300 |
commit | e9cf2d779c03e278ddfd5adb0d1c743961d8d07a (patch) | |
tree | 9fc3ad76cfe1a3b939258fdc005cdd554fbd2562 /core/src/test/kotlin/javadoc | |
parent | 17a9a1774ec10690a031ae7afba5f5cfc59a9f24 (diff) | |
parent | 575caeb1cb2a97750f8cc220d3100fc240312671 (diff) | |
download | dokka-e9cf2d779c03e278ddfd5adb0d1c743961d8d07a.tar.gz dokka-e9cf2d779c03e278ddfd5adb0d1c743961d8d07a.tar.bz2 dokka-e9cf2d779c03e278ddfd5adb0d1c743961d8d07a.zip |
Merge pull request #114 from Kotlin/0.9.10/typealias
Type alias support
Diffstat (limited to 'core/src/test/kotlin/javadoc')
-rw-r--r-- | core/src/test/kotlin/javadoc/JavadocTest.kt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/core/src/test/kotlin/javadoc/JavadocTest.kt b/core/src/test/kotlin/javadoc/JavadocTest.kt index 41d22b47..4c0f7f0f 100644 --- a/core/src/test/kotlin/javadoc/JavadocTest.kt +++ b/core/src/test/kotlin/javadoc/JavadocTest.kt @@ -1,5 +1,6 @@ package org.jetbrains.dokka.javadoc +import com.sun.javadoc.Type import org.jetbrains.dokka.DokkaConsoleLogger import org.jetbrains.dokka.tests.verifyModel import org.junit.Assert.* @@ -107,6 +108,22 @@ class JavadocTest { } } + @Test fun testTypeAliases() { + verifyJavadoc("testdata/javadoc/typealiases.kt", withKotlinRuntime = true) { doc -> + assertNull(doc.classNamed("B")) + assertNull(doc.classNamed("D")) + + assertEquals("A", doc.classNamed("C")!!.superclass().name()) + val methodParamType = doc.classNamed("TypealiasesKt")!!.methods() + .find { it.name() == "some" }!!.parameters().first() + .type() + assertEquals("kotlin.jvm.functions.Function1", methodParamType.qualifiedTypeName()) + assertEquals("? super A, C", methodParamType.asParameterizedType().typeArguments() + .map(Type::qualifiedTypeName).joinToString()) + } + } + + private fun verifyJavadoc(name: String, withJdk: Boolean = false, withKotlinRuntime: Boolean = false, |