aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-08-27 13:45:27 +0200
committerMarcin Aman <marcin.aman@gmail.com>2021-08-27 13:45:27 +0200
commit459a0005824de412ff7d4472c1eb4d6fb7c2a7cc (patch)
tree0ccdbf1d2b5b7e3ad54f70df9284d63a29f058f5 /plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
parent8e1848edfa24acb6b12fad067a6cedbb7be0426b (diff)
downloaddokka-459a0005824de412ff7d4472c1eb4d6fb7c2a7cc.tar.gz
dokka-459a0005824de412ff7d4472c1eb4d6fb7c2a7cc.tar.bz2
dokka-459a0005824de412ff7d4472c1eb4d6fb7c2a7cc.zip
Restore language level to 1.4
Diffstat (limited to 'plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt')
-rw-r--r--plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt9
1 files changed, 5 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 78934191..5c78e885 100644
--- a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
+++ b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt
@@ -9,6 +9,7 @@ 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.util.firstNotNullResult
import org.junit.jupiter.api.Test
import utils.ParamAttributes
import utils.assertNotNull
@@ -221,8 +222,8 @@ class ContentForAnnotationsTest : BaseAbstractTest() {
mustBeDocumented = false
))
val property = modules.flatMap { it.packages }.flatMap { it.properties }.first()
- val annotation = property.extra?.get(Annotations)?.let {
- it.directAnnotations.entries.firstNotNullOfOrNull { (_, annotations): Map.Entry<DokkaConfiguration.DokkaSourceSet, List<Annotations.Annotation>> -> annotations.firstOrNull() }
+ val annotation = property.extra[Annotations]?.let {
+ it.directAnnotations.entries.firstNotNullResult { (_, annotations): Map.Entry<DokkaConfiguration.DokkaSourceSet, List<Annotations.Annotation>> -> annotations.firstOrNull() }
}
val annotationParams = annotation?.params ?: emptyMap()
@@ -283,10 +284,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.firstNotNullOfOrNull { (_, annotations) -> annotations.firstOrNull() }
+ it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() }
}
val setterAnnotation = property.getter?.extra?.get(Annotations)?.let {
- it.directAnnotations.entries.firstNotNullOfOrNull { (_, annotations) -> annotations.firstOrNull() }
+ it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() }
}
assertEquals(expectedAnnotation("xd"), getterAnnotation)