diff options
author | Vadim Mishenev <vad-mishenev@yandex.ru> | 2023-10-05 23:30:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 23:30:14 +0300 |
commit | 62d1143ed3f2f76c4f52eaaa1e079fc8b8c7f264 (patch) | |
tree | 73a30b31733967db7e8a116ca7d65bc46269e45f | |
parent | 38e09dd0a2b0f0f111c33e30665faa933142959f (diff) | |
download | dokka-62d1143ed3f2f76c4f52eaaa1e079fc8b8c7f264.tar.gz dokka-62d1143ed3f2f76c4f52eaaa1e079fc8b8c7f264.tar.bz2 dokka-62d1143ed3f2f76c4f52eaaa1e079fc8b8c7f264.zip |
Register Kotlin stdlib classpath in every unit test (#3183)
Due to the recent changes in how Analysis API handles builtins, the update to the fresh version of Analysis API requires registering Kotlin stdlib in every testsuite.
11 files changed, 21 insertions, 8 deletions
diff --git a/plugins/base/src/test/kotlin/content/HighlightingTest.kt b/plugins/base/src/test/kotlin/content/HighlightingTest.kt index 4fe6e20f..a7fb2bde 100644 --- a/plugins/base/src/test/kotlin/content/HighlightingTest.kt +++ b/plugins/base/src/test/kotlin/content/HighlightingTest.kt @@ -15,7 +15,7 @@ class HighlightingTest : BaseAbstractTest() { sourceSets { sourceSet { sourceRoots = listOf("src/") - classpath = listOf(commonStdlibPath!!) + classpath = listOf(commonStdlibPath!!, jvmStdlibPath!!) externalDocumentationLinks = listOf(stdlibExternalDocumentationLink) } } diff --git a/plugins/base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt b/plugins/base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt index 9dfcfed3..7612aff8 100644 --- a/plugins/base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt +++ b/plugins/base/src/test/kotlin/content/annotations/KotlinDeprecatedTest.kt @@ -27,6 +27,7 @@ class KotlinDeprecatedTest : BaseAbstractTest() { sourceSets { sourceSet { sourceRoots = listOf("src/") + classpath = listOfNotNull(jvmStdlibPath) analysisPlatform = "jvm" } } diff --git a/plugins/base/src/test/kotlin/content/annotations/SinceKotlinTest.kt b/plugins/base/src/test/kotlin/content/annotations/SinceKotlinTest.kt index 8576803c..4cb25704 100644 --- a/plugins/base/src/test/kotlin/content/annotations/SinceKotlinTest.kt +++ b/plugins/base/src/test/kotlin/content/annotations/SinceKotlinTest.kt @@ -27,6 +27,7 @@ class SinceKotlinTest : AbstractRenderingTest() { sourceSets { sourceSet { sourceRoots = listOf("src/") + classpath = listOfNotNull(jvmStdlibPath) analysisPlatform = "jvm" } } @@ -185,6 +186,7 @@ class SinceKotlinTest : AbstractRenderingTest() { sourceSets { sourceSet { sourceRoots = listOf("src/") + classpath = listOfNotNull(jvmStdlibPath) analysisPlatform = "jvm" } sourceSet { @@ -193,10 +195,12 @@ class SinceKotlinTest : AbstractRenderingTest() { } sourceSet { sourceRoots = listOf("src/") + classpath = listOfNotNull(commonStdlibPath) analysisPlatform = "common" } sourceSet { sourceRoots = listOf("src/") + classpath = listOfNotNull(jsStdlibPath) analysisPlatform = "js" } sourceSet { diff --git a/plugins/base/src/test/kotlin/content/exceptions/ContentForExceptions.kt b/plugins/base/src/test/kotlin/content/exceptions/ContentForExceptions.kt index cd37d1c4..9a9fd8b4 100644 --- a/plugins/base/src/test/kotlin/content/exceptions/ContentForExceptions.kt +++ b/plugins/base/src/test/kotlin/content/exceptions/ContentForExceptions.kt @@ -10,10 +10,7 @@ import org.jetbrains.dokka.PluginConfigurationImpl import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest import org.jetbrains.dokka.model.DisplaySourceSet -import utils.ParamAttributes -import utils.bareSignature -import utils.findTestType -import utils.OnlyDescriptors +import utils.* import kotlin.test.Test import kotlin.test.assertEquals @@ -22,6 +19,7 @@ class ContentForExceptions : BaseAbstractTest() { sourceSets { sourceSet { sourceRoots = listOf("src/") + classpath = listOfNotNull(jvmStdlibPath) analysisPlatform = "jvm" } } @@ -35,6 +33,7 @@ class ContentForExceptions : BaseAbstractTest() { displayName = "common" analysisPlatform = "common" sourceRoots = listOf("src/commonMain/kotlin/pageMerger/Test.kt") + classpath = listOfNotNull(commonStdlibPath) } sourceSet { name = "jvm" @@ -42,6 +41,7 @@ class ContentForExceptions : BaseAbstractTest() { analysisPlatform = "jvm" dependentSourceSets = setOf(common.value.sourceSetID) sourceRoots = listOf("src/jvmMain/kotlin/pageMerger/Test.kt") + classpath = listOfNotNull(jvmStdlibPath) } sourceSet { name = "linuxX64" @@ -339,6 +339,7 @@ class ContentForExceptions : BaseAbstractTest() { } } + @OnlyDescriptorsMPP("Return type for native `function` should be null rather than kotlin/Unit") @Test fun `throws in merged functions`() { testInline( diff --git a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt index aeb7dcf1..03bc0469 100644 --- a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt +++ b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt @@ -23,6 +23,7 @@ class ContentForParamsTest : BaseAbstractTest() { sourceSets { sourceSet { sourceRoots = listOf("src/") + classpath = listOfNotNull(jvmStdlibPath) analysisPlatform = "jvm" } } @@ -531,7 +532,7 @@ class ContentForParamsTest : BaseAbstractTest() { link { check { assertEquals( - "java.lang/RuntimeException///PointingToDeclaration/", + "kotlin/RuntimeException///PointingToDeclaration/", (this as ContentDRILink).address.toString() ) } diff --git a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt index afcc2d3a..2790d8b6 100644 --- a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt +++ b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt @@ -17,6 +17,7 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { sourceSets { sourceSet { sourceRoots = listOf("src/") + classpath = listOfNotNull(jvmStdlibPath) analysisPlatform = "jvm" } } @@ -217,6 +218,7 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { } } + @OnlyDescriptors("issue #3179") @Test fun `undocumented seealso with reference to property for class`() { testInline( @@ -310,6 +312,7 @@ class ContentForSeeAlsoTest : BaseAbstractTest() { } } + @OnlyDescriptors("issue #3179") @Test fun `documented seealso with reference to property for class`() { testInline( diff --git a/plugins/base/src/test/kotlin/content/typealiases/TypealiasTest.kt b/plugins/base/src/test/kotlin/content/typealiases/TypealiasTest.kt index 6cc9abfe..4015e0f4 100644 --- a/plugins/base/src/test/kotlin/content/typealiases/TypealiasTest.kt +++ b/plugins/base/src/test/kotlin/content/typealiases/TypealiasTest.kt @@ -18,7 +18,7 @@ class TypealiasTest : BaseAbstractTest() { sourceSets { sourceSet { sourceRoots = listOf("src/") - classpath = listOf(commonStdlibPath!!) + classpath = listOf(commonStdlibPath!!, jvmStdlibPath!!) externalDocumentationLinks = listOf(stdlibExternalDocumentationLink) } } diff --git a/plugins/base/src/test/kotlin/enums/KotlinEnumsTest.kt b/plugins/base/src/test/kotlin/enums/KotlinEnumsTest.kt index 48db0d84..94a6b932 100644 --- a/plugins/base/src/test/kotlin/enums/KotlinEnumsTest.kt +++ b/plugins/base/src/test/kotlin/enums/KotlinEnumsTest.kt @@ -292,6 +292,7 @@ class KotlinEnumsTest : BaseAbstractTest() { sourceSets { sourceSet { sourceRoots = listOf("src/") + classpath = listOfNotNull(jvmStdlibPath) } } } diff --git a/plugins/base/src/test/kotlin/filter/DeprecationFilterTest.kt b/plugins/base/src/test/kotlin/filter/DeprecationFilterTest.kt index cedadaf9..75d82e9b 100644 --- a/plugins/base/src/test/kotlin/filter/DeprecationFilterTest.kt +++ b/plugins/base/src/test/kotlin/filter/DeprecationFilterTest.kt @@ -18,6 +18,7 @@ class DeprecationFilterTest : BaseAbstractTest() { sourceSets { sourceSet { sourceRoots = listOf("src/main/kotlin/basic/Test.kt") + classpath = listOfNotNull(jvmStdlibPath) skipDeprecated = false perPackageOptions = mutableListOf( PackageOptionsImpl( diff --git a/plugins/base/src/test/kotlin/filter/VisibilityFilterTest.kt b/plugins/base/src/test/kotlin/filter/VisibilityFilterTest.kt index ea9ff326..872e5865 100644 --- a/plugins/base/src/test/kotlin/filter/VisibilityFilterTest.kt +++ b/plugins/base/src/test/kotlin/filter/VisibilityFilterTest.kt @@ -691,6 +691,7 @@ class VisibilityFilterTest : BaseAbstractTest() { sourceSet { includeNonPublic = true sourceRoots = listOf("src/main/kotlin/basic/Test.kt") + classpath = listOfNotNull(jvmStdlibPath) } } } diff --git a/plugins/base/src/test/kotlin/signatures/FunctionalTypeConstructorsSignatureTest.kt b/plugins/base/src/test/kotlin/signatures/FunctionalTypeConstructorsSignatureTest.kt index 9463e133..22807e87 100644 --- a/plugins/base/src/test/kotlin/signatures/FunctionalTypeConstructorsSignatureTest.kt +++ b/plugins/base/src/test/kotlin/signatures/FunctionalTypeConstructorsSignatureTest.kt @@ -20,7 +20,7 @@ class FunctionalTypeConstructorsSignatureTest : BaseAbstractTest() { sourceSets { sourceSet { sourceRoots = listOf("src/") - classpath = listOf(commonStdlibPath!!) + classpath = listOf(commonStdlibPath!!, jvmStdlibPath!!) externalDocumentationLinks = listOf( stdlibExternalDocumentationLink, DokkaConfiguration.ExternalDocumentationLink.Companion.jdk(8) |