Generate annotations for single-file classes.

This commit is contained in:
Dmitry Petrov
2015-09-15 18:48:29 +03:00
parent b179b861a6
commit 7f4ae52517
10 changed files with 125 additions and 5 deletions
@@ -65,6 +65,22 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
doTestWithJava(fileName);
}
@TestMetadata("compiler/testData/codegen/boxWithJava/annotatedFileClasses")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class AnnotatedFileClasses extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInAnnotatedFileClasses() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/annotatedFileClasses"), Pattern.compile("^([^\\.]+)$"), true);
}
@TestMetadata("javaAnnotationOnFileFacade")
public void testJavaAnnotationOnFileFacade() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotatedFileClasses/javaAnnotationOnFileFacade/");
doTestWithJava(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxWithJava/annotationsWithKClass")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -82,6 +82,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
doTestWithStdlib(fileName);
}
@TestMetadata("fileClassWithFileAnnotation.kt")
public void testFileClassWithFileAnnotation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/annotations/fileClassWithFileAnnotation.kt");
doTestWithStdlib(fileName);
}
@TestMetadata("kotlinPropertyFromClassObjectAsParameter.kt")
public void testKotlinPropertyFromClassObjectAsParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/annotations/kotlinPropertyFromClassObjectAsParameter.kt");