Remove diagnostic check from second module in SplittingModuleTransformerForBoxTests
This commit is contained in:
committed by
Alexander Udalov
parent
ff2f6fe5e5
commit
12b2828499
+19
-4
@@ -7,10 +7,25 @@ package org.jetbrains.kotlin.test.builders
|
||||
|
||||
import org.jetbrains.kotlin.test.directives.model.*
|
||||
|
||||
class RegisteredDirectivesBuilder {
|
||||
private val simpleDirectives: MutableList<SimpleDirective> = mutableListOf()
|
||||
private val stringDirectives: MutableMap<StringDirective, List<String>> = mutableMapOf()
|
||||
private val valueDirectives: MutableMap<ValueDirective<*>, List<Any>> = mutableMapOf()
|
||||
class RegisteredDirectivesBuilder private constructor(
|
||||
private val simpleDirectives: MutableList<SimpleDirective>,
|
||||
private val stringDirectives: MutableMap<StringDirective, List<String>>,
|
||||
private val valueDirectives: MutableMap<ValueDirective<*>, List<Any>>
|
||||
) {
|
||||
constructor() : this(mutableListOf(), mutableMapOf(), mutableMapOf())
|
||||
|
||||
constructor(old: RegisteredDirectives) : this() {
|
||||
for (directive in old) {
|
||||
when (directive) {
|
||||
is SimpleDirective -> +directive
|
||||
is StringDirective -> directive with old[directive]
|
||||
is ValueDirective<*> -> {
|
||||
// no way to call with
|
||||
valueDirectives[directive] = old[directive]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
operator fun SimpleDirective.unaryPlus() {
|
||||
simpleDirectives += this
|
||||
|
||||
+5
-1
@@ -6,6 +6,8 @@
|
||||
package org.jetbrains.kotlin.test.services
|
||||
|
||||
import org.jetbrains.kotlin.test.TestInfrastructureInternals
|
||||
import org.jetbrains.kotlin.test.builders.RegisteredDirectivesBuilder
|
||||
import org.jetbrains.kotlin.test.directives.CodegenTestDirectives
|
||||
import org.jetbrains.kotlin.test.model.DependencyDescription
|
||||
import org.jetbrains.kotlin.test.model.DependencyKind
|
||||
import org.jetbrains.kotlin.test.model.DependencyRelation
|
||||
@@ -52,7 +54,9 @@ class SplittingModuleTransformerForBoxTests : ModuleStructureTransformer() {
|
||||
module.binaryKind,
|
||||
files = listOf(secondModuleFile) + additionalFiles,
|
||||
allDependencies = listOf(DependencyDescription("lib", DependencyKind.Binary, DependencyRelation.FriendDependency)),
|
||||
module.directives,
|
||||
RegisteredDirectivesBuilder(module.directives).apply {
|
||||
-CodegenTestDirectives.IGNORE_FIR_DIAGNOSTICS
|
||||
}.build(),
|
||||
module.languageVersionSettings
|
||||
)
|
||||
return TestModuleStructureImpl(listOf(firstModule, secondModule), moduleStructure.originalTestDataFiles)
|
||||
|
||||
Reference in New Issue
Block a user