Minor, refactor diagnostic tests on repeatable annotations

This commit is contained in:
Alexander Udalov
2021-07-23 22:59:10 +02:00
parent 56866e6927
commit 5526281c54
22 changed files with 382 additions and 253 deletions
@@ -1193,24 +1193,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/annotations/JavaAnnotationConstructors.kt");
}
@Test
@TestMetadata("javaRepeatable.kt")
public void testJavaRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/javaRepeatable.kt");
}
@Test
@TestMetadata("javaRepeatableRetention.kt")
public void testJavaRepeatableRetention() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/javaRepeatableRetention.kt");
}
@Test
@TestMetadata("javaUnrepeatable.kt")
public void testJavaUnrepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/javaUnrepeatable.kt");
}
@Test
@TestMetadata("kt1860-negative.kt")
public void testKt1860_negative() throws Exception {
@@ -1594,12 +1576,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/annotations/options/prefix.kt");
}
@Test
@TestMetadata("repeatable.kt")
public void testRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/options/repeatable.kt");
}
@Test
@TestMetadata("retention.kt")
public void testRetention() throws Exception {
@@ -2109,6 +2085,34 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/annotations/repeatable")
@TestDataPath("$PROJECT_ROOT")
public class Repeatable {
@Test
public void testAllFilesPresentInRepeatable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/repeatable"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("javaRepeatable.kt")
public void testJavaRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaRepeatable.kt");
}
@Test
@TestMetadata("javaUnrepeatable.kt")
public void testJavaUnrepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaUnrepeatable.kt");
}
@Test
@TestMetadata("kotlinRepeatable.kt")
public void testKotlinRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/kotlinRepeatable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/annotations/typeUse")
@TestDataPath("$PROJECT_ROOT")
@@ -1193,24 +1193,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/tests/annotations/JavaAnnotationConstructors.kt");
}
@Test
@TestMetadata("javaRepeatable.kt")
public void testJavaRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/javaRepeatable.kt");
}
@Test
@TestMetadata("javaRepeatableRetention.kt")
public void testJavaRepeatableRetention() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/javaRepeatableRetention.kt");
}
@Test
@TestMetadata("javaUnrepeatable.kt")
public void testJavaUnrepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/javaUnrepeatable.kt");
}
@Test
@TestMetadata("kt1860-negative.kt")
public void testKt1860_negative() throws Exception {
@@ -1594,12 +1576,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/tests/annotations/options/prefix.kt");
}
@Test
@TestMetadata("repeatable.kt")
public void testRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/options/repeatable.kt");
}
@Test
@TestMetadata("retention.kt")
public void testRetention() throws Exception {
@@ -2109,6 +2085,34 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/annotations/repeatable")
@TestDataPath("$PROJECT_ROOT")
public class Repeatable {
@Test
public void testAllFilesPresentInRepeatable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/repeatable"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("javaRepeatable.kt")
public void testJavaRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaRepeatable.kt");
}
@Test
@TestMetadata("javaUnrepeatable.kt")
public void testJavaUnrepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/javaUnrepeatable.kt");
}
@Test
@TestMetadata("kotlinRepeatable.kt")
public void testKotlinRepeatable() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/repeatable/kotlinRepeatable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/annotations/typeUse")
@TestDataPath("$PROJECT_ROOT")