[AA] Add KtTestModule.moduleKind

- `TestModule.explicitTestModuleKind` requires a directive to be present
  to get the `TestModuleKind`. But we still want to find out the test
  module kind for test modules without a directive. Hence, we have to
  add this property to `KtTestModule` during its construction.

^KT-65960
This commit is contained in:
Marco Pennekamp
2024-02-20 22:09:48 +01:00
committed by Space Team
parent dc0f498b15
commit 7baaa38b8a
14 changed files with 55 additions and 21 deletions
@@ -41,6 +41,8 @@ object AnalysisApiFirTestConfiguratorFactory : AnalysisApiTestConfiguratorFactor
AnalysisSessionMode.Normal -> AnalysisApiFirCodeFragmentTestConfigurator(analyseInDependentSession = false)
AnalysisSessionMode.Dependent -> AnalysisApiFirCodeFragmentTestConfigurator(analyseInDependentSession = true)
}
else -> unsupportedModeError(data)
}
}
@@ -59,6 +61,8 @@ object AnalysisApiFirTestConfiguratorFactory : AnalysisApiTestConfiguratorFactor
TestModuleKind.CodeFragment -> {
data.analysisSessionMode == AnalysisSessionMode.Normal
}
TestModuleKind.NotUnderContentRoot -> false
}
}
}