KTIJ-27841 [AA] Add simple test cases for the classes with same name conflicts

This commit is contained in:
Roman Golyshev
2024-01-10 21:44:32 +01:00
committed by teamcity
parent 0e244b3fbf
commit 1e2f612cbc
21 changed files with 358 additions and 0 deletions
@@ -658,6 +658,80 @@ public class FirStandaloneNormalAnalysisSourceModuleReferenceShortenerTestGenera
runTest("analysis/analysis-api/testData/components/referenceShortener/shortenRange/_rootIdePackage_IsNotRemovedIfNotSelected.kt");
}
@Nested
@TestMetadata("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts")
@TestDataPath("$PROJECT_ROOT")
public class Conflicts {
@Test
public void testAllFilesPresentInConflicts() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Nested
@TestMetadata("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts/classWithSameName")
@TestDataPath("$PROJECT_ROOT")
public class ClassWithSameName {
@Test
public void testAllFilesPresentInClassWithSameName() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts/classWithSameName"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("constructorCall_vs_constructorCall.kt")
public void testConstructorCall_vs_constructorCall() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts/classWithSameName/constructorCall_vs_constructorCall.kt");
}
@Test
@TestMetadata("constructorCall_vs_noUsages.kt")
public void testConstructorCall_vs_noUsages() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts/classWithSameName/constructorCall_vs_noUsages.kt");
}
@Test
@TestMetadata("constructorCall_vs_typeRefs.kt")
public void testConstructorCall_vs_typeRefs() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts/classWithSameName/constructorCall_vs_typeRefs.kt");
}
@Test
@TestMetadata("qualifier_vs_constructorCall.kt")
public void testQualifier_vs_constructorCall() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts/classWithSameName/qualifier_vs_constructorCall.kt");
}
@Test
@TestMetadata("qualifier_vs_noUsages.kt")
public void testQualifier_vs_noUsages() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts/classWithSameName/qualifier_vs_noUsages.kt");
}
@Test
@TestMetadata("qualifier_vs_typeRef.kt")
public void testQualifier_vs_typeRef() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts/classWithSameName/qualifier_vs_typeRef.kt");
}
@Test
@TestMetadata("typeRef_vs_constructorCall.kt")
public void testTypeRef_vs_constructorCall() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts/classWithSameName/typeRef_vs_constructorCall.kt");
}
@Test
@TestMetadata("typeRef_vs_noUsages.kt")
public void testTypeRef_vs_noUsages() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts/classWithSameName/typeRef_vs_noUsages.kt");
}
@Test
@TestMetadata("typeRef_vs_typeRef.kt")
public void testTypeRef_vs_typeRef() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/shortenRange/conflicts/classWithSameName/typeRef_vs_typeRef.kt");
}
}
}
@Nested
@TestMetadata("analysis/analysis-api/testData/components/referenceShortener/shortenRange/nestedClasses")
@TestDataPath("$PROJECT_ROOT")