[AA] Allow specifying REx file contents in testdata.
Tests can now specify the code generated by a resolve extension from within the test's testdata. Module-level directives control whether resolve extensions are enabled for that module, as well as package names and source shadowing regexes. File-level directives allow a `// FILE:` block within the testdata to be converted into a KtResolveExtensionFile and removed from the module as a whole. (This requires a new `ModuleStructureTransformer`, because we need to be able to entirely remove the files in question.) Any test can add support for these directives by calling `KtResolveExtensionTestSupport.configure` from within their `configureTest` stanza. This allows this functionality to be used in conjuction with any test base class. ^KT-59329
This commit is contained in:
committed by
Ilya Kirillov
parent
7a69f13fd6
commit
734b87b97e
+1
-5
@@ -90,13 +90,9 @@ private fun AnalysisApiTestGroup.generateResolveExtensionsTests() {
|
||||
frontendIs(FrontendKind.Fir) and
|
||||
testModuleKindIs(TestModuleKind.Source)
|
||||
) {
|
||||
test(AbstractSingleModuleReferenceResolveWithResolveExtensionTest::class) {
|
||||
test(AbstractReferenceResolveWithResolveExtensionTest::class) {
|
||||
model("referenceResolve")
|
||||
}
|
||||
|
||||
test(AbstractMultiModuleReferenceResolveWithResolveExtensionTest::class) {
|
||||
model("multiModule/referenceResolve")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user