From 34971f2a2f6e243627c095f9ce0bae29afb74299 Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Tue, 8 Sep 2020 11:32:47 +0200 Subject: Remove redundant extension function --- plugins/base/src/test/kotlin/expectActuals/ExpectActualsTest.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/base/src/test/kotlin') diff --git a/plugins/base/src/test/kotlin/expectActuals/ExpectActualsTest.kt b/plugins/base/src/test/kotlin/expectActuals/ExpectActualsTest.kt index ab472ae0..c1d2c5a9 100644 --- a/plugins/base/src/test/kotlin/expectActuals/ExpectActualsTest.kt +++ b/plugins/base/src/test/kotlin/expectActuals/ExpectActualsTest.kt @@ -1,5 +1,6 @@ package expectActuals +import org.jetbrains.dokka.model.withDescendants import org.jetbrains.dokka.pages.ClasslikePageNode import org.jetbrains.dokka.pages.PageNode import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest @@ -9,8 +10,6 @@ import org.junit.jupiter.api.Assertions.assertTrue class ExpectActualsTest : AbstractCoreTest() { - fun PageNode.childrenRec(): List = listOf(this) + children.flatMap { it.childrenRec() } - @Test fun `three same named expect actual classes`() { @@ -143,7 +142,7 @@ class ExpectActualsTest : AbstractCoreTest() { configuration ) { pagesTransformationStage = { - val allChildren = it.childrenRec().filterIsInstance() + val allChildren = it.withDescendants().filterIsInstance().toList() val commonJ = allChildren.filter { it.name == "A(jvm, js)" } val commonN1 = allChildren.filter { it.name == "A(mingwX64, linuxX64)" } val commonN2 = allChildren.filter { it.name == "A(iosX64, iosArm64)" } -- cgit