[Analysis API] Minor, improve naming for 'computeTestDataPath()'
This commit is contained in:
+1
-1
@@ -72,7 +72,7 @@ object AnalysisApiFe10TestConfigurator : AnalysisApiTestConfigurator() {
|
|||||||
JvmResolveUtil.analyze(project, files.filterIsInstance<KtFile>(), compilerConfiguration, packageProviderFactory)
|
JvmResolveUtil.analyze(project, files.filterIsInstance<KtFile>(), compilerConfiguration, packageProviderFactory)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun preprocessTestDataPath(path: Path): Path {
|
override fun computeTestDataPath(path: Path): Path {
|
||||||
val newPath = path.resolveSibling(path.nameWithoutExtension + "." + testPrefix + "." + path.extension)
|
val newPath = path.resolveSibling(path.nameWithoutExtension + "." + testPrefix + "." + path.extension)
|
||||||
if (newPath.toFile().exists()) return newPath
|
if (newPath.toFile().exists()) return newPath
|
||||||
return path
|
return path
|
||||||
|
|||||||
+1
-1
@@ -293,7 +293,7 @@ abstract class AbstractAnalysisApiBasedTest : TestWithDisposable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected fun runTest(@TestDataFile path: String) {
|
protected fun runTest(@TestDataFile path: String) {
|
||||||
testDataPath = configurator.preprocessTestDataPath(Paths.get(path))
|
testDataPath = configurator.computeTestDataPath(Paths.get(path))
|
||||||
val testConfiguration = createTestConfiguration()
|
val testConfiguration = createTestConfiguration()
|
||||||
testServices = testConfiguration.testServices
|
testServices = testConfiguration.testServices
|
||||||
val moduleStructure = createModuleStructure(testConfiguration)
|
val moduleStructure = createModuleStructure(testConfiguration)
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@ abstract class AnalysisApiTestConfigurator {
|
|||||||
KotlinGlobalModificationService.getInstance(project).publishGlobalModuleStateModification()
|
KotlinGlobalModificationService.getInstance(project).publishGlobalModuleStateModification()
|
||||||
}
|
}
|
||||||
|
|
||||||
open fun preprocessTestDataPath(path: Path): Path = path
|
open fun computeTestDataPath(path: Path): Path = path
|
||||||
|
|
||||||
abstract fun createModules(moduleStructure: TestModuleStructure, testServices: TestServices, project: Project): KtModuleProjectStructure
|
abstract fun createModules(moduleStructure: TestModuleStructure, testServices: TestServices, project: Project): KtModuleProjectStructure
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user