Use absolute paths to locate existed projects to open in AbstractConfigureKotlinTest
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
124888eb43
commit
3d33ea7da8
@@ -19,7 +19,6 @@ import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess
|
|||||||
import com.intellij.testFramework.PlatformTestCase
|
import com.intellij.testFramework.PlatformTestCase
|
||||||
import com.intellij.testFramework.UsefulTestCase
|
import com.intellij.testFramework.UsefulTestCase
|
||||||
import junit.framework.TestCase
|
import junit.framework.TestCase
|
||||||
import junit.framework.TestResult
|
|
||||||
import org.jetbrains.kotlin.idea.configuration.KotlinWithLibraryConfigurator.FileState
|
import org.jetbrains.kotlin.idea.configuration.KotlinWithLibraryConfigurator.FileState
|
||||||
import org.jetbrains.kotlin.idea.framework.KotlinSdkType
|
import org.jetbrains.kotlin.idea.framework.KotlinSdkType
|
||||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase.*
|
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase.*
|
||||||
@@ -38,11 +37,6 @@ abstract class AbstractConfigureKotlinTest : PlatformTestCase() {
|
|||||||
VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory())
|
VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun run(result: TestResult?) {
|
|
||||||
// TODO: [VD] temporary ignore/disable these tests
|
|
||||||
// super.run(result)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Throws(Exception::class)
|
@Throws(Exception::class)
|
||||||
override fun tearDown() {
|
override fun tearDown() {
|
||||||
VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory())
|
VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory())
|
||||||
@@ -111,9 +105,10 @@ abstract class AbstractConfigureKotlinTest : PlatformTestCase() {
|
|||||||
get() = ModuleManager.getInstance(myProject).modules
|
get() = ModuleManager.getInstance(myProject).modules
|
||||||
|
|
||||||
override fun getProjectDirOrFile(): Path {
|
override fun getProjectDirOrFile(): Path {
|
||||||
val projectFilePath = projectRoot + "/projectFile.ipr"
|
val projectFilePath = "$projectRoot/projectFile.ipr"
|
||||||
TestCase.assertTrue("Project file should exists " + projectFilePath, File(projectFilePath).exists())
|
val file = File(projectFilePath).absoluteFile
|
||||||
return File(projectFilePath).toPath()
|
TestCase.assertTrue("Project file should exists $projectFilePath", file.exists())
|
||||||
|
return file.toPath()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun doCreateProject(projectFile: Path): Project {
|
override fun doCreateProject(projectFile: Path): Project {
|
||||||
|
|||||||
+4
-3
@@ -105,9 +105,10 @@ abstract class AbstractConfigureKotlinTest : PlatformTestCase() {
|
|||||||
get() = ModuleManager.getInstance(myProject).modules
|
get() = ModuleManager.getInstance(myProject).modules
|
||||||
|
|
||||||
override fun getProjectDirOrFile(): Path {
|
override fun getProjectDirOrFile(): Path {
|
||||||
val projectFilePath = projectRoot + "/projectFile.ipr"
|
val projectFilePath = "$projectRoot/projectFile.ipr"
|
||||||
TestCase.assertTrue("Project file should exists " + projectFilePath, File(projectFilePath).exists())
|
val file = File(projectFilePath).absoluteFile
|
||||||
return File(projectFilePath).toPath()
|
TestCase.assertTrue("Project file should exists $projectFilePath", file.exists())
|
||||||
|
return file.toPath()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun doCreateProject(projectFile: Path): Project {
|
override fun doCreateProject(projectFile: Path): Project {
|
||||||
|
|||||||
+4
-3
@@ -106,9 +106,10 @@ abstract class AbstractConfigureKotlinTest : PlatformTestCase() {
|
|||||||
get() = ModuleManager.getInstance(myProject).modules
|
get() = ModuleManager.getInstance(myProject).modules
|
||||||
|
|
||||||
override fun getProjectDirOrFile(isDirectoryBasedProject: Boolean): Path {
|
override fun getProjectDirOrFile(isDirectoryBasedProject: Boolean): Path {
|
||||||
val projectFilePath = projectRoot + "/projectFile.ipr"
|
val projectFilePath = "$projectRoot/projectFile.ipr"
|
||||||
TestCase.assertTrue("Project file should exists " + projectFilePath, File(projectFilePath).exists())
|
val file = File(projectFilePath).absoluteFile
|
||||||
return File(projectFilePath).toPath()
|
TestCase.assertTrue("Project file should exists $projectFilePath", file.exists())
|
||||||
|
return file.toPath()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun doCreateAndOpenProject(): Project {
|
override fun doCreateAndOpenProject(): Project {
|
||||||
|
|||||||
Reference in New Issue
Block a user