Jspecify: Rename codeanalysis annotations to jspecify ones

This commit is contained in:
Victor Petukhov
2020-10-08 11:41:30 +03:00
parent 59bd7364ab
commit 2685c7efce
36 changed files with 107 additions and 313 deletions
@@ -25,7 +25,7 @@ public class ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated extends
}
public void testAllFilesPresentInTests() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify");
}
@TestMetadata("checkerFramework.kt")
@@ -43,122 +43,6 @@ 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("annotatedWildcards.kt")
public void testAnnotatedWildcards() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/annotatedWildcards.kt");
}
@TestMetadata("defaults.kt")
public void testDefaults() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/defaults.kt");
}
@TestMetadata("ignoreAnnotations.kt")
public void testIgnoreAnnotations() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/ignoreAnnotations.kt");
}
@TestMetadata("nonPlatformTypeParameter.kt")
public void testNonPlatformTypeParameter() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/nonPlatformTypeParameter.kt");
}
@TestMetadata("selfType.kt")
public void testSelfType() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/selfType.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/simple.kt");
}
@TestMetadata("typeArgumentsFromParameterBounds.kt")
public void testTypeArgumentsFromParameterBounds() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/typeArgumentsFromParameterBounds.kt");
}
@TestMetadata("typeParameterBounds.kt")
public void testTypeParameterBounds() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/typeParameterBounds.kt");
}
@TestMetadata("unknownNullnessTypeParameter.kt")
public void testUnknownNullnessTypeParameter() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/unknownNullnessTypeParameter.kt");
}
@TestMetadata("wildcardsWithDefault.kt")
public void testWildcardsWithDefault() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/wildcardsWithDefault.kt");
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Warnings extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInWarnings() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("annotatedWildcards.kt")
public void testAnnotatedWildcards() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/annotatedWildcards.kt");
}
@TestMetadata("defaults.kt")
public void testDefaults() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/defaults.kt");
}
@TestMetadata("nonPlatformTypeParameter.kt")
public void testNonPlatformTypeParameter() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/nonPlatformTypeParameter.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/simple.kt");
}
@TestMetadata("typeArgumentsFromParameterBounds.kt")
public void testTypeArgumentsFromParameterBounds() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/typeArgumentsFromParameterBounds.kt");
}
@TestMetadata("typeParameterBounds.kt")
public void testTypeParameterBounds() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/typeParameterBounds.kt");
}
@TestMetadata("unknownNullnessTypeParameter.kt")
public void testUnknownNullnessTypeParameter() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/unknownNullnessTypeParameter.kt");
}
@TestMetadata("wildcardsWithDefault.kt")
public void testWildcardsWithDefault() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/wildcardsWithDefault.kt");
}
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -25,7 +25,7 @@ public class ForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTe
}
public void testAllFilesPresentInTests() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify");
}
@TestMetadata("checkerFramework.kt")
@@ -43,122 +43,6 @@ 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("annotatedWildcards.kt")
public void testAnnotatedWildcards() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/annotatedWildcards.kt");
}
@TestMetadata("defaults.kt")
public void testDefaults() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/defaults.kt");
}
@TestMetadata("ignoreAnnotations.kt")
public void testIgnoreAnnotations() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/ignoreAnnotations.kt");
}
@TestMetadata("nonPlatformTypeParameter.kt")
public void testNonPlatformTypeParameter() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/nonPlatformTypeParameter.kt");
}
@TestMetadata("selfType.kt")
public void testSelfType() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/selfType.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/simple.kt");
}
@TestMetadata("typeArgumentsFromParameterBounds.kt")
public void testTypeArgumentsFromParameterBounds() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/typeArgumentsFromParameterBounds.kt");
}
@TestMetadata("typeParameterBounds.kt")
public void testTypeParameterBounds() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/typeParameterBounds.kt");
}
@TestMetadata("unknownNullnessTypeParameter.kt")
public void testUnknownNullnessTypeParameter() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/unknownNullnessTypeParameter.kt");
}
@TestMetadata("wildcardsWithDefault.kt")
public void testWildcardsWithDefault() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/wildcardsWithDefault.kt");
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Warnings extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInWarnings() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("annotatedWildcards.kt")
public void testAnnotatedWildcards() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/annotatedWildcards.kt");
}
@TestMetadata("defaults.kt")
public void testDefaults() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/defaults.kt");
}
@TestMetadata("nonPlatformTypeParameter.kt")
public void testNonPlatformTypeParameter() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/nonPlatformTypeParameter.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/simple.kt");
}
@TestMetadata("typeArgumentsFromParameterBounds.kt")
public void testTypeArgumentsFromParameterBounds() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/typeArgumentsFromParameterBounds.kt");
}
@TestMetadata("typeParameterBounds.kt")
public void testTypeParameterBounds() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/typeParameterBounds.kt");
}
@TestMetadata("unknownNullnessTypeParameter.kt")
public void testUnknownNullnessTypeParameter() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/unknownNullnessTypeParameter.kt");
}
@TestMetadata("wildcardsWithDefault.kt")
public void testWildcardsWithDefault() throws Exception {
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings/wildcardsWithDefault.kt");
}
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -105,6 +105,19 @@ public class ForeignJava8AnnotationsTestGenerated extends AbstractForeignJava8An
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/wildcardsWithDefault.kt");
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Kotlin extends AbstractForeignJava8AnnotationsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInKotlin() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -105,6 +105,19 @@ public class JavacForeignJava8AnnotationsTestGenerated extends AbstractJavacFore
runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/wildcardsWithDefault.kt");
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Kotlin extends AbstractJavacForeignJava8AnnotationsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInKotlin() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify/warnings")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -40,11 +40,11 @@ fun main(args: Array<String>) {
}
testClass<AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest> {
model("foreignAnnotationsJava8/tests")
model("foreignAnnotationsJava8/tests", excludeDirs = listOf("jspecify"))
}
testClass<AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest> {
model("foreignAnnotationsJava8/tests")
model("foreignAnnotationsJava8/tests", excludeDirs = listOf("jspecify"))
}
testClass<AbstractLoadJava8Test> {