aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/translators
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-09-14 13:49:54 +0200
committerKamil Doległo <9080183+kamildoleglo@users.noreply.github.com>2020-10-07 02:36:57 +0200
commitec637955575995011351b106d3a67194d21c4b15 (patch)
tree5762d6ca0c49cc48dec01240380bc6fd436e81b0 /plugins/base/src/test/kotlin/translators
parent7c4301a48af55e156538666b6e645d8d13caae9a (diff)
downloaddokka-ec637955575995011351b106d3a67194d21c4b15.tar.gz
dokka-ec637955575995011351b106d3a67194d21c4b15.tar.bz2
dokka-ec637955575995011351b106d3a67194d21c4b15.zip
Introduce top-level DocTag
Diffstat (limited to 'plugins/base/src/test/kotlin/translators')
-rw-r--r--plugins/base/src/test/kotlin/translators/JavadocParserTest.kt7
-rw-r--r--plugins/base/src/test/kotlin/translators/utils.kt2
2 files changed, 5 insertions, 4 deletions
diff --git a/plugins/base/src/test/kotlin/translators/JavadocParserTest.kt b/plugins/base/src/test/kotlin/translators/JavadocParserTest.kt
index 0cd0a151..762c2e27 100644
--- a/plugins/base/src/test/kotlin/translators/JavadocParserTest.kt
+++ b/plugins/base/src/test/kotlin/translators/JavadocParserTest.kt
@@ -5,6 +5,7 @@ import org.jetbrains.dokka.model.DModule
import org.jetbrains.dokka.model.childrenOfType
import org.jetbrains.dokka.model.doc.*
import org.jetbrains.dokka.model.firstChildOfType
+import org.jetbrains.dokka.model.firstMemberOfType
import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.Assertions.*
@@ -144,9 +145,9 @@ class JavadocParserTest : AbstractCoreTest() {
performJavadocTest { module ->
val authors = module.findClasslike().documentation.values.single().childrenOfType<Author>()
assertEquals(3, authors.size)
- assertEquals("James Gosling", authors[0].firstChildOfType<Text>().text())
- assertEquals("Arthur van Hoff", authors[1].firstChildOfType<Text>().text())
- assertEquals("Alan Liu", authors[2].firstChildOfType<Text>().text())
+ assertEquals("James Gosling", authors[0].firstMemberOfType<Text>().text())
+ assertEquals("Arthur van Hoff", authors[1].firstMemberOfType<Text>().text())
+ assertEquals("Alan Liu", authors[2].firstMemberOfType<Text>().text())
}
}
diff --git a/plugins/base/src/test/kotlin/translators/utils.kt b/plugins/base/src/test/kotlin/translators/utils.kt
index cbb6efa7..f0522ade 100644
--- a/plugins/base/src/test/kotlin/translators/utils.kt
+++ b/plugins/base/src/test/kotlin/translators/utils.kt
@@ -7,7 +7,7 @@ import java.util.NoSuchElementException
fun DModule.documentationOf(className: String, functionName: String? = null): String =
descriptionOf(className, functionName)
- ?.firstChildOfType<Text>()
+ ?.firstMemberOfType<Text>()
?.body.orEmpty()
fun DModule.descriptionOf(className: String, functionName: String? = null): Description? {