"annotation" is now parsed as an identifier. It is no longer a soft keyword.

Sometimes it's allowed to parse "annotation" unescaped even if other annotations must be escaped.
A set of annotations and their options tests.
A swarm of existing tests fixed (mostly kotlin.annotation.annotation() added to txt-files).
STUB_VERSION increased. Some quick fixes slightly changed.
This commit is contained in:
Mikhail Glukhikh
2015-06-26 16:30:20 +03:00
parent 7a6e5f66bd
commit 1eac4d67de
231 changed files with 1915 additions and 334 deletions
@@ -645,6 +645,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("AnnotationAsDefaultParameter.kt")
public void testAnnotationAsDefaultParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.kt");
doTest(fileName);
}
@TestMetadata("AnnotationForClassTypeParameter.kt")
public void testAnnotationForClassTypeParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.kt");
@@ -977,6 +983,57 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/tests/annotations/options")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Options extends AbstractJetDiagnosticsTest {
public void testAllFilesPresentInOptions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/options"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("annotation.kt")
public void testAnnotation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/annotation.kt");
doTest(fileName);
}
@TestMetadata("annotationAsArg.kt")
public void testAnnotationAsArg() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.kt");
doTest(fileName);
}
@TestMetadata("annotationAsArgComplex.kt")
public void testAnnotationAsArgComplex() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.kt");
doTest(fileName);
}
@TestMetadata("brackets.kt")
public void testBrackets() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/brackets.kt");
doTest(fileName);
}
@TestMetadata("repeatable.kt")
public void testRepeatable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/repeatable.kt");
doTest(fileName);
}
@TestMetadata("retention.kt")
public void testRetention() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/retention.kt");
doTest(fileName);
}
@TestMetadata("target.kt")
public void testTarget() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/target.kt");
doTest(fileName);
}
}
}
@TestMetadata("compiler/testData/diagnostics/tests/backingField")
@@ -899,6 +899,57 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest {
doParsingTest(fileName);
}
}
@TestMetadata("compiler/testData/psi/annotation/options")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Options extends AbstractJetParsingTest {
public void testAllFilesPresentInOptions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/options"), Pattern.compile("^(.*)\\.kts?$"), true);
}
@TestMetadata("annotAsArgComplex.kt")
public void testAnnotAsArgComplex() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/annotAsArgComplex.kt");
doParsingTest(fileName);
}
@TestMetadata("annotation.kt")
public void testAnnotation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/annotation.kt");
doParsingTest(fileName);
}
@TestMetadata("annotationAsArg.kt")
public void testAnnotationAsArg() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/annotationAsArg.kt");
doParsingTest(fileName);
}
@TestMetadata("annotationAsArgComplex.kt")
public void testAnnotationAsArgComplex() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/annotationAsArgComplex.kt");
doParsingTest(fileName);
}
@TestMetadata("java.kt")
public void testJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/java.kt");
doParsingTest(fileName);
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/local.kt");
doParsingTest(fileName);
}
@TestMetadata("options.kt")
public void testOptions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/options.kt");
doParsingTest(fileName);
}
}
}
@TestMetadata("compiler/testData/psi/examples")