Cleanup compiler warnings in compiler tests

This commit is contained in:
Alexander Udalov
2019-08-28 14:52:13 +02:00
parent 90a37617a4
commit 77399a175e
8 changed files with 21 additions and 21 deletions
@@ -17,7 +17,6 @@
package org.jetbrains.kotlin.util
import com.intellij.openapi.util.io.FileUtil
import com.intellij.util.Processor
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
import org.jetbrains.kotlin.config.KotlinCompilerVersion
import org.jetbrains.kotlin.config.LanguageVersion
@@ -27,7 +26,6 @@ import org.junit.Assert
import org.xml.sax.Attributes
import org.xml.sax.helpers.DefaultHandler
import java.io.File
import java.util.*
import javax.xml.parsers.SAXParserFactory
class KotlinVersionsTest : KtUsefulTestCase() {
@@ -89,16 +87,17 @@ class KotlinVersionsTest : KtUsefulTestCase() {
val poms = arrayListOf<Pom>()
FileUtil.processFilesRecursively(File("libraries"), Processor { file ->
if (file.name == "pom.xml") {
FileUtil.processFilesRecursively(File("libraries")) { file ->
if (file.name == "pom.xml" && file.toPath().none { it.fileName.toString() == "target" }) {
println(file.path)
if (loadValueFromPomXml(file.path, listOf("project", "parent", "artifactId")) == "kotlin-project") {
val version = loadValueFromPomXml(file.path, listOf("project", "parent", "version"))
?: error("No version found in pom.xml at $file")
?: error("No version found in pom.xml at $file")
poms.add(Pom(file.path, version))
}
}
true
}, Processor { file -> file.name != "target" })
}
Assert.assertTrue(
"Too few (<= 10) pom.xml files found. Something must be wrong in the test or in the project structure",