diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2022-04-29 15:03:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-29 15:03:08 +0300 |
commit | 8c218ff4dd5f970233c43845c19299fc74256389 (patch) | |
tree | b6818183ce8faa2c58d6571ca1c86aa28d4f0431 /plugins/base/src/test/kotlin/linkableContent | |
parent | 84aacad29982240ae367b21e9d283d38dab672ae (diff) | |
download | dokka-8c218ff4dd5f970233c43845c19299fc74256389.tar.gz dokka-8c218ff4dd5f970233c43845c19299fc74256389.tar.bz2 dokka-8c218ff4dd5f970233c43845c19299fc74256389.zip |
Enable warnings as errors and fix all warnings (#2451)
* Enable warnings as errors and fix all warnings
* Enable skip-metadata-version-check compiler setting
Diffstat (limited to 'plugins/base/src/test/kotlin/linkableContent')
-rw-r--r-- | plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt index 3b0f6eef..1a4bb330 100644 --- a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt +++ b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt @@ -39,7 +39,7 @@ class LinkableContentTest : BaseAbstractTest() { dependentSourceSets = setOf(common.value.sourceSetID) sourceRoots = listOf(Paths.get("$testDataDir/jvmAndJsSecondCommonMain/kotlin").toString()) } - val js = sourceSet { + sourceSet { name = "js" displayName = "js" analysisPlatform = "js" @@ -47,7 +47,7 @@ class LinkableContentTest : BaseAbstractTest() { sourceRoots = listOf(Paths.get("$testDataDir/jsMain/kotlin").toString()) includes = listOf(Paths.get("$includesDir/include2.md").toString()) } - val jvm = sourceSet { + sourceSet { name = "jvm" displayName = "jvm" analysisPlatform = "jvm" @@ -91,7 +91,7 @@ class LinkableContentTest : BaseAbstractTest() { dependentSourceSets = setOf(common.value.sourceSetID) sourceRoots = listOf(Paths.get("$testDataDir/jvmAndJsSecondCommonMain/kotlin").toString()) } - val js = sourceSet { + sourceSet { name = "js" displayName = "js" analysisPlatform = "js" @@ -105,7 +105,7 @@ class LinkableContentTest : BaseAbstractTest() { ) ) } - val jvm = sourceSet { + sourceSet { name = "jvm" displayName = "jvm" analysisPlatform = "jvm" @@ -165,7 +165,7 @@ class LinkableContentTest : BaseAbstractTest() { dependentSourceSets = setOf(common.value.sourceSetID) sourceRoots = listOf(Paths.get("$testDataDir/jvmAndJsSecondCommonMain/kotlin").toString()) } - val js = sourceSet { + sourceSet { name = "js" displayName = "js" analysisPlatform = "js" @@ -173,7 +173,7 @@ class LinkableContentTest : BaseAbstractTest() { sourceRoots = listOf(Paths.get("$testDataDir/jsMain/kotlin").toString()) samples = listOf("$testDataDir/jsMain/resources/Samples.kt") } - val jvm = sourceSet { + sourceSet { name = "jvm" displayName = "jvm" analysisPlatform = "jvm" @@ -192,9 +192,9 @@ class LinkableContentTest : BaseAbstractTest() { Assertions.assertEquals(1, moduleChildren.size) val packageChildren = moduleChildren.first().children Assertions.assertEquals(2, packageChildren.size) - packageChildren.forEach { - val name = it.name.substringBefore("Class") - val classChildren = it.children + packageChildren.forEach { pageNode -> + val name = pageNode.name.substringBefore("Class") + val classChildren = pageNode.children Assertions.assertEquals(2, classChildren.size) val function = classChildren.find { it.name == "printWithExclamation" } val text = function.cast<MemberPageNode>().content.cast<ContentGroup>().children.last() @@ -256,7 +256,7 @@ class LinkableContentTest : BaseAbstractTest() { }?.safeAs<ContentDRILink>() Assertions.assertEquals( - (sample.documentable as WithGenerics).generics.first().dri, + (sample.documentables.firstOrNull() as WithGenerics).generics.first().dri, returnTypeNode?.address ) } @@ -323,7 +323,7 @@ class LinkableContentTest : BaseAbstractTest() { dependentSourceSets = setOf(common.value.sourceSetID) sourceRoots = listOf(Paths.get("$testDataDir/jvmAndJsSecondCommonMain/kotlin").toString()) } - val js = sourceSet { + sourceSet { name = "js" displayName = "js" analysisPlatform = "js" @@ -331,7 +331,7 @@ class LinkableContentTest : BaseAbstractTest() { sourceRoots = listOf(Paths.get("$testDataDir/jsMain/kotlin").toString()) includes = listOf(Paths.get("$includesDir/include2.md").toString()) } - val jvm = sourceSet { + sourceSet { name = "jvm" displayName = "jvm" analysisPlatform = "jvm" @@ -346,8 +346,8 @@ class LinkableContentTest : BaseAbstractTest() { } testFromData(configuration) { - documentablesMergingStage = { - it.documentation.entries.single { + documentablesMergingStage = { module -> + module.documentation.entries.single { it.key.displayName == "jvm" }.value.run { Assertions.assertNotNull(dfs { |