aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src/test/kotlin
diff options
context:
space:
mode:
authorMarcin Aman <maman@virtuslab.com>2020-05-20 17:58:31 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-05-20 18:13:23 +0200
commit091294c5a920521df1b4bf61c2492b78f3559321 (patch)
treef00833367aca8f8bfdd6ec77495a40576e30d78e /plugins/kotlin-as-java/src/test/kotlin
parent885bf34ac6d9b9a5974cab35d9dd5a224b0ccc4c (diff)
downloaddokka-091294c5a920521df1b4bf61c2492b78f3559321.tar.gz
dokka-091294c5a920521df1b4bf61c2492b78f3559321.tar.bz2
dokka-091294c5a920521df1b4bf61c2492b78f3559321.zip
Tabs for sections - update tests
Diffstat (limited to 'plugins/kotlin-as-java/src/test/kotlin')
-rw-r--r--plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt b/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt
index 968ab65a..db87051b 100644
--- a/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt
+++ b/plugins/kotlin-as-java/src/test/kotlin/KotlinAsJavaPluginTest.kt
@@ -2,12 +2,12 @@ package kotlinAsJavaPlugin
import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
+import org.jetbrains.kotlin.utils.addToStdlib.cast
+import org.jetbrains.kotlin.utils.addToStdlib.safeAs
import org.junit.jupiter.api.Test
class KotlinAsJavaPluginTest : AbstractCoreTest() {
- fun fail(msg: String) = assert(false) { msg }
-
@Test
fun topLevelTest() {
val configuration = dokkaConfiguration {
@@ -37,8 +37,8 @@ class KotlinAsJavaPluginTest : AbstractCoreTest() {
pagesGenerationStage = { root ->
val content = (root.children.single().children.first { it.name == "TestKt" } as ContentPage).content
- val children = content.mainContents
- .filterIsInstance<ContentTable>()
+ val children = content.mainContents.first().cast<ContentGroup>()
+ .children.filterIsInstance<ContentTable>()
.filter { it.children.isNotEmpty() }
children.assertCount(2)
@@ -77,7 +77,7 @@ class KotlinAsJavaPluginTest : AbstractCoreTest() {
.map { it.content }
val children = contentList.flatMap { content ->
- content.mainContents
+ content.mainContents.first().cast<ContentGroup>().children
.filterIsInstance<ContentTable>()
.filter { it.children.isNotEmpty() }
}.filterNot { it.toString().contains("<init>") }