Move 'writeFlags' java 8 tests to common

This commit is contained in:
Mikhael Bogdanov
2018-10-22 17:17:45 +02:00
parent 37c38b6e43
commit 4284c19a16
10 changed files with 74 additions and 96 deletions
@@ -707,6 +707,80 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
}
}
@TestMetadata("compiler/testData/writeFlags/jvm8")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8 extends AbstractWriteFlagsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInJvm8() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("interfaceMethod.kt")
public void testInterfaceMethod() throws Exception {
runTest("compiler/testData/writeFlags/jvm8/interfaceMethod.kt");
}
@TestMetadata("interfaceProperty.kt")
public void testInterfaceProperty() throws Exception {
runTest("compiler/testData/writeFlags/jvm8/interfaceProperty.kt");
}
@TestMetadata("compiler/testData/writeFlags/jvm8/defaults")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Defaults extends AbstractWriteFlagsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInDefaults() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("defaultMethod.kt")
public void testDefaultMethod() throws Exception {
runTest("compiler/testData/writeFlags/jvm8/defaults/defaultMethod.kt");
}
@TestMetadata("defaultProperty.kt")
public void testDefaultProperty() throws Exception {
runTest("compiler/testData/writeFlags/jvm8/defaults/defaultProperty.kt");
}
@TestMetadata("propertyAnnotation.kt")
public void testPropertyAnnotation() throws Exception {
runTest("compiler/testData/writeFlags/jvm8/defaults/propertyAnnotation.kt");
}
@TestMetadata("compiler/testData/writeFlags/jvm8/defaults/compatibility")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Compatibility extends AbstractWriteFlagsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInCompatibility() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("propertyAccessors.kt")
public void testPropertyAccessors() throws Exception {
runTest("compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAccessors.kt");
}
@TestMetadata("propertyAnnotation.kt")
public void testPropertyAnnotation() throws Exception {
runTest("compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAnnotation.kt");
}
}
}
}
@TestMetadata("compiler/testData/writeFlags/lambda")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)