[AA] Turn KtModuleWithFiles into KtTestModule (AA test framework)
- `KtModuleWithFiles` isn't actually used in a production Standalone API context, but it was exposed via `analysis-api-standalone-base`. In current production usages, the project structure is built with the module builder DSL. - Hence, `KtModuleWithFiles` is only relevant for tests. This commit moves `KtModuleWithFiles` to the Analysis API test framework and renames it to `KtTestModule`. This removes any risk that an outside user could start using `KtModuleWithFiles` and completely uncouples the test project structure from production APIs. - In addition, we can add the `TestModule` to `KtTestModule`, allowing tests to quickly access the original test module, for example to check the test module kind. - The commit also removes the data class status of `KtTestModule` and `KtTestModuleProjectStructure` to avoid issues with destructuring when properties are added or removed. ^KT-65960
This commit is contained in:
committed by
Space Team
parent
878eba7d52
commit
2060709c03
+2
-2
@@ -8,7 +8,7 @@ package org.jetbrains.kotlin.light.classes.symbol.decompiled.test.configurators
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.test.configurators.AnalysisApiFirLibraryBinaryTestConfigurator
|
||||
import org.jetbrains.kotlin.analysis.api.standalone.base.project.structure.KtModuleProjectStructure
|
||||
import org.jetbrains.kotlin.analysis.test.framework.project.structure.KtTestModuleProjectStructure
|
||||
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiTestConfigurator
|
||||
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiTestServiceRegistrar
|
||||
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.FrontendKind
|
||||
@@ -32,7 +32,7 @@ object AnalysisApiSymbolLightClassesDecompiledTestConfigurator : AnalysisApiTest
|
||||
moduleStructure: TestModuleStructure,
|
||||
testServices: TestServices,
|
||||
project: Project
|
||||
): KtModuleProjectStructure {
|
||||
): KtTestModuleProjectStructure {
|
||||
return AnalysisApiFirLibraryBinaryTestConfigurator.createModules(moduleStructure, testServices, project)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user