JVM IR: do not generate Deprecated(HIDDEN) class as synthetic

#KT-41810 Fixed
This commit is contained in:
Alexander Udalov
2020-09-10 22:30:54 +02:00
parent 162dc3aa0c
commit 2a0f64ebcb
13 changed files with 113 additions and 47 deletions
@@ -49,21 +49,6 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
runTest("compiler/testData/codegen/bytecodeListing/defaultImpls.kt");
}
@TestMetadata("deprecatedEnumEntryFields.kt")
public void testDeprecatedEnumEntryFields() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecatedEnumEntryFields.kt");
}
@TestMetadata("deprecatedLateinitVar.kt")
public void testDeprecatedLateinitVar() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecatedLateinitVar.kt");
}
@TestMetadata("deprecatedProperty.kt")
public void testDeprecatedProperty() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecatedProperty.kt");
}
@TestMetadata("emptyMultifileFacade.kt")
public void testEmptyMultifileFacade() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt");
@@ -390,6 +375,39 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/deprecated")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Deprecated extends AbstractBytecodeListingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInDeprecated() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/deprecated"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("deprecatedClass.kt")
public void testDeprecatedClass() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecated/deprecatedClass.kt");
}
@TestMetadata("deprecatedEnumEntryFields.kt")
public void testDeprecatedEnumEntryFields() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecated/deprecatedEnumEntryFields.kt");
}
@TestMetadata("deprecatedLateinitVar.kt")
public void testDeprecatedLateinitVar() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecated/deprecatedLateinitVar.kt");
}
@TestMetadata("deprecatedProperty.kt")
public void testDeprecatedProperty() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecated/deprecatedProperty.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/inline")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -49,21 +49,6 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
runTest("compiler/testData/codegen/bytecodeListing/defaultImpls.kt");
}
@TestMetadata("deprecatedEnumEntryFields.kt")
public void testDeprecatedEnumEntryFields() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecatedEnumEntryFields.kt");
}
@TestMetadata("deprecatedLateinitVar.kt")
public void testDeprecatedLateinitVar() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecatedLateinitVar.kt");
}
@TestMetadata("deprecatedProperty.kt")
public void testDeprecatedProperty() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecatedProperty.kt");
}
@TestMetadata("emptyMultifileFacade.kt")
public void testEmptyMultifileFacade() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt");
@@ -360,6 +345,39 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/deprecated")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Deprecated extends AbstractIrBytecodeListingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInDeprecated() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/deprecated"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("deprecatedClass.kt")
public void testDeprecatedClass() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecated/deprecatedClass.kt");
}
@TestMetadata("deprecatedEnumEntryFields.kt")
public void testDeprecatedEnumEntryFields() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecated/deprecatedEnumEntryFields.kt");
}
@TestMetadata("deprecatedLateinitVar.kt")
public void testDeprecatedLateinitVar() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecated/deprecatedLateinitVar.kt");
}
@TestMetadata("deprecatedProperty.kt")
public void testDeprecatedProperty() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/deprecated/deprecatedProperty.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/inline")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)