Misc: Fix multiplatform test configuration
This commit is contained in:
@@ -27,7 +27,7 @@ class FindUsagesMultiModuleTest : AbstractFindUsagesMultiModuleTest() {
|
|||||||
implName: String = "jvm",
|
implName: String = "jvm",
|
||||||
implKind: TargetPlatformKind<*> = TargetPlatformKind.Jvm[JvmTarget.JVM_1_6]) {
|
implKind: TargetPlatformKind<*> = TargetPlatformKind.Jvm[JvmTarget.JVM_1_6]) {
|
||||||
val commonModule = module(commonName)
|
val commonModule = module(commonName)
|
||||||
commonModule.createFacet(TargetPlatformKind.Common)
|
commonModule.createFacet(TargetPlatformKind.Common, false)
|
||||||
|
|
||||||
val jvm = module(implName)
|
val jvm = module(implName)
|
||||||
jvm.createFacet(implKind)
|
jvm.createFacet(implKind)
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ abstract class AbstractMultiModuleHighlightingTest : AbstractMultiHighlightingTe
|
|||||||
jdk: TestJdkKind = TestJdkKind.MOCK_JDK
|
jdk: TestJdkKind = TestJdkKind.MOCK_JDK
|
||||||
) {
|
) {
|
||||||
val commonModule = module("common", jdk)
|
val commonModule = module("common", jdk)
|
||||||
commonModule.createFacet(TargetPlatformKind.Common)
|
commonModule.createFacet(TargetPlatformKind.Common, false)
|
||||||
if (withStdlibCommon) {
|
if (withStdlibCommon) {
|
||||||
commonModule.addLibrary(ForTestCompileRuntime.stdlibCommonForTests(), kind = CommonLibraryKind)
|
commonModule.addLibrary(ForTestCompileRuntime.stdlibCommonForTests(), kind = CommonLibraryKind)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class QuickFixMultiModuleTest : AbstractQuickFixMultiModuleTest() {
|
|||||||
withTests: Boolean = false
|
withTests: Boolean = false
|
||||||
) {
|
) {
|
||||||
val commonModule = module(expectName, hasTestRoot = withTests)
|
val commonModule = module(expectName, hasTestRoot = withTests)
|
||||||
commonModule.createFacet(TargetPlatformKind.Common)
|
commonModule.createFacet(TargetPlatformKind.Common, false)
|
||||||
|
|
||||||
impls.forEach { (implName, implKind) ->
|
impls.forEach { (implName, implKind) ->
|
||||||
val implModule = module(implName, hasTestRoot = withTests)
|
val implModule = module(implName, hasTestRoot = withTests)
|
||||||
|
|||||||
@@ -118,11 +118,11 @@ abstract class AbstractMultiModuleTest : DaemonAnalyzerTestCase() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Module.createFacet(platformKind: TargetPlatformKind<*>? = null) {
|
fun Module.createFacet(platformKind: TargetPlatformKind<*>? = null, useProjectSettings: Boolean = true) {
|
||||||
val accessToken = WriteAction.start()
|
val accessToken = WriteAction.start()
|
||||||
try {
|
try {
|
||||||
val modelsProvider = IdeModifiableModelsProviderImpl(project)
|
val modelsProvider = IdeModifiableModelsProviderImpl(project)
|
||||||
getOrCreateFacet(modelsProvider, true).configuration.settings.initializeIfNeeded(
|
getOrCreateFacet(modelsProvider, useProjectSettings).configuration.settings.initializeIfNeeded(
|
||||||
this,
|
this,
|
||||||
modelsProvider.getModifiableRootModel(this),
|
modelsProvider.getModifiableRootModel(this),
|
||||||
platformKind
|
platformKind
|
||||||
|
|||||||
Reference in New Issue
Block a user