From 622d59822e709438802b72d82afef025b43dd564 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 26 Aug 2021 12:15:22 +0200 Subject: Bump compiler to 1.5.30, language level to 1.5 --- .../test/kotlin/content/annotations/ContentForAnnotationsTest.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/base/src/test') 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> -> 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) -- cgit From 459a0005824de412ff7d4472c1eb4d6fb7c2a7cc Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Fri, 27 Aug 2021 13:45:27 +0200 Subject: Restore language level to 1.4 --- .../test/kotlin/content/annotations/ContentForAnnotationsTest.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins/base/src/test') 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> -> annotations.firstOrNull() } + val annotation = property.extra[Annotations]?.let { + it.directAnnotations.entries.firstNotNullResult { (_, annotations): Map.Entry> -> 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) -- cgit From fb6822793252cb2957ae0f0c2ed36aafebcf12f4 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Fri, 27 Aug 2021 15:09:00 +0200 Subject: Cleanup and version bump to 1.5.30 --- .../src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/base/src/test') diff --git a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt index 5c78e885..f7f7eb66 100644 --- a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt +++ b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt @@ -223,7 +223,7 @@ class ContentForAnnotationsTest : BaseAbstractTest() { )) val property = modules.flatMap { it.packages }.flatMap { it.properties }.first() val annotation = property.extra[Annotations]?.let { - it.directAnnotations.entries.firstNotNullResult { (_, annotations): Map.Entry> -> annotations.firstOrNull() } + it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() } } val annotationParams = annotation?.params ?: emptyMap() -- cgit