[Analysis API] do not generate standalone tests which use compiler plugin
This commit is contained in:
+2
-24
@@ -43,7 +43,7 @@ public class FirStandaloneNormalAnalysisSourceModuleResolveCallTestGenerated ext
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAllFilesPresentInResolveCall() throws Exception {
|
public void testAllFilesPresentInResolveCall() throws Exception {
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/callResolver/resolveCall"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/callResolver/resolveCall"), Pattern.compile("^(.+)\\.kt$"), null, true, "withTestCompilerPluginEnabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -844,7 +844,7 @@ public class FirStandaloneNormalAnalysisSourceModuleResolveCallTestGenerated ext
|
|||||||
public class Assignments {
|
public class Assignments {
|
||||||
@Test
|
@Test
|
||||||
public void testAllFilesPresentInAssignments() throws Exception {
|
public void testAllFilesPresentInAssignments() throws Exception {
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/callResolver/resolveCall/assignments"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/callResolver/resolveCall/assignments"), Pattern.compile("^(.+)\\.kt$"), null, true, "withTestCompilerPluginEnabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -853,26 +853,4 @@ public class FirStandaloneNormalAnalysisSourceModuleResolveCallTestGenerated ext
|
|||||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/assignments/insidePlusAssignTarget.kt");
|
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/assignments/insidePlusAssignTarget.kt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nested
|
|
||||||
@TestMetadata("analysis/analysis-api/testData/components/callResolver/resolveCall/withTestCompilerPluginEnabled")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
public class WithTestCompilerPluginEnabled {
|
|
||||||
@Test
|
|
||||||
public void testAllFilesPresentInWithTestCompilerPluginEnabled() throws Exception {
|
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/callResolver/resolveCall/withTestCompilerPluginEnabled"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("customSerlializable.kt")
|
|
||||||
public void testCustomSerlializable() throws Exception {
|
|
||||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/withTestCompilerPluginEnabled/customSerlializable.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("dummyFunction.kt")
|
|
||||||
public void testDummyFunction() throws Exception {
|
|
||||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/withTestCompilerPluginEnabled/dummyFunction.kt");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-29
@@ -43,7 +43,7 @@ public class FirStandaloneNormalAnalysisSourceModuleMemberScopeByFqNameTestGener
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAllFilesPresentInMemberScopeByFqName() throws Exception {
|
public void testAllFilesPresentInMemberScopeByFqName() throws Exception {
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/scopes/memberScopeByFqName"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/scopes/memberScopeByFqName"), Pattern.compile("^(.+)\\.kt$"), null, true, "withTestCompilerPluginEnabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -81,32 +81,4 @@ public class FirStandaloneNormalAnalysisSourceModuleMemberScopeByFqNameTestGener
|
|||||||
public void testMutableList() throws Exception {
|
public void testMutableList() throws Exception {
|
||||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/MutableList.kt");
|
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/MutableList.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nested
|
|
||||||
@TestMetadata("analysis/analysis-api/testData/scopes/memberScopeByFqName/withTestCompilerPluginEnabled")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
public class WithTestCompilerPluginEnabled {
|
|
||||||
@Test
|
|
||||||
public void testAllFilesPresentInWithTestCompilerPluginEnabled() throws Exception {
|
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/scopes/memberScopeByFqName/withTestCompilerPluginEnabled"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("customSerlializable.kt")
|
|
||||||
public void testCustomSerlializable() throws Exception {
|
|
||||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/withTestCompilerPluginEnabled/customSerlializable.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("generatedCompanionWithFoo.kt")
|
|
||||||
public void testGeneratedCompanionWithFoo() throws Exception {
|
|
||||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/withTestCompilerPluginEnabled/generatedCompanionWithFoo.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("nestedClassAndMaterializeMember.kt")
|
|
||||||
public void testNestedClassAndMaterializeMember() throws Exception {
|
|
||||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/withTestCompilerPluginEnabled/nestedClassAndMaterializeMember.kt");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-17
@@ -43,7 +43,7 @@ public class FirStandaloneNormalAnalysisSourceModuleSymbolByFqNameTestGenerated
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAllFilesPresentInSymbolByFqName() throws Exception {
|
public void testAllFilesPresentInSymbolByFqName() throws Exception {
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/symbols/symbolByFqName"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/symbols/symbolByFqName"), Pattern.compile("^(.+)\\.kt$"), null, true, "withTestCompilerPluginEnabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -99,20 +99,4 @@ public class FirStandaloneNormalAnalysisSourceModuleSymbolByFqNameTestGenerated
|
|||||||
public void testNestedClass() throws Exception {
|
public void testNestedClass() throws Exception {
|
||||||
runTest("analysis/analysis-api/testData/symbols/symbolByFqName/nestedClass.kt");
|
runTest("analysis/analysis-api/testData/symbols/symbolByFqName/nestedClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nested
|
|
||||||
@TestMetadata("analysis/analysis-api/testData/symbols/symbolByFqName/withTestCompilerPluginEnabled")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
public class WithTestCompilerPluginEnabled {
|
|
||||||
@Test
|
|
||||||
public void testAllFilesPresentInWithTestCompilerPluginEnabled() throws Exception {
|
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/symbols/symbolByFqName/withTestCompilerPluginEnabled"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("myInterfaceSupertype.kt")
|
|
||||||
public void testMyInterfaceSupertype() throws Exception {
|
|
||||||
runTest("analysis/analysis-api/testData/symbols/symbolByFqName/withTestCompilerPluginEnabled/myInterfaceSupertype.kt");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-17
@@ -49,7 +49,7 @@ public class FirStandaloneNormalAnalysisSourceModuleSymbolByReferenceTestGenerat
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAllFilesPresentInSymbolByReference() throws Exception {
|
public void testAllFilesPresentInSymbolByReference() throws Exception {
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/symbols/symbolByReference"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/symbols/symbolByReference"), Pattern.compile("^(.+)\\.kt$"), null, true, "withTestCompilerPluginEnabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -87,20 +87,4 @@ public class FirStandaloneNormalAnalysisSourceModuleSymbolByReferenceTestGenerat
|
|||||||
public void testSamConstructor() throws Exception {
|
public void testSamConstructor() throws Exception {
|
||||||
runTest("analysis/analysis-api/testData/symbols/symbolByReference/samConstructor.kt");
|
runTest("analysis/analysis-api/testData/symbols/symbolByReference/samConstructor.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nested
|
|
||||||
@TestMetadata("analysis/analysis-api/testData/symbols/symbolByReference/withTestCompilerPluginEnabled")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
public class WithTestCompilerPluginEnabled {
|
|
||||||
@Test
|
|
||||||
public void testAllFilesPresentInWithTestCompilerPluginEnabled() throws Exception {
|
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/symbols/symbolByReference/withTestCompilerPluginEnabled"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("generatedCompanionWorksAsValue.kt")
|
|
||||||
public void testGeneratedCompanionWorksAsValue() throws Exception {
|
|
||||||
runTest("analysis/analysis-api/testData/symbols/symbolByReference/withTestCompilerPluginEnabled/generatedCompanionWorksAsValue.kt");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+28
-5
@@ -88,7 +88,12 @@ private fun AnalysisApiTestGroup.generateAnalysisApiNonComponentsTests() {
|
|||||||
AbstractMemberScopeByFqNameTest::class,
|
AbstractMemberScopeByFqNameTest::class,
|
||||||
filter = frontendIs(FrontendKind.Fir),
|
filter = frontendIs(FrontendKind.Fir),
|
||||||
) {
|
) {
|
||||||
model("memberScopeByFqName")
|
when (it.analysisApiMode) {
|
||||||
|
AnalysisApiMode.Ide ->
|
||||||
|
model("memberScopeByFqName")
|
||||||
|
AnalysisApiMode.Standalone ->
|
||||||
|
model("memberScopeByFqName", excludeDirsRecursively = listOf("withTestCompilerPluginEnabled"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test(AbstractFileScopeTest::class) {
|
test(AbstractFileScopeTest::class) {
|
||||||
@@ -108,11 +113,21 @@ private fun AnalysisApiTestGroup.generateAnalysisApiNonComponentsTests() {
|
|||||||
test(
|
test(
|
||||||
AbstractSymbolByFqNameTest::class
|
AbstractSymbolByFqNameTest::class
|
||||||
) {
|
) {
|
||||||
model("symbolByFqName")
|
when (it.analysisApiMode) {
|
||||||
|
AnalysisApiMode.Ide ->
|
||||||
|
model("symbolByFqName")
|
||||||
|
AnalysisApiMode.Standalone ->
|
||||||
|
model("symbolByFqName", excludeDirsRecursively = listOf("withTestCompilerPluginEnabled"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test(AbstractSymbolByReferenceTest::class, filter = frontendIs(FrontendKind.Fir)) {
|
test(AbstractSymbolByReferenceTest::class, filter = frontendIs(FrontendKind.Fir)) {
|
||||||
model("symbolByReference")
|
when (it.analysisApiMode) {
|
||||||
|
AnalysisApiMode.Ide ->
|
||||||
|
model("symbolByReference")
|
||||||
|
AnalysisApiMode.Standalone ->
|
||||||
|
model("symbolByReference", excludeDirsRecursively = listOf("withTestCompilerPluginEnabled"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,9 +164,17 @@ private fun AnalysisApiTestGroup.generateAnalysisApiNonComponentsTests() {
|
|||||||
|
|
||||||
private fun AnalysisApiTestGroup.generateAnalysisApiComponentsTests() {
|
private fun AnalysisApiTestGroup.generateAnalysisApiComponentsTests() {
|
||||||
component("callResolver", filter = analysisSessionModeIs(AnalysisSessionMode.Normal)) {
|
component("callResolver", filter = analysisSessionModeIs(AnalysisSessionMode.Normal)) {
|
||||||
test(AbstractResolveCallTest::class) {
|
group(filter = { it.analysisApiMode == AnalysisApiMode.Standalone }) {
|
||||||
model("resolveCall")
|
test(AbstractResolveCallTest::class) {
|
||||||
|
when (it.analysisApiMode) {
|
||||||
|
AnalysisApiMode.Ide ->
|
||||||
|
model("resolveCall")
|
||||||
|
AnalysisApiMode.Standalone ->
|
||||||
|
model("resolveCall", excludeDirsRecursively = listOf("withTestCompilerPluginEnabled"))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test(
|
test(
|
||||||
AbstractResolveCandidatesTest::class
|
AbstractResolveCandidatesTest::class
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user