JVM JVM_IR hide sealed class constructors

This commit is contained in:
Dmitry Petrov
2021-01-22 15:31:56 +03:00
parent ca3bb02897
commit 708e6914bd
27 changed files with 555 additions and 97 deletions
@@ -235,11 +235,6 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
runTest("compiler/testData/codegen/bytecodeListing/rawTypeInSignature.kt");
}
@TestMetadata("sealedClassConstructorWithDefaultParams.kt")
public void testSealedClassConstructorWithDefaultParams() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sealedClassConstructorWithDefaultParams.kt");
}
@TestMetadata("strictfpFlag.kt")
public void testStrictfpFlag() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/strictfpFlag.kt");
@@ -1057,6 +1052,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/genericChild.kt");
}
@TestMetadata("hiddenConstructor.kt")
public void testHiddenConstructor() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/hiddenConstructor.kt");
}
@TestMetadata("inlineCharSequence.kt")
public void testInlineCharSequence() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCharSequence.kt");
@@ -1639,6 +1639,34 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/sealed")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Sealed extends AbstractBytecodeListingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInSealed() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/sealed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("annotationsOnSealedConstructor.kt")
public void testAnnotationsOnSealedConstructor() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sealed/annotationsOnSealedConstructor.kt");
}
@TestMetadata("sealedClassConstructor_1_4.kt")
public void testSealedClassConstructor_1_4() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sealed/sealedClassConstructor_1_4.kt");
}
@TestMetadata("sealedClassConstructor_1_5.kt")
public void testSealedClassConstructor_1_5() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sealed/sealedClassConstructor_1_5.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -4284,11 +4284,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/classes/rightHandOverride.kt");
}
@TestMetadata("sealedInSameFile.kt")
public void testSealedInSameFile() throws Exception {
runTest("compiler/testData/codegen/box/classes/sealedInSameFile.kt");
}
@TestMetadata("selfcreate.kt")
public void testSelfcreate() throws Exception {
runTest("compiler/testData/codegen/box/classes/selfcreate.kt");
@@ -28314,6 +28309,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sealed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("constructorAnnotations.kt")
public void testConstructorAnnotations() throws Exception {
runTest("compiler/testData/codegen/box/sealed/constructorAnnotations.kt");
}
@TestMetadata("delegatingConstructor.kt")
public void testDelegatingConstructor() throws Exception {
runTest("compiler/testData/codegen/box/sealed/delegatingConstructor.kt");
}
@TestMetadata("multipleFiles_enabled.kt")
public void testMultipleFiles_enabled() throws Exception {
runTest("compiler/testData/codegen/box/sealed/multipleFiles_enabled.kt");
@@ -28324,6 +28329,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/sealed/objects.kt");
}
@TestMetadata("sealedInSameFile.kt")
public void testSealedInSameFile() throws Exception {
runTest("compiler/testData/codegen/box/sealed/sealedInSameFile.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/sealed/simple.kt");
@@ -235,11 +235,6 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
runTest("compiler/testData/codegen/bytecodeListing/rawTypeInSignature.kt");
}
@TestMetadata("sealedClassConstructorWithDefaultParams.kt")
public void testSealedClassConstructorWithDefaultParams() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sealedClassConstructorWithDefaultParams.kt");
}
@TestMetadata("strictfpFlag.kt")
public void testStrictfpFlag() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/strictfpFlag.kt");
@@ -1057,6 +1052,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/genericChild.kt");
}
@TestMetadata("hiddenConstructor.kt")
public void testHiddenConstructor() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/hiddenConstructor.kt");
}
@TestMetadata("inlineCharSequence.kt")
public void testInlineCharSequence() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCharSequence.kt");
@@ -1639,6 +1639,34 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/sealed")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Sealed extends AbstractIrBytecodeListingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInSealed() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/sealed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("annotationsOnSealedConstructor.kt")
public void testAnnotationsOnSealedConstructor() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sealed/annotationsOnSealedConstructor.kt");
}
@TestMetadata("sealedClassConstructor_1_4.kt")
public void testSealedClassConstructor_1_4() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sealed/sealedClassConstructor_1_4.kt");
}
@TestMetadata("sealedClassConstructor_1_5.kt")
public void testSealedClassConstructor_1_5() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sealed/sealedClassConstructor_1_5.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)