mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[Kotlin] Use test disposable for cleaning test registry value
KTIJ-29725 GitOrigin-RevId: 1ede31b498132da569b45f77bc618f0e03abe996
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0dad9dd658
commit
fdca03869d
+2
-8
@@ -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() },
|
||||
)
|
||||
}
|
||||
|
||||
+2
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user