Add initial support for codeanalysis annotations

This commit is contained in:
Denis Zharkov
2019-08-06 16:11:21 +03:00
committed by Victor Petukhov
parent 165a147dd8
commit 517cc84f4d
13 changed files with 234 additions and 14 deletions
@@ -43,6 +43,24 @@ public class ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated extends
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt");
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jspecify extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInJspecify() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/simple.kt");
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305")
@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/jspecify")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jspecify extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInJspecify() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/simple.kt");
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305")
@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/jspecify")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jspecify extends AbstractForeignJava8AnnotationsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInJspecify() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/simple.kt");
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305")
@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/jspecify")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jspecify extends AbstractJavacForeignJava8AnnotationsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInJspecify() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/simple.kt");
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)