FIR IDE: Add IDE tests for sample compiler plugin

This commit is contained in:
Roman Golyshev
2022-02-22 03:00:55 +03:00
parent fed08aaff5
commit 8bcdc70adc
32 changed files with 790 additions and 0 deletions
@@ -823,4 +823,26 @@ public class Fe10ResolveCallTestGenerated extends AbstractResolveCallTest {
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");
}
}
}
@@ -87,4 +87,20 @@ public class Fe10SymbolByFqNameTestGenerated extends AbstractSymbolByFqNameTest
public void testNestedClass() throws Exception {
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");
}
}
}
@@ -63,4 +63,20 @@ public class Fe10SymbolByReferenceTestGenerated extends AbstractSymbolByReferenc
public void testSamConstructor() throws Exception {
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");
}
}
}