[Test] Fix double reading of module directives
This commit is contained in:
committed by
TeamCityServer
parent
0e3ed3fee6
commit
02fb11a2cd
-3
@@ -22,8 +22,5 @@ abstract class EnvironmentConfigurator(protected val testServices: TestServices)
|
|||||||
protected val moduleStructure: TestModuleStructure
|
protected val moduleStructure: TestModuleStructure
|
||||||
get() = testServices.moduleStructure
|
get() = testServices.moduleStructure
|
||||||
|
|
||||||
protected val TestModule.allRegisteredDirectives: RegisteredDirectives
|
|
||||||
get() = ComposedRegisteredDirectives(directives, testServices.defaultDirectives)
|
|
||||||
|
|
||||||
open fun configureCompilerConfiguration(configuration: CompilerConfiguration, module: TestModule, project: MockProject) {}
|
open fun configureCompilerConfiguration(configuration: CompilerConfiguration, module: TestModule, project: MockProject) {}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig
|
|||||||
|
|
||||||
override fun configureCompilerConfiguration(configuration: CompilerConfiguration, module: TestModule, project: MockProject) {
|
override fun configureCompilerConfiguration(configuration: CompilerConfiguration, module: TestModule, project: MockProject) {
|
||||||
if (module.targetPlatform !in JvmPlatforms.allJvmPlatforms) return
|
if (module.targetPlatform !in JvmPlatforms.allJvmPlatforms) return
|
||||||
val registeredDirectives = module.allRegisteredDirectives
|
val registeredDirectives = module.directives
|
||||||
val targets = registeredDirectives[JvmEnvironmentConfigurationDirectives.JVM_TARGET]
|
val targets = registeredDirectives[JvmEnvironmentConfigurationDirectives.JVM_TARGET]
|
||||||
when (targets.size) {
|
when (targets.size) {
|
||||||
0 -> {}
|
0 -> {}
|
||||||
|
|||||||
Reference in New Issue
Block a user