[FIR IDE] Move testPrefix to FrontendApiTestConfiguratorService

This commit is contained in:
Yan Zhulanow
2021-10-19 22:38:17 +09:00
committed by teamcityserver
parent e12c7d1292
commit a1280ed723
15 changed files with 7 additions and 43 deletions
@@ -36,6 +36,9 @@ import java.util.concurrent.ExecutionException
import kotlin.io.path.nameWithoutExtension
interface FrontendApiTestConfiguratorService {
val testPrefix: String?
get() = null
fun TestConfigurationBuilder.configureTest(disposable: Disposable)
fun processTestFiles(files: List<KtFile>): List<KtFile> = files
@@ -58,9 +61,6 @@ abstract class AbstractFrontendApiTest : TestWithDisposable() {
protected abstract val configurator: FrontendApiTestConfiguratorService
protected open val testPrefix: String?
get() = null
protected open fun configureTest(builder: TestConfigurationBuilder) {
with(configurator) {
builder.configureTest(disposable)
@@ -73,7 +73,7 @@ abstract class AbstractFrontendApiTest : TestWithDisposable() {
val extensionWithDot = "." + extension.removePrefix(".")
val baseName = testDataPath.nameWithoutExtension
val testPrefix = this.testPrefix
val testPrefix = configurator.testPrefix
if (testPrefix != null) {
val prefixedFile = testDataPath.resolveSibling("$baseName.$testPrefix$extensionWithDot")
if (prefixedFile.exists()) {