aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt')
-rw-r--r--plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
index c48ddedf..78934191 100644
--- a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
+++ b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
@@ -1,6 +1,7 @@
package content.annotations
import matchers.content.*
+import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.*
@@ -8,7 +9,6 @@ import org.jetbrains.dokka.pages.ContentPage
import org.jetbrains.dokka.pages.ContentText
import org.jetbrains.dokka.pages.MemberPageNode
import org.jetbrains.dokka.pages.PackagePageNode
-import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult
import org.junit.jupiter.api.Test
import utils.ParamAttributes
import utils.assertNotNull
@@ -222,7 +222,7 @@ class ContentForAnnotationsTest : BaseAbstractTest() {
))
val property = modules.flatMap { it.packages }.flatMap { it.properties }.first()
val annotation = property.extra?.get(Annotations)?.let {
- it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() }
+ it.directAnnotations.entries.firstNotNullOfOrNull { (_, annotations): Map.Entry<DokkaConfiguration.DokkaSourceSet, List<Annotations.Annotation>> -> annotations.firstOrNull() }
}
val annotationParams = annotation?.params ?: emptyMap()
@@ -283,10 +283,10 @@ class ContentForAnnotationsTest : BaseAbstractTest() {
val property = modules.flatMap { it.packages }.flatMap { it.properties }.first()
val getterAnnotation = property.getter?.extra?.get(Annotations)?.let {
- it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() }
+ it.directAnnotations.entries.firstNotNullOfOrNull { (_, annotations) -> annotations.firstOrNull() }
}
val setterAnnotation = property.getter?.extra?.get(Annotations)?.let {
- it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() }
+ it.directAnnotations.entries.firstNotNullOfOrNull { (_, annotations) -> annotations.firstOrNull() }
}
assertEquals(expectedAnnotation("xd"), getterAnnotation)