[analysis api, refactoring] get rid of HL name in class names
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ import org.jetbrains.kotlin.test.model.TestModule
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
import java.nio.file.Path
|
||||
|
||||
interface FrontendApiTestConfiguratorService {
|
||||
interface AnalysisApiTestConfiguratorService {
|
||||
val testPrefix: String? get() = null
|
||||
val allowDependedAnalysisSession: Boolean get() = true
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.jetbrains.kotlin.test.model.TestModule
|
||||
import org.jetbrains.kotlin.test.services.TestModuleStructure
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
|
||||
abstract class AbstractHLApiSingleModuleTest : AnalysisApiBasedTest() {
|
||||
abstract class AbstractAnalysisApiBasedSingleModuleTest : AbstractAnalysisApiBasedTest() {
|
||||
final override fun doTestByFileStructure(ktFiles: List<KtFile>, moduleStructure: TestModuleStructure, testServices: TestServices) {
|
||||
val singleModule = moduleStructure.modules.single()
|
||||
doTestByFileStructure(ktFiles, singleModule, testServices)
|
||||
+4
-4
@@ -11,7 +11,7 @@ import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.testFramework.TestDataFile
|
||||
import junit.framework.ComparisonFailure
|
||||
import org.jetbrains.kotlin.analysis.test.framework.FrontendApiTestConfiguratorService
|
||||
import org.jetbrains.kotlin.analysis.test.framework.AnalysisApiTestConfiguratorService
|
||||
import org.jetbrains.kotlin.analysis.test.framework.TestWithDisposable
|
||||
import org.jetbrains.kotlin.analysis.test.framework.project.structure.KotlinProjectStructureProviderTestImpl
|
||||
import org.jetbrains.kotlin.analysis.test.framework.project.structure.TestKtModuleProvider
|
||||
@@ -46,8 +46,8 @@ import java.util.concurrent.ExecutionException
|
||||
import kotlin.io.path.exists
|
||||
import kotlin.io.path.nameWithoutExtension
|
||||
|
||||
abstract class AnalysisApiBasedTest : TestWithDisposable() {
|
||||
abstract val configurator: FrontendApiTestConfiguratorService
|
||||
abstract class AbstractAnalysisApiBasedTest : TestWithDisposable() {
|
||||
abstract val configurator: AnalysisApiTestConfiguratorService
|
||||
|
||||
protected open val enableTestInDependedMode: Boolean
|
||||
get() = configurator.allowDependedAnalysisSession
|
||||
@@ -127,7 +127,7 @@ abstract class AnalysisApiBasedTest : TestWithDisposable() {
|
||||
configureTest(this)
|
||||
|
||||
startingArtifactFactory = { ResultingArtifact.Source() }
|
||||
this.testInfo = this@AnalysisApiBasedTest.testInfo
|
||||
this.testInfo = this@AbstractAnalysisApiBasedTest.testInfo
|
||||
}
|
||||
|
||||
protected open fun handleInitializationError(exception: Throwable, moduleStructure: TestModuleStructure): InitializationErrorAction =
|
||||
+1
-1
@@ -9,7 +9,7 @@ import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.test.model.TestModule
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
|
||||
abstract class AbstractHLApiSingleFileTest : AbstractHLApiSingleModuleTest() {
|
||||
abstract class AbstractAnalysisApiSingleFileTest : AbstractAnalysisApiBasedSingleModuleTest() {
|
||||
final override fun doTestByFileStructure(ktFiles: List<KtFile>, module: TestModule, testServices: TestServices) {
|
||||
val singleFile = ktFiles.singleOrNull() ?: ktFiles.first { it.name == "main.kt" }
|
||||
doTestByFileStructure(singleFile, module, testServices)
|
||||
Reference in New Issue
Block a user