From 424dab062faca5708e2571fb2297428600945d96 Mon Sep 17 00:00:00 2001 From: higan Date: Wed, 18 Oct 2023 14:03:18 +0800 Subject: [PATCH] Fix detekt rule conflict --- .../org/jetbrains/jewel/BasicJewelUiTest.kt | 15 +++++++++------ .../kotlin/org/jetbrains/jewel/PainterHintTest.kt | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/core/src/test/kotlin/org/jetbrains/jewel/BasicJewelUiTest.kt b/core/src/test/kotlin/org/jetbrains/jewel/BasicJewelUiTest.kt index 64c23eb403..e8bde5213b 100644 --- a/core/src/test/kotlin/org/jetbrains/jewel/BasicJewelUiTest.kt +++ b/core/src/test/kotlin/org/jetbrains/jewel/BasicJewelUiTest.kt @@ -7,16 +7,19 @@ import kotlinx.coroutines.runBlocking import org.junit.Before import org.junit.Rule -abstract class BasicJewelUiTest { +open class BasicJewelUiTest { @get:Rule val composeRule = createComposeRule() - protected fun runComposeTest(composable: @Composable () -> Unit, block: suspend ComposeContentTestRule.() -> Unit) = - runBlocking { - composeRule.setContent(composable) - composeRule.block() - } + @Suppress("ImplicitUnitReturnType") + protected fun runComposeTest( + composable: @Composable () -> Unit, + block: suspend ComposeContentTestRule.() -> Unit, + ) = runBlocking { + composeRule.setContent(composable) + composeRule.block() + } @Before fun setUpProperties() { diff --git a/core/src/test/kotlin/org/jetbrains/jewel/PainterHintTest.kt b/core/src/test/kotlin/org/jetbrains/jewel/PainterHintTest.kt index 10045234fa..ec4ab43cab 100644 --- a/core/src/test/kotlin/org/jetbrains/jewel/PainterHintTest.kt +++ b/core/src/test/kotlin/org/jetbrains/jewel/PainterHintTest.kt @@ -9,6 +9,7 @@ import org.jetbrains.jewel.painter.rememberResourcePainterProvider import org.junit.Assert import org.junit.Test +@Suppress("ImplicitUnitReturnType") class PainterHintTest : BasicJewelUiTest() { @Test