[AA] Refactoring: Rename AbstractMemberScopeByFqNameTest to AbstractMemberScopeTest

^KT-61900
This commit is contained in:
Marco Pennekamp
2023-09-14 13:10:22 +02:00
committed by Space Team
parent 9db9f58fba
commit 1408556511
67 changed files with 60 additions and 60 deletions
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.analysis.test.framework.test.configurators.TestModul
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.FrontendKind;
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisSessionMode;
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiMode;
import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.scopeProvider.AbstractMemberScopeByFqNameTest;
import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.scopeProvider.AbstractMemberScopeTest;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
@@ -25,9 +25,9 @@ import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.analysis.api.GenerateAnalysisApiTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName")
@TestMetadata("analysis/analysis-api/testData/components/scopeProvider/memberScope")
@TestDataPath("$PROJECT_ROOT")
public class FirIdeNormalAnalysisScriptSourceModuleMemberScopeByFqNameTestGenerated extends AbstractMemberScopeByFqNameTest {
public class FirIdeNormalAnalysisScriptSourceModuleMemberScopeTestGenerated extends AbstractMemberScopeTest {
@NotNull
@Override
public AnalysisApiTestConfigurator getConfigurator() {
@@ -42,17 +42,17 @@ public class FirIdeNormalAnalysisScriptSourceModuleMemberScopeByFqNameTestGenera
}
@Test
public void testAllFilesPresentInMemberScopeByFqName() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName"), Pattern.compile("^(.+)\\.kts$"), null, true);
public void testAllFilesPresentInMemberScope() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/memberScope"), Pattern.compile("^(.+)\\.kts$"), null, true);
}
@Nested
@TestMetadata("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/withTestCompilerPluginEnabled")
@TestMetadata("analysis/analysis-api/testData/components/scopeProvider/memberScope/withTestCompilerPluginEnabled")
@TestDataPath("$PROJECT_ROOT")
public class WithTestCompilerPluginEnabled {
@Test
public void testAllFilesPresentInWithTestCompilerPluginEnabled() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/withTestCompilerPluginEnabled"), Pattern.compile("^(.+)\\.kts$"), null, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/memberScope/withTestCompilerPluginEnabled"), Pattern.compile("^(.+)\\.kts$"), null, true);
}
}
}
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.analysis.test.framework.test.configurators.TestModul
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.FrontendKind;
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisSessionMode;
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiMode;
import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.scopeProvider.AbstractMemberScopeByFqNameTest;
import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.scopeProvider.AbstractMemberScopeTest;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
@@ -25,9 +25,9 @@ import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.analysis.api.GenerateAnalysisApiTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName")
@TestMetadata("analysis/analysis-api/testData/components/scopeProvider/memberScope")
@TestDataPath("$PROJECT_ROOT")
public class FirIdeNormalAnalysisSourceModuleMemberScopeByFqNameTestGenerated extends AbstractMemberScopeByFqNameTest {
public class FirIdeNormalAnalysisSourceModuleMemberScopeTestGenerated extends AbstractMemberScopeTest {
@NotNull
@Override
public AnalysisApiTestConfigurator getConfigurator() {
@@ -42,137 +42,137 @@ public class FirIdeNormalAnalysisSourceModuleMemberScopeByFqNameTestGenerated ex
}
@Test
public void testAllFilesPresentInMemberScopeByFqName() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName"), Pattern.compile("^(.+)\\.kt$"), null, true);
public void testAllFilesPresentInMemberScope() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/memberScope"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("class.kt")
public void testClass() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/class.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/class.kt");
}
@Test
@TestMetadata("dataClass.kt")
public void testDataClass() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/dataClass.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/dataClass.kt");
}
@Test
@TestMetadata("enumClass.kt")
public void testEnumClass() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumClass.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumClass.kt");
}
@Test
@TestMetadata("enumClassWithAbstractMembers.kt")
public void testEnumClassWithAbstractMembers() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumClassWithAbstractMembers.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumClassWithAbstractMembers.kt");
}
@Test
@TestMetadata("enumClassWithFinalMembers.kt")
public void testEnumClassWithFinalMembers() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumClassWithFinalMembers.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumClassWithFinalMembers.kt");
}
@Test
@TestMetadata("enumEntryInitializer.kt")
public void testEnumEntryInitializer() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntryInitializer.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumEntryInitializer.kt");
}
@Test
@TestMetadata("enumEntryInitializerWithFinalEnumMember.kt")
public void testEnumEntryInitializerWithFinalEnumMember() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntryInitializerWithFinalEnumMember.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumEntryInitializerWithFinalEnumMember.kt");
}
@Test
@TestMetadata("enumEntryInitializerWithOverriddenMember.kt")
public void testEnumEntryInitializerWithOverriddenMember() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntryInitializerWithOverriddenMember.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumEntryInitializerWithOverriddenMember.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/Int.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/Int.kt");
}
@Test
@TestMetadata("javaClass.kt")
public void testJavaClass() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/javaClass.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/javaClass.kt");
}
@Test
@TestMetadata("javaField.kt")
public void testJavaField() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/javaField.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/javaField.kt");
}
@Test
@TestMetadata("javaFieldClash.kt")
public void testJavaFieldClash() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/javaFieldClash.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/javaFieldClash.kt");
}
@Test
@TestMetadata("javaMethods.kt")
public void testJavaMethods() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/javaMethods.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/javaMethods.kt");
}
@Test
@TestMetadata("java.lang.String.kt")
public void testJava_lang_String() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/java.lang.String.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/java.lang.String.kt");
}
@Test
@TestMetadata("kotlin.Function2.kt")
public void testKotlin_Function2() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/kotlin.Function2.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/kotlin.Function2.kt");
}
@Test
@TestMetadata("MutableList.kt")
public void testMutableList() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/MutableList.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/MutableList.kt");
}
@Test
@TestMetadata("substitutionOverride.kt")
public void testSubstitutionOverride() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/substitutionOverride.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/substitutionOverride.kt");
}
@Nested
@TestMetadata("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/withTestCompilerPluginEnabled")
@TestMetadata("analysis/analysis-api/testData/components/scopeProvider/memberScope/withTestCompilerPluginEnabled")
@TestDataPath("$PROJECT_ROOT")
public class WithTestCompilerPluginEnabled {
@Test
public void testAllFilesPresentInWithTestCompilerPluginEnabled() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/withTestCompilerPluginEnabled"), Pattern.compile("^(.+)\\.kt$"), null, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/memberScope/withTestCompilerPluginEnabled"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("customSerlializable.kt")
public void testCustomSerlializable() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/withTestCompilerPluginEnabled/customSerlializable.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/withTestCompilerPluginEnabled/customSerlializable.kt");
}
@Test
@TestMetadata("generatedCompanionWithFoo.kt")
public void testGeneratedCompanionWithFoo() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/withTestCompilerPluginEnabled/generatedCompanionWithFoo.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/withTestCompilerPluginEnabled/generatedCompanionWithFoo.kt");
}
@Test
@TestMetadata("nestedClassAndMaterializeMember.kt")
public void testNestedClassAndMaterializeMember() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/withTestCompilerPluginEnabled/nestedClassAndMaterializeMember.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/withTestCompilerPluginEnabled/nestedClassAndMaterializeMember.kt");
}
}
}
@@ -27,7 +27,7 @@ abstract class AbstractMemberScopeTestBase : AbstractSymbolByFqNameTest() {
}
}
abstract class AbstractMemberScopeByFqNameTest : AbstractMemberScopeTestBase() {
abstract class AbstractMemberScopeTest : AbstractMemberScopeTestBase() {
context(KtAnalysisSession)
override fun KtSymbolWithMembers.getSymbolsFromScope(): Sequence<KtDeclarationSymbol> = getMemberScope().getAllSymbols()
}
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.analysis.test.framework.test.configurators.TestModul
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.FrontendKind;
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisSessionMode;
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiMode;
import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.scopeProvider.AbstractMemberScopeByFqNameTest;
import org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.scopeProvider.AbstractMemberScopeTest;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
@@ -25,9 +25,9 @@ import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.analysis.api.GenerateAnalysisApiTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName")
@TestMetadata("analysis/analysis-api/testData/components/scopeProvider/memberScope")
@TestDataPath("$PROJECT_ROOT")
public class FirStandaloneNormalAnalysisSourceModuleMemberScopeByFqNameTestGenerated extends AbstractMemberScopeByFqNameTest {
public class FirStandaloneNormalAnalysisSourceModuleMemberScopeTestGenerated extends AbstractMemberScopeTest {
@NotNull
@Override
public AnalysisApiTestConfigurator getConfigurator() {
@@ -42,109 +42,109 @@ public class FirStandaloneNormalAnalysisSourceModuleMemberScopeByFqNameTestGener
}
@Test
public void testAllFilesPresentInMemberScopeByFqName() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName"), Pattern.compile("^(.+)\\.kt$"), null, true, "withTestCompilerPluginEnabled");
public void testAllFilesPresentInMemberScope() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/memberScope"), Pattern.compile("^(.+)\\.kt$"), null, true, "withTestCompilerPluginEnabled");
}
@Test
@TestMetadata("class.kt")
public void testClass() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/class.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/class.kt");
}
@Test
@TestMetadata("dataClass.kt")
public void testDataClass() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/dataClass.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/dataClass.kt");
}
@Test
@TestMetadata("enumClass.kt")
public void testEnumClass() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumClass.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumClass.kt");
}
@Test
@TestMetadata("enumClassWithAbstractMembers.kt")
public void testEnumClassWithAbstractMembers() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumClassWithAbstractMembers.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumClassWithAbstractMembers.kt");
}
@Test
@TestMetadata("enumClassWithFinalMembers.kt")
public void testEnumClassWithFinalMembers() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumClassWithFinalMembers.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumClassWithFinalMembers.kt");
}
@Test
@TestMetadata("enumEntryInitializer.kt")
public void testEnumEntryInitializer() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntryInitializer.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumEntryInitializer.kt");
}
@Test
@TestMetadata("enumEntryInitializerWithFinalEnumMember.kt")
public void testEnumEntryInitializerWithFinalEnumMember() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntryInitializerWithFinalEnumMember.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumEntryInitializerWithFinalEnumMember.kt");
}
@Test
@TestMetadata("enumEntryInitializerWithOverriddenMember.kt")
public void testEnumEntryInitializerWithOverriddenMember() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntryInitializerWithOverriddenMember.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/enumEntryInitializerWithOverriddenMember.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/Int.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/Int.kt");
}
@Test
@TestMetadata("javaClass.kt")
public void testJavaClass() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/javaClass.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/javaClass.kt");
}
@Test
@TestMetadata("javaField.kt")
public void testJavaField() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/javaField.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/javaField.kt");
}
@Test
@TestMetadata("javaFieldClash.kt")
public void testJavaFieldClash() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/javaFieldClash.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/javaFieldClash.kt");
}
@Test
@TestMetadata("javaMethods.kt")
public void testJavaMethods() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/javaMethods.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/javaMethods.kt");
}
@Test
@TestMetadata("java.lang.String.kt")
public void testJava_lang_String() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/java.lang.String.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/java.lang.String.kt");
}
@Test
@TestMetadata("kotlin.Function2.kt")
public void testKotlin_Function2() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/kotlin.Function2.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/kotlin.Function2.kt");
}
@Test
@TestMetadata("MutableList.kt")
public void testMutableList() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/MutableList.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/MutableList.kt");
}
@Test
@TestMetadata("substitutionOverride.kt")
public void testSubstitutionOverride() throws Exception {
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/substitutionOverride.kt");
runTest("analysis/analysis-api/testData/components/scopeProvider/memberScope/substitutionOverride.kt");
}
}
@@ -476,14 +476,14 @@ private fun AnalysisApiTestGroup.generateAnalysisApiComponentsTests() {
}
test(
AbstractMemberScopeByFqNameTest::class,
AbstractMemberScopeTest::class,
filter = frontendIs(FrontendKind.Fir),
) {
when (it.analysisApiMode) {
AnalysisApiMode.Ide ->
model(it, "memberScopeByFqName")
model(it, "memberScope")
AnalysisApiMode.Standalone ->
model(it, "memberScopeByFqName", excludeDirsRecursively = listOf("withTestCompilerPluginEnabled"))
model(it, "memberScope", excludeDirsRecursively = listOf("withTestCompilerPluginEnabled"))
}
}