Support KClass.simpleName and built-in class literals

This commit is contained in:
Alexander Udalov
2015-03-07 03:45:46 +03:00
parent 6e45c6f17c
commit b93b9bd565
9 changed files with 84 additions and 2 deletions
@@ -331,6 +331,7 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxCod
@TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection")
@TestDataPath("$PROJECT_ROOT")
@InnerTestClasses({
Reflection.ClassLiterals.class,
Reflection.Mapping.class,
Reflection.Properties.class,
})
@@ -340,6 +341,21 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxCod
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ClassLiterals extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInClassLiterals() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("javaClassLiteral.kt")
public void testJavaClassLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals/javaClassLiteral.kt");
doTestAgainstJava(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/mapping")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -2545,6 +2545,18 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("builtinClassLiterals.kt")
public void testBuiltinClassLiterals() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/classLiterals/builtinClassLiterals.kt");
doTestWithStdlib(fileName);
}
@TestMetadata("classSimpleName.kt")
public void testClassSimpleName() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/classLiterals/classSimpleName.kt");
doTestWithStdlib(fileName);
}
@TestMetadata("simpleClassLiteral.kt")
public void testSimpleClassLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/classLiterals/simpleClassLiteral.kt");