Add basic support for default codeanalysis annotations

This commit is contained in:
Denis Zharkov
2019-08-06 17:59:42 +03:00
committed by Victor Petukhov
parent 517cc84f4d
commit 82d39dd86a
7 changed files with 153 additions and 1 deletions
@@ -43,6 +43,24 @@ public class ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated extends
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt");
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Codeanalysis extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInCodeanalysis() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("defaults.kt")
public void testDefaults() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis/defaults.kt");
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -43,6 +43,24 @@ public class ForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTe
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt");
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Codeanalysis extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInCodeanalysis() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("defaults.kt")
public void testDefaults() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis/defaults.kt");
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -43,6 +43,24 @@ public class ForeignJava8AnnotationsTestGenerated extends AbstractForeignJava8An
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt");
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Codeanalysis extends AbstractForeignJava8AnnotationsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInCodeanalysis() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("defaults.kt")
public void testDefaults() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis/defaults.kt");
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -43,6 +43,24 @@ public class JavacForeignJava8AnnotationsTestGenerated extends AbstractJavacFore
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt");
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Codeanalysis extends AbstractJavacForeignJava8AnnotationsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInCodeanalysis() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("defaults.kt")
public void testDefaults() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/codeanalysis/defaults.kt");
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)