diff --git a/plugins/kotlin/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightMultiplatformCodeInsightFixtureTestCase.kt b/plugins/kotlin/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightMultiplatformCodeInsightFixtureTestCase.kt index 8edad70eeca3..29dd26277ecc 100644 --- a/plugins/kotlin/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightMultiplatformCodeInsightFixtureTestCase.kt +++ b/plugins/kotlin/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightMultiplatformCodeInsightFixtureTestCase.kt @@ -61,17 +61,12 @@ abstract class KotlinLightMultiplatformCodeInsightFixtureTestCase : KotlinLightC return TestProjectFiles(allFiles, mainFile) } - private var isKotlinK2KmpEnabledBeforeTest: Boolean? = null - override fun setUp() { super.setUp() - Registry.get("kotlin.k2.kmp.enabled").let { registryValue -> - isKotlinK2KmpEnabledBeforeTest = registryValue.asBoolean() - registryValue.setValue(true) - } + Registry.get("kotlin.k2.kmp.enabled").setValue(true, testRootDisposable) - // sync is necessary for to detect unexpected disappearances of library files + // sync is necessary to detect unexpected disappearances of library files VfsTestUtil.syncRefresh() } @@ -79,7 +74,6 @@ abstract class KotlinLightMultiplatformCodeInsightFixtureTestCase : KotlinLightC runAll( { KotlinMultiPlatformProjectDescriptor.cleanupSourceRoots() }, { KotlinSdkType.removeKotlinSdkInTests() }, - { Registry.get("kotlin.k2.kmp.enabled").setValue(isKotlinK2KmpEnabledBeforeTest == true) }, { super.tearDown() }, ) } diff --git a/plugins/kotlin/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinMultiPlatformProjectDescriptor.kt b/plugins/kotlin/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinMultiPlatformProjectDescriptor.kt index d0de929fa84e..bbef86cc56fb 100644 --- a/plugins/kotlin/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinMultiPlatformProjectDescriptor.kt +++ b/plugins/kotlin/test-framework/test/org/jetbrains/kotlin/idea/test/KotlinMultiPlatformProjectDescriptor.kt @@ -28,12 +28,13 @@ import org.jetbrains.kotlin.platform.konan.NativePlatforms /** * The project is created with the following module structure: + * ``` * Common --- Js * \--- Jvm * \--- Native --- MinGW * \--- Linux --- LinuxX64 * \--- LinuxArm64 - * + * ``` * Standard library and kotlinx-coroutines-core of fixed versions are added to all modules. * * Apple targets require a Mac host and therefore are not included in the test project.