Minor, move around bytecode listing tests

This commit is contained in:
Alexander Udalov
2021-04-22 17:53:16 +02:00
parent 28690b7f32
commit 7e170770ea
9 changed files with 75 additions and 49 deletions
@@ -1,18 +0,0 @@
@kotlin.Metadata
final class LocalFunctionKt$foo$1 {
// source: 'localFunction.kt'
enclosing method LocalFunctionKt.foo()V
public final static field INSTANCE: LocalFunctionKt$foo$1
inner (anonymous) class LocalFunctionKt$foo$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
public final class LocalFunctionKt {
// source: 'localFunction.kt'
inner (anonymous) class LocalFunctionKt$foo$1
public final static method foo(): void
}
@@ -1,6 +1,6 @@
@kotlin.Metadata
final class C$1$1 {
// source: 'localFunctionInInitBlock.kt'
// source: 'inInitBlock.kt'
enclosing method C$1.invoke()V
public final static field INSTANCE: C$1$1
inner (anonymous) class C$1
@@ -13,7 +13,7 @@ final class C$1$1 {
@kotlin.Metadata
final class C$1 {
// source: 'localFunctionInInitBlock.kt'
// source: 'inInitBlock.kt'
enclosing method C.<init>(I)V
public final static field INSTANCE: C$1
inner (anonymous) class C$1
@@ -26,7 +26,7 @@ final class C$1 {
@kotlin.Metadata
final class C$2$1 {
// source: 'localFunctionInInitBlock.kt'
// source: 'inInitBlock.kt'
enclosing method C$2.invoke()V
public final static field INSTANCE: C$2$1
inner (anonymous) class C$2
@@ -39,7 +39,7 @@ final class C$2$1 {
@kotlin.Metadata
final class C$2 {
// source: 'localFunctionInInitBlock.kt'
// source: 'inInitBlock.kt'
enclosing method C.<init>(Ljava/lang/String;)V
public final static field INSTANCE: C$2
inner (anonymous) class C$2
@@ -52,7 +52,7 @@ final class C$2 {
@kotlin.Metadata
final class C$3$1 {
// source: 'localFunctionInInitBlock.kt'
// source: 'inInitBlock.kt'
enclosing method C$3.invoke()V
public final static field INSTANCE: C$3$1
inner (anonymous) class C$3
@@ -65,7 +65,7 @@ final class C$3$1 {
@kotlin.Metadata
final class C$3 {
// source: 'localFunctionInInitBlock.kt'
// source: 'inInitBlock.kt'
enclosing method C.<init>()V
public final static field INSTANCE: C$3
inner (anonymous) class C$3
@@ -78,7 +78,7 @@ final class C$3 {
@kotlin.Metadata
final class C$test$1 {
// source: 'localFunctionInInitBlock.kt'
// source: 'inInitBlock.kt'
enclosing method C.test()V
public final static field INSTANCE: C$test$1
inner (anonymous) class C$test$1
@@ -90,7 +90,7 @@ final class C$test$1 {
@kotlin.Metadata
public final class C {
// source: 'localFunctionInInitBlock.kt'
// source: 'inInitBlock.kt'
inner (anonymous) class C$1
inner (anonymous) class C$2
inner (anonymous) class C$3
@@ -1,6 +1,6 @@
@kotlin.Metadata
public final class C {
// source: 'localFunctionInInitBlock.kt'
// source: 'inInitBlock.kt'
public method <init>(): void
public method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public method <init>(p0: int): void
@@ -0,0 +1,18 @@
@kotlin.Metadata
final class SimpleKt$foo$1 {
// source: 'simple.kt'
enclosing method SimpleKt.foo()V
public final static field INSTANCE: SimpleKt$foo$1
inner (anonymous) class SimpleKt$foo$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
public final class SimpleKt {
// source: 'simple.kt'
inner (anonymous) class SimpleKt$foo$1
public final static method foo(): void
}
@@ -1,6 +1,6 @@
@kotlin.Metadata
public final class LocalFunctionKt {
// source: 'localFunction.kt'
public final class SimpleKt {
// source: 'simple.kt'
private final static method foo$bar(): void
public final static method foo(): void
}
@@ -185,16 +185,6 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
runTest("compiler/testData/codegen/bytecodeListing/kt45934.kt");
}
@TestMetadata("localFunction.kt")
public void testLocalFunction() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/localFunction.kt");
}
@TestMetadata("localFunctionInInitBlock.kt")
public void testLocalFunctionInInitBlock() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/localFunctionInInitBlock.kt");
}
@TestMetadata("noCollectionStubMethodsInInterface.kt")
public void testNoCollectionStubMethodsInInterface() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/noCollectionStubMethodsInInterface.kt");
@@ -1566,6 +1556,29 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/localFunctions")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class LocalFunctions extends AbstractBytecodeListingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInLocalFunctions() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/localFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("inInitBlock.kt")
public void testInInitBlock() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/localFunctions/inInitBlock.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/localFunctions/simple.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/main")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -185,16 +185,6 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
runTest("compiler/testData/codegen/bytecodeListing/kt45934.kt");
}
@TestMetadata("localFunction.kt")
public void testLocalFunction() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/localFunction.kt");
}
@TestMetadata("localFunctionInInitBlock.kt")
public void testLocalFunctionInInitBlock() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/localFunctionInInitBlock.kt");
}
@TestMetadata("noCollectionStubMethodsInInterface.kt")
public void testNoCollectionStubMethodsInInterface() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/noCollectionStubMethodsInInterface.kt");
@@ -1566,6 +1556,29 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/localFunctions")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class LocalFunctions extends AbstractIrBytecodeListingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInLocalFunctions() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/localFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("inInitBlock.kt")
public void testInInitBlock() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/localFunctions/inInitBlock.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/localFunctions/simple.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/main")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)