aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src/test/kotlin
diff options
context:
space:
mode:
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>") }