[AA] Support multi-module tests with mixed KtModule kinds

- This commit adds a `MODULE_KIND` directive to Analysis API tests which
  can be used to change a test module's `KtModule` kind from the default
  determined by the test's registered `KtModuleFactory` (which in turn
  depends on the `moduleKind` configured during test generation).
- The most important use case is the ability to have multi-module tests
  where a main module references symbols from a binary library module.
  This use case requires source configurations to compile libraries,
  which requires additional setup. This will be implemented in a
  following commit.

^KT-64468 Fixed
This commit is contained in:
Marco Pennekamp
2023-12-20 00:40:25 +01:00
committed by Space Team
parent 69a2bc9abc
commit d3d21b3f34
17 changed files with 187 additions and 103 deletions
@@ -38,7 +38,7 @@ object AnalysisApiFe10TestConfigurator : AnalysisApiTestConfigurator() {
override fun configureTest(builder: TestConfigurationBuilder, disposable: Disposable) {
builder.apply {
useAdditionalService<KtModuleFactory> { KtSourceModuleFactory() }
useAdditionalService<KtModuleFactory> { KtSourceModuleFactory }
}
}