JVM IR: Update test expectation for testSamAdapterAndInlineOnce
...and remove redundant bytecode text tests.
This commit is contained in:
committed by
Alexander Udalov
parent
8574cb4466
commit
7bfe2c0bbc
Generated
-20
@@ -4314,11 +4314,6 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("samWrapperConstructorNonSynthetic.kt")
|
|
||||||
public void testSamWrapperConstructorNonSynthetic() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperConstructorNonSynthetic.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samWrapperForNullInitialization.kt")
|
@TestMetadata("samWrapperForNullInitialization.kt")
|
||||||
public void testSamWrapperForNullInitialization() throws Exception {
|
public void testSamWrapperForNullInitialization() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperForNullInitialization.kt");
|
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperForNullInitialization.kt");
|
||||||
@@ -4344,25 +4339,10 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperOfReference.kt");
|
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperOfReference.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("samWrapperPrivateFinalSyntheticField.kt")
|
|
||||||
public void testSamWrapperPrivateFinalSyntheticField() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperPrivateFinalSyntheticField.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samWrapperRawTypes.kt")
|
@TestMetadata("samWrapperRawTypes.kt")
|
||||||
public void testSamWrapperRawTypes() throws Exception {
|
public void testSamWrapperRawTypes() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperRawTypes.kt");
|
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperRawTypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("samWrapperSyntheticFlags.kt")
|
|
||||||
public void testSamWrapperSyntheticFlags() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperSyntheticFlags.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samWrapperSyntheticImplementationMethod.kt")
|
|
||||||
public void testSamWrapperSyntheticImplementationMethod() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperSyntheticImplementationMethod.kt");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/bytecodeText/statements")
|
@TestMetadata("compiler/testData/codegen/bytecodeText/statements")
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// WITH_SIGNATURES
|
||||||
package test
|
package test
|
||||||
|
|
||||||
inline fun <reified T> makeRunnable(noinline lambda: ()->Unit) : Runnable {
|
inline fun <reified T> makeRunnable(noinline lambda: ()->Unit) : Runnable {
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnable$0 {
|
public final class<null> test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnable$0 {
|
||||||
// source: 'samAdapterAndInlinedOne.kt'
|
// source: 'samAdapterAndInlinedOne.kt'
|
||||||
private synthetic final field function: kotlin.jvm.functions.Function0
|
public <null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
public method <init>(p0: kotlin.jvm.functions.Function0): void
|
public synthetic final <null> method run(): void
|
||||||
public synthetic final method run(): void
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
final class test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0 {
|
final class<null> test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0 {
|
||||||
// source: 'samAdapterAndInlinedOne.kt'
|
// source: 'samAdapterAndInlinedOne.kt'
|
||||||
private synthetic final field function: kotlin.jvm.functions.Function0
|
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||||
method <init>(p0: kotlin.jvm.functions.Function0): void
|
public synthetic final <null> method run(): void
|
||||||
public synthetic final method run(): void
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class test/SamAdapterAndInlinedOneKt {
|
public final class<null> test/SamAdapterAndInlinedOneKt {
|
||||||
// source: 'samAdapterAndInlinedOne.kt'
|
// source: 'samAdapterAndInlinedOne.kt'
|
||||||
public synthetic final static method makeRunnable(p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Lkotlin/Unit;>;)Ljava/lang/Runnable;> method makeRunnable2(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
||||||
public final static @org.jetbrains.annotations.NotNull method makeRunnable2(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Lkotlin/Unit;>;)Ljava/lang/Runnable;> method noInline(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
||||||
public final static @org.jetbrains.annotations.NotNull method noInline(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Lkotlin/Unit;>;)Ljava/lang/Runnable;> method noInline2(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
||||||
public final static @org.jetbrains.annotations.NotNull method noInline2(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
public synthetic final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<Lkotlin/Unit;>;)Ljava/lang/Runnable;> method makeRunnable(p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnable$0 {
|
||||||
|
// source: 'samAdapterAndInlinedOne.kt'
|
||||||
|
public <null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public synthetic final <null> method run(): void
|
||||||
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
|
public final inner class test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnable$0
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
final class<null> test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0 {
|
||||||
|
// source: 'samAdapterAndInlinedOne.kt'
|
||||||
|
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||||
|
public synthetic final <null> method run(): void
|
||||||
|
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||||
|
final inner class test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata
|
||||||
|
public final class<null> test/SamAdapterAndInlinedOneKt {
|
||||||
|
// source: 'samAdapterAndInlinedOne.kt'
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Lkotlin/Unit;>;)Ljava/lang/Runnable;> method makeRunnable2(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Lkotlin/Unit;>;)Ljava/lang/Runnable;> method noInline(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
||||||
|
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Lkotlin/Unit;>;)Ljava/lang/Runnable;> method noInline2(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
||||||
|
public synthetic final static <null> method makeRunnable(p0: kotlin.jvm.functions.Function0): java.lang.Runnable
|
||||||
|
final inner class test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0
|
||||||
|
public final inner class test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnable$0
|
||||||
|
}
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
// FILE: J.java
|
|
||||||
|
|
||||||
public class J {
|
|
||||||
public static void g(Runnable r) {
|
|
||||||
r.run();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FILE: test.kt
|
|
||||||
|
|
||||||
fun nonInlineFun() {
|
|
||||||
val f = {}
|
|
||||||
J.g(f)
|
|
||||||
}
|
|
||||||
|
|
||||||
inline fun inlineFun() {
|
|
||||||
val f = {}
|
|
||||||
J.g(f)
|
|
||||||
}
|
|
||||||
|
|
||||||
// The SAM wrapper constructor is public inside of inline functions.
|
|
||||||
// It has no other flags. In particular, it is not synthetic.
|
|
||||||
// 1 access flags 0x0\n\s*<init>\(Lkotlin/jvm/functions/Function0;\)V
|
|
||||||
// 1 access flags 0x1\n\s*public <init>\(Lkotlin/jvm/functions/Function0;\)V
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
// FILE: J.java
|
|
||||||
|
|
||||||
public class J {
|
|
||||||
public static void g(Runnable r) {
|
|
||||||
r.run();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FILE: test.kt
|
|
||||||
|
|
||||||
fun f() {
|
|
||||||
val r: () -> Unit = {}
|
|
||||||
J.g(r)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1 private final synthetic Lkotlin/jvm/functions/Function0; function
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
// FILE: J.java
|
|
||||||
|
|
||||||
public class J {
|
|
||||||
public static void g(Runnable r) {
|
|
||||||
r.run();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FILE: test.kt
|
|
||||||
|
|
||||||
fun nonInlineFun() {
|
|
||||||
val f = {}
|
|
||||||
J.g(f)
|
|
||||||
}
|
|
||||||
|
|
||||||
inline fun inlineFun() {
|
|
||||||
val f = {}
|
|
||||||
J.g(f)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1 final class TestKt\$sam\$java_lang_Runnable\$0 implements java/lang/Runnable
|
|
||||||
// 0 public final class TestKt\$sam\$java_lang_Runnable\$0 implements java/lang/Runnable
|
|
||||||
// 1 public final class TestKt\$sam\$i\$java_lang_Runnable\$0 implements java/lang/Runnable
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
// FILE: J.java
|
|
||||||
|
|
||||||
public class J {
|
|
||||||
public static void g(Runnable r) {
|
|
||||||
r.run();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FILE: test.kt
|
|
||||||
|
|
||||||
fun nonInlineFun() {
|
|
||||||
val f = {}
|
|
||||||
J.g(f)
|
|
||||||
}
|
|
||||||
|
|
||||||
inline fun inlineFun() {
|
|
||||||
val f = {}
|
|
||||||
J.g(f)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2 public final synthetic run\(\)V
|
|
||||||
@@ -4386,11 +4386,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("samWrapperConstructorNonSynthetic.kt")
|
|
||||||
public void testSamWrapperConstructorNonSynthetic() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperConstructorNonSynthetic.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samWrapperForNullInitialization.kt")
|
@TestMetadata("samWrapperForNullInitialization.kt")
|
||||||
public void testSamWrapperForNullInitialization() throws Exception {
|
public void testSamWrapperForNullInitialization() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperForNullInitialization.kt");
|
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperForNullInitialization.kt");
|
||||||
@@ -4416,25 +4411,10 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperOfReference.kt");
|
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperOfReference.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("samWrapperPrivateFinalSyntheticField.kt")
|
|
||||||
public void testSamWrapperPrivateFinalSyntheticField() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperPrivateFinalSyntheticField.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samWrapperRawTypes.kt")
|
@TestMetadata("samWrapperRawTypes.kt")
|
||||||
public void testSamWrapperRawTypes() throws Exception {
|
public void testSamWrapperRawTypes() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperRawTypes.kt");
|
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperRawTypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("samWrapperSyntheticFlags.kt")
|
|
||||||
public void testSamWrapperSyntheticFlags() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperSyntheticFlags.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samWrapperSyntheticImplementationMethod.kt")
|
|
||||||
public void testSamWrapperSyntheticImplementationMethod() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperSyntheticImplementationMethod.kt");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/bytecodeText/statements")
|
@TestMetadata("compiler/testData/codegen/bytecodeText/statements")
|
||||||
|
|||||||
-20
@@ -4314,11 +4314,6 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("samWrapperConstructorNonSynthetic.kt")
|
|
||||||
public void testSamWrapperConstructorNonSynthetic() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperConstructorNonSynthetic.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samWrapperForNullInitialization.kt")
|
@TestMetadata("samWrapperForNullInitialization.kt")
|
||||||
public void testSamWrapperForNullInitialization() throws Exception {
|
public void testSamWrapperForNullInitialization() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperForNullInitialization.kt");
|
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperForNullInitialization.kt");
|
||||||
@@ -4344,25 +4339,10 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperOfReference.kt");
|
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperOfReference.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("samWrapperPrivateFinalSyntheticField.kt")
|
|
||||||
public void testSamWrapperPrivateFinalSyntheticField() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperPrivateFinalSyntheticField.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samWrapperRawTypes.kt")
|
@TestMetadata("samWrapperRawTypes.kt")
|
||||||
public void testSamWrapperRawTypes() throws Exception {
|
public void testSamWrapperRawTypes() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperRawTypes.kt");
|
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperRawTypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("samWrapperSyntheticFlags.kt")
|
|
||||||
public void testSamWrapperSyntheticFlags() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperSyntheticFlags.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("samWrapperSyntheticImplementationMethod.kt")
|
|
||||||
public void testSamWrapperSyntheticImplementationMethod() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperSyntheticImplementationMethod.kt");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/bytecodeText/statements")
|
@TestMetadata("compiler/testData/codegen/bytecodeText/statements")
|
||||||
|
|||||||
Reference in New Issue
Block a user