Add test for SAM adapter.
This commit is contained in:
committed by
Dmitry Petrov
parent
a4b9f6b215
commit
513ef0c1c8
@@ -0,0 +1,7 @@
|
||||
// FULL_JDK
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test1() {
|
||||
val hello = Runnable { println("Hello, world!") }
|
||||
hello.run()
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
FILE /samAdapter.kt
|
||||
FUN public fun test1(): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
VAR val hello: java.lang.Runnable
|
||||
CALL .Runnable type=java.lang.Runnable operator=null
|
||||
function: BLOCK type=() -> kotlin.Unit operator=LAMBDA
|
||||
FUN local final fun <anonymous>(): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from=<anonymous>
|
||||
CALL .println type=kotlin.Unit operator=null
|
||||
message: CONST String type=kotlin.String value='Hello, world!'
|
||||
CALLABLE_REFERENCE <anonymous> type=() -> kotlin.Unit operator=LAMBDA
|
||||
CALL .run type=kotlin.Unit operator=null
|
||||
$this: GET_VAR hello type=java.lang.Runnable operator=null
|
||||
@@ -624,5 +624,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/lambdas/nonLocalReturn.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("samAdapter.kt")
|
||||
public void testSamAdapter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/lambdas/samAdapter.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user