HMPP. Fix tests after parameterization of NativePlatform
This commit is contained in:
@@ -9,6 +9,7 @@ import com.intellij.util.text.nullize
|
||||
import org.jetbrains.kotlin.platform.CommonPlatforms
|
||||
import org.jetbrains.kotlin.platform.TargetPlatform
|
||||
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
||||
import org.jetbrains.kotlin.platform.konan.NativePlatforms
|
||||
import java.io.File
|
||||
import java.io.InputStreamReader
|
||||
import java.io.Reader
|
||||
@@ -125,12 +126,13 @@ open class ProjectStructureParser(private val projectRoot: File) {
|
||||
.toMap()
|
||||
|
||||
val platforms = parseRepeatableAttribute(platformString).map {
|
||||
if (it == "JVM")
|
||||
JvmPlatforms.defaultJvmPlatform.single()
|
||||
else
|
||||
platformsByPlatformName[it] ?: error(
|
||||
when (it) {
|
||||
"JVM" -> JvmPlatforms.defaultJvmPlatform.single()
|
||||
"Native" -> NativePlatforms.unspecifiedNativePlatform.single()
|
||||
else -> platformsByPlatformName[it] ?: error(
|
||||
"Unknown platform $it. Available platforms: ${platformsByPlatformName.keys.joinToString()}"
|
||||
)
|
||||
}
|
||||
}.toSet()
|
||||
|
||||
return TargetPlatform(platforms)
|
||||
|
||||
Reference in New Issue
Block a user