diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2016-11-08 18:08:00 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2016-11-08 18:08:00 +0300 |
commit | a014843ed2de90c6ac73e2a8acb41f617ff86432 (patch) | |
tree | dd369d145d57bd74300f5a55546adca0152c919d /core/src/test/kotlin/issues | |
parent | c4cf001951bbe92223fdedaf4bb5fbdeddeb2472 (diff) | |
download | dokka-a014843ed2de90c6ac73e2a8acb41f617ff86432.tar.gz dokka-a014843ed2de90c6ac73e2a8acb41f617ff86432.tar.bz2 dokka-a014843ed2de90c6ac73e2a8acb41f617ff86432.zip |
Fix for GH-79 , KT-13299 Critical bug, top-level Kotlin functions from libraries not resolved
Diffstat (limited to 'core/src/test/kotlin/issues')
-rw-r--r-- | core/src/test/kotlin/issues/IssuesTest.kt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/core/src/test/kotlin/issues/IssuesTest.kt b/core/src/test/kotlin/issues/IssuesTest.kt new file mode 100644 index 00000000..625d7e46 --- /dev/null +++ b/core/src/test/kotlin/issues/IssuesTest.kt @@ -0,0 +1,28 @@ +package issues + +import org.jetbrains.dokka.DocumentationNode +import org.jetbrains.dokka.NodeKind +import org.jetbrains.dokka.tests.toTestString +import org.jetbrains.dokka.tests.verifyModel +import org.junit.Test +import kotlin.test.assertEquals + + +class IssuesTest { + + @Test + fun errorClasses() { + verifyModel("testdata/issues/errorClasses.kt", withJdk = true, withKotlinRuntime = true) { model -> + val cls = model.members.single().members.single() + + fun DocumentationNode.returnType() = this.details.find { it.kind == NodeKind.Type }?.name + assertEquals("Test", cls.members[1].returnType()) + assertEquals("Test", cls.members[2].returnType()) + assertEquals("Test", cls.members[3].returnType()) + assertEquals("List", cls.members[4].returnType()) + assertEquals("String", cls.members[5].returnType()) + assertEquals("String", cls.members[6].returnType()) + assertEquals("String", cls.members[7].returnType()) + } + } +} |