Move tests on KClass.java* to box/classLiteral/java

Also replace WITH_REFLECT to WITH_RUNTIME to test that these cases correctly
work without reflection in the classpath
This commit is contained in:
Alexander Udalov
2016-07-15 00:30:06 +03:00
parent 70e01fac18
commit 0ea885ce58
11 changed files with 115 additions and 121 deletions
@@ -2364,12 +2364,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("objectSuperConstructorCall.kt")
public void testObjectSuperConstructorCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/objectSuperConstructorCall.kt");
doTest(fileName);
}
@TestMetadata("primitives.kt")
public void testPrimitives() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/primitives.kt");
@@ -2388,6 +2382,63 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/box/classLiteral/java")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Java extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInJava() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/java"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("java.kt")
public void testJava() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/java.kt");
doTest(fileName);
}
@TestMetadata("javaObjectType.kt")
public void testJavaObjectType() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaObjectType.kt");
doTest(fileName);
}
@TestMetadata("javaObjectTypeReified.kt")
public void testJavaObjectTypeReified() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt");
doTest(fileName);
}
@TestMetadata("javaPrimitiveType.kt")
public void testJavaPrimitiveType() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveType.kt");
doTest(fileName);
}
@TestMetadata("javaPrimitiveTypeReified.kt")
public void testJavaPrimitiveTypeReified() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt");
doTest(fileName);
}
@TestMetadata("javaReified.kt")
public void testJavaReified() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaReified.kt");
doTest(fileName);
}
@TestMetadata("kt11943.kt")
public void testKt11943() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/kt11943.kt");
doTest(fileName);
}
@TestMetadata("objectSuperConstructorCall.kt")
public void testObjectSuperConstructorCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/objectSuperConstructorCall.kt");
doTest(fileName);
}
}
}
@TestMetadata("compiler/testData/codegen/box/classes")
@@ -12154,57 +12205,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
}
}
@TestMetadata("compiler/testData/codegen/box/reflection/javaProperties")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class JavaProperties extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInJavaProperties() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/javaProperties"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("java.kt")
public void testJava() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/javaProperties/java.kt");
doTest(fileName);
}
@TestMetadata("javaObjectType.kt")
public void testJavaObjectType() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/javaProperties/javaObjectType.kt");
doTest(fileName);
}
@TestMetadata("javaObjectTypeReified.kt")
public void testJavaObjectTypeReified() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/javaProperties/javaObjectTypeReified.kt");
doTest(fileName);
}
@TestMetadata("javaPrimitiveType.kt")
public void testJavaPrimitiveType() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/javaProperties/javaPrimitiveType.kt");
doTest(fileName);
}
@TestMetadata("javaPrimitiveTypeReified.kt")
public void testJavaPrimitiveTypeReified() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/javaProperties/javaPrimitiveTypeReified.kt");
doTest(fileName);
}
@TestMetadata("javaReified.kt")
public void testJavaReified() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/javaProperties/javaReified.kt");
doTest(fileName);
}
@TestMetadata("kt11943.kt")
public void testKt11943() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/javaProperties/kt11943.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)