From 75850a618cec5095b1ba402ae00011997bf1a723 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 10 Mar 2021 20:27:09 +0100 Subject: [PATCH] Minor, move bytecodeListing tests on JvmMultifileClass --- .../emptyMultifileFacade.kt | 0 .../emptyMultifileFacade.txt | 0 .../{ => multifileClasses}/kt43519.kt | 0 .../{ => multifileClasses}/kt43519.txt | 0 .../multiClassPartSourceMultipleParts.kt | 0 .../multiClassPartSourceMultipleParts.txt | 0 .../multiClassPartSourceSinglePart.kt | 0 .../multiClassPartSourceSinglePart.txt | 0 .../codegen/BytecodeListingTestGenerated.java | 53 ++++++++++++------- .../ir/IrBytecodeListingTestGenerated.java | 53 ++++++++++++------- 10 files changed, 66 insertions(+), 40 deletions(-) rename compiler/testData/codegen/bytecodeListing/{ => multifileClasses}/emptyMultifileFacade.kt (100%) rename compiler/testData/codegen/bytecodeListing/{ => multifileClasses}/emptyMultifileFacade.txt (100%) rename compiler/testData/codegen/bytecodeListing/{ => multifileClasses}/kt43519.kt (100%) rename compiler/testData/codegen/bytecodeListing/{ => multifileClasses}/kt43519.txt (100%) rename compiler/testData/codegen/bytecodeListing/{ => multifileClasses}/multiClassPartSourceMultipleParts.kt (100%) rename compiler/testData/codegen/bytecodeListing/{ => multifileClasses}/multiClassPartSourceMultipleParts.txt (100%) rename compiler/testData/codegen/bytecodeListing/{ => multifileClasses}/multiClassPartSourceSinglePart.kt (100%) rename compiler/testData/codegen/bytecodeListing/{ => multifileClasses}/multiClassPartSourceSinglePart.txt (100%) diff --git a/compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt b/compiler/testData/codegen/bytecodeListing/multifileClasses/emptyMultifileFacade.kt similarity index 100% rename from compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt rename to compiler/testData/codegen/bytecodeListing/multifileClasses/emptyMultifileFacade.kt diff --git a/compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.txt b/compiler/testData/codegen/bytecodeListing/multifileClasses/emptyMultifileFacade.txt similarity index 100% rename from compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.txt rename to compiler/testData/codegen/bytecodeListing/multifileClasses/emptyMultifileFacade.txt diff --git a/compiler/testData/codegen/bytecodeListing/kt43519.kt b/compiler/testData/codegen/bytecodeListing/multifileClasses/kt43519.kt similarity index 100% rename from compiler/testData/codegen/bytecodeListing/kt43519.kt rename to compiler/testData/codegen/bytecodeListing/multifileClasses/kt43519.kt diff --git a/compiler/testData/codegen/bytecodeListing/kt43519.txt b/compiler/testData/codegen/bytecodeListing/multifileClasses/kt43519.txt similarity index 100% rename from compiler/testData/codegen/bytecodeListing/kt43519.txt rename to compiler/testData/codegen/bytecodeListing/multifileClasses/kt43519.txt diff --git a/compiler/testData/codegen/bytecodeListing/multiClassPartSourceMultipleParts.kt b/compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceMultipleParts.kt similarity index 100% rename from compiler/testData/codegen/bytecodeListing/multiClassPartSourceMultipleParts.kt rename to compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceMultipleParts.kt diff --git a/compiler/testData/codegen/bytecodeListing/multiClassPartSourceMultipleParts.txt b/compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceMultipleParts.txt similarity index 100% rename from compiler/testData/codegen/bytecodeListing/multiClassPartSourceMultipleParts.txt rename to compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceMultipleParts.txt diff --git a/compiler/testData/codegen/bytecodeListing/multiClassPartSourceSinglePart.kt b/compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceSinglePart.kt similarity index 100% rename from compiler/testData/codegen/bytecodeListing/multiClassPartSourceSinglePart.kt rename to compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceSinglePart.kt diff --git a/compiler/testData/codegen/bytecodeListing/multiClassPartSourceSinglePart.txt b/compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceSinglePart.txt similarity index 100% rename from compiler/testData/codegen/bytecodeListing/multiClassPartSourceSinglePart.txt rename to compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceSinglePart.txt diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java index e39035abf8c..d973fa1dfdf 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java @@ -85,11 +85,6 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { runTest("compiler/testData/codegen/bytecodeListing/delegationToJavaInterfaceWithWildcardType.kt"); } - @TestMetadata("emptyMultifileFacade.kt") - public void testEmptyMultifileFacade() throws Exception { - runTest("compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt"); - } - @TestMetadata("enum.kt") public void testEnum() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/enum.kt"); @@ -170,11 +165,6 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { runTest("compiler/testData/codegen/bytecodeListing/kt43440.kt"); } - @TestMetadata("kt43519.kt") - public void testKt43519() throws Exception { - runTest("compiler/testData/codegen/bytecodeListing/kt43519.kt"); - } - @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/localFunction.kt"); @@ -185,16 +175,6 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { runTest("compiler/testData/codegen/bytecodeListing/localFunctionInInitBlock.kt"); } - @TestMetadata("multiClassPartSourceMultipleParts.kt") - public void testMultiClassPartSourceMultipleParts() throws Exception { - runTest("compiler/testData/codegen/bytecodeListing/multiClassPartSourceMultipleParts.kt"); - } - - @TestMetadata("multiClassPartSourceSinglePart.kt") - public void testMultiClassPartSourceSinglePart() throws Exception { - runTest("compiler/testData/codegen/bytecodeListing/multiClassPartSourceSinglePart.kt"); - } - @TestMetadata("noCollectionStubMethodsInInterface.kt") public void testNoCollectionStubMethodsInInterface() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/noCollectionStubMethodsInInterface.kt"); @@ -1551,6 +1531,39 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { } } + @TestMetadata("compiler/testData/codegen/bytecodeListing/multifileClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClasses extends AbstractBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClasses() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("emptyMultifileFacade.kt") + public void testEmptyMultifileFacade() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/multifileClasses/emptyMultifileFacade.kt"); + } + + @TestMetadata("kt43519.kt") + public void testKt43519() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/multifileClasses/kt43519.kt"); + } + + @TestMetadata("multiClassPartSourceMultipleParts.kt") + public void testMultiClassPartSourceMultipleParts() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceMultipleParts.kt"); + } + + @TestMetadata("multiClassPartSourceSinglePart.kt") + public void testMultiClassPartSourceSinglePart() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceSinglePart.kt"); + } + } + @TestMetadata("compiler/testData/codegen/bytecodeListing/multiplatform") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java index dd7a19aa556..02dc1d95b53 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java @@ -85,11 +85,6 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes runTest("compiler/testData/codegen/bytecodeListing/delegationToJavaInterfaceWithWildcardType.kt"); } - @TestMetadata("emptyMultifileFacade.kt") - public void testEmptyMultifileFacade() throws Exception { - runTest("compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt"); - } - @TestMetadata("enum.kt") public void testEnum() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/enum.kt"); @@ -170,11 +165,6 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes runTest("compiler/testData/codegen/bytecodeListing/kt43440.kt"); } - @TestMetadata("kt43519.kt") - public void testKt43519() throws Exception { - runTest("compiler/testData/codegen/bytecodeListing/kt43519.kt"); - } - @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/localFunction.kt"); @@ -185,16 +175,6 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes runTest("compiler/testData/codegen/bytecodeListing/localFunctionInInitBlock.kt"); } - @TestMetadata("multiClassPartSourceMultipleParts.kt") - public void testMultiClassPartSourceMultipleParts() throws Exception { - runTest("compiler/testData/codegen/bytecodeListing/multiClassPartSourceMultipleParts.kt"); - } - - @TestMetadata("multiClassPartSourceSinglePart.kt") - public void testMultiClassPartSourceSinglePart() throws Exception { - runTest("compiler/testData/codegen/bytecodeListing/multiClassPartSourceSinglePart.kt"); - } - @TestMetadata("noCollectionStubMethodsInInterface.kt") public void testNoCollectionStubMethodsInInterface() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/noCollectionStubMethodsInInterface.kt"); @@ -1551,6 +1531,39 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes } } + @TestMetadata("compiler/testData/codegen/bytecodeListing/multifileClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClasses extends AbstractIrBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClasses() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyMultifileFacade.kt") + public void testEmptyMultifileFacade() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/multifileClasses/emptyMultifileFacade.kt"); + } + + @TestMetadata("kt43519.kt") + public void testKt43519() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/multifileClasses/kt43519.kt"); + } + + @TestMetadata("multiClassPartSourceMultipleParts.kt") + public void testMultiClassPartSourceMultipleParts() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceMultipleParts.kt"); + } + + @TestMetadata("multiClassPartSourceSinglePart.kt") + public void testMultiClassPartSourceSinglePart() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/multifileClasses/multiClassPartSourceSinglePart.kt"); + } + } + @TestMetadata("compiler/testData/codegen/bytecodeListing/multiplatform") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)