KTIJ-26713 [AA] Clean-up KtFirReferenceShortener

- revert some accidental changes in
`findSmallestElementOfTypeContainingSelection` function (see 48433bf9)
- simplify `dropFakeRootPrefixIfPresent` by using `tail`, add a new
test-case to check that it works
- simplify `findClassifierElementsToShorten` by not passing lambdas and
calling a common functions instead
This commit is contained in:
Roman Golyshev
2023-08-20 15:24:47 +02:00
committed by teamcity
parent 24a13348c4
commit b760046f93
5 changed files with 72 additions and 38 deletions
@@ -292,6 +292,12 @@ public class FirStandaloneNormalAnalysisSourceModuleReferenceShortenerTestGenera
runTest("analysis/analysis-api/testData/components/referenceShortener/referenceShortener/kdocQualifierSelected.kt");
}
@Test
@TestMetadata("kdocQualifierSelected_rootIdePrefix.kt")
public void testKdocQualifierSelected_rootIdePrefix() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/referenceShortener/kdocQualifierSelected_rootIdePrefix.kt");
}
@Test
@TestMetadata("kdocUnresolved.kt")
public void testKdocUnresolved() throws Exception {