Support using Java-repeatable annotations in Kotlin

#KT-12794
This commit is contained in:
Alexander Udalov
2021-07-20 16:30:04 +02:00
parent f723389565
commit 87130edfa2
42 changed files with 958 additions and 42 deletions
@@ -2095,21 +2095,39 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
}
@Test
@TestMetadata("javaRepeatable.kt")
public void testJavaRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaRepeatable.kt");
@TestMetadata("javaRepeatable_1_5.kt")
public void testJavaRepeatable_1_5() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaRepeatable_1_5.kt");
}
@Test
@TestMetadata("javaUnrepeatable.kt")
public void testJavaUnrepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaUnrepeatable.kt");
@TestMetadata("javaRepeatable_1_6.kt")
public void testJavaRepeatable_1_6() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaRepeatable_1_6.kt");
}
@Test
@TestMetadata("kotlinRepeatable.kt")
public void testKotlinRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/kotlinRepeatable.kt");
@TestMetadata("javaUnrepeatable_1_5.kt")
public void testJavaUnrepeatable_1_5() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaUnrepeatable_1_5.kt");
}
@Test
@TestMetadata("javaUnrepeatable_1_6.kt")
public void testJavaUnrepeatable_1_6() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaUnrepeatable_1_6.kt");
}
@Test
@TestMetadata("kotlinRepeatable_1_5.kt")
public void testKotlinRepeatable_1_5() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/kotlinRepeatable_1_5.kt");
}
@Test
@TestMetadata("kotlinRepeatable_1_6.kt")
public void testKotlinRepeatable_1_6() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/kotlinRepeatable_1_6.kt");
}
}
@@ -2095,21 +2095,39 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
}
@Test
@TestMetadata("javaRepeatable.kt")
public void testJavaRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaRepeatable.kt");
@TestMetadata("javaRepeatable_1_5.kt")
public void testJavaRepeatable_1_5() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaRepeatable_1_5.kt");
}
@Test
@TestMetadata("javaUnrepeatable.kt")
public void testJavaUnrepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaUnrepeatable.kt");
@TestMetadata("javaRepeatable_1_6.kt")
public void testJavaRepeatable_1_6() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaRepeatable_1_6.kt");
}
@Test
@TestMetadata("kotlinRepeatable.kt")
public void testKotlinRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/kotlinRepeatable.kt");
@TestMetadata("javaUnrepeatable_1_5.kt")
public void testJavaUnrepeatable_1_5() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaUnrepeatable_1_5.kt");
}
@Test
@TestMetadata("javaUnrepeatable_1_6.kt")
public void testJavaUnrepeatable_1_6() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaUnrepeatable_1_6.kt");
}
@Test
@TestMetadata("kotlinRepeatable_1_5.kt")
public void testKotlinRepeatable_1_5() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/kotlinRepeatable_1_5.kt");
}
@Test
@TestMetadata("kotlinRepeatable_1_6.kt")
public void testKotlinRepeatable_1_6() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/kotlinRepeatable_1_6.kt");
}
}
@@ -496,6 +496,28 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/annotations/repeatable")
@TestDataPath("$PROJECT_ROOT")
public class Repeatable {
@Test
public void testAllFilesPresentInRepeatable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/repeatable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("javaAnnotation.kt")
public void testJavaAnnotation() throws Exception {
runTest("compiler/testData/codegen/box/annotations/repeatable/javaAnnotation.kt");
}
@Test
@TestMetadata("jvmRepeatableKotlinAnnotation.kt")
public void testJvmRepeatableKotlinAnnotation() throws Exception {
runTest("compiler/testData/codegen/box/annotations/repeatable/jvmRepeatableKotlinAnnotation.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/annotations/typeAnnotations")
@TestDataPath("$PROJECT_ROOT")