Fix configuration tests with latest runtime

This commit is contained in:
Natalia Selezneva
2018-10-25 00:42:41 +03:00
parent f364717da2
commit cbd54e7867
9 changed files with 17 additions and 6 deletions
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="KotlinCommonCompilerArguments"> <component name="KotlinCommonCompilerArguments">
<option name="apiVersion" value="1.2" /> <option name="apiVersion" value="1.3" />
<option name="languageVersion" value="1.2" /> <option name="languageVersion" value="1.3" />
</component> </component>
</project> </project>
@@ -1,7 +1,7 @@
<component name="libraryTable"> <component name="libraryTable">
<library name="KotlinJavaRuntime"> <library name="KotlinJavaRuntime">
<CLASSES> <CLASSES>
<root url="jar://$PROJECT_DIR$/lib/kotlin-runtime.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/kotlin-stdlib.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
@@ -9,11 +9,11 @@
<component name="libraryTable"> <component name="libraryTable">
<library name="KotlinJavaRuntime"> <library name="KotlinJavaRuntime">
<CLASSES> <CLASSES>
<root url="jar://$TEMP_TEST_DIR$/kotlin-runtime.jar!/" /> <root url="jar://$TEMP_TEST_DIR$/kotlin-stblib.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="jar://$TEMP_TEST_DIR$/kotlin-runtime.jar!/src" /> <root url="jar://$TEMP_TEST_DIR$/kotlin-stblib.jar!/src" />
</SOURCES> </SOURCES>
</library> </library>
</component> </component>
@@ -1,7 +1,7 @@
<component name="libraryTable"> <component name="libraryTable">
<library name="KotlinJavaRuntime"> <library name="KotlinJavaRuntime">
<CLASSES> <CLASSES>
<root url="jar://$PROJECT_DIR$/lib/kotlin-runtime.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/kotlin-stdlib.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
@@ -6,6 +6,7 @@
package org.jetbrains.kotlin.idea.configuration package org.jetbrains.kotlin.idea.configuration
import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.io.FileUtil
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
import org.junit.Assert import org.junit.Assert
import java.io.File import java.io.File
import java.nio.file.Path import java.nio.file.Path
@@ -18,6 +19,11 @@ abstract class AbstractConfigureKotlinInTempDirTest : AbstractConfigureKotlinTes
FileUtil.copyDir(File(projectRoot), tempDir) FileUtil.copyDir(File(projectRoot), tempDir)
val kotlinRuntime = File(tempDir, "lib/kotlin-stdlib.jar")
if (getTestName(true).toLowerCase().contains("latestruntime") && kotlinRuntime.exists()) {
ForTestCompileRuntime.runtimeJarForTests().copyTo(kotlinRuntime, overwrite = true)
}
val projectRoot = tempDir.path val projectRoot = tempDir.path
val projectFilePath = projectRoot + "/projectFile.ipr" val projectFilePath = projectRoot + "/projectFile.ipr"
@@ -18,6 +18,11 @@ abstract class AbstractConfigureKotlinInTempDirTest : AbstractConfigureKotlinTes
FileUtil.copyDir(File(projectRoot), tempDir) FileUtil.copyDir(File(projectRoot), tempDir)
val kotlinRuntime = File(tempDir, "lib/kotlin-stdlib.jar")
if (getTestName(true).toLowerCase().contains("latestruntime") && kotlinRuntime.exists()) {
ForTestCompileRuntime.runtimeJarForTests().copyTo(kotlinRuntime, overwrite = true)
}
val projectRoot = tempDir.path val projectRoot = tempDir.path
val projectFilePath = projectRoot + "/projectFile.ipr" val projectFilePath = projectRoot + "/projectFile.ipr"