JvmDefault: remove most tests on @JvmDefault
The tests are removed because JvmDefault is going to be deprecated with error in KT-54746 and removed later in KT-57696. Many of the removed tests already had existing counterparts with the new modes `all` and `all-compatibility`. In this change, I've added such tests where they were missing, and removed tests which were testing behavior specific to the JvmDefault annotation, such as some diagnostics. #KT-54746
This commit is contained in:
committed by
Space Team
parent
ace2279631
commit
3120a35a88
+7
-32
@@ -777,56 +777,31 @@ public class IrWriteFlagsTestGenerated extends AbstractIrWriteFlagsTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, 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("onlyJvmDefaultsOnInterface.kt")
|
||||
public void testOnlyJvmDefaultsOnInterface() throws Exception {
|
||||
runTest("compiler/testData/writeFlags/jvm8/defaults/onlyJvmDefaultsOnInterface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("privateAccessorNaming.kt")
|
||||
public void testPrivateAccessorNaming() throws Exception {
|
||||
runTest("compiler/testData/writeFlags/jvm8/defaults/privateAccessorNaming.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("propertyAnnotation.kt")
|
||||
public void testPropertyAnnotation() throws Exception {
|
||||
runTest("compiler/testData/writeFlags/jvm8/defaults/propertyAnnotation.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/writeFlags/jvm8/defaults/compatibility")
|
||||
@TestMetadata("compiler/testData/writeFlags/jvm8/defaults/all-compatibility")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Compatibility extends AbstractIrWriteFlagsTest {
|
||||
public static class All_compatibility extends AbstractIrWriteFlagsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCompatibility() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
public void testAllFilesPresentInAll_compatibility() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults/all-compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("defaultImplementations.kt")
|
||||
public void testDefaultImplementations() throws Exception {
|
||||
runTest("compiler/testData/writeFlags/jvm8/defaults/compatibility/defaultImplementations.kt");
|
||||
runTest("compiler/testData/writeFlags/jvm8/defaults/all-compatibility/defaultImplementations.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("propertyAccessors.kt")
|
||||
public void testPropertyAccessors() throws Exception {
|
||||
runTest("compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAccessors.kt");
|
||||
runTest("compiler/testData/writeFlags/jvm8/defaults/all-compatibility/propertyAccessors.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("propertyAnnotation.kt")
|
||||
public void testPropertyAnnotation() throws Exception {
|
||||
runTest("compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAnnotation.kt");
|
||||
runTest("compiler/testData/writeFlags/jvm8/defaults/all-compatibility/propertyAnnotation.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user