[Test] Port checkVariableTable suspend lambda tests
Reveals discrepancy in LVT presence on lambda implementations on the
old and new backend.
The generated code in the constructors of Suspend Lambda objects is
identical, but the IR backend generates an LVT with the constructor
parameters.
The user has to be very insistent to see this ("for step into" +
disabling "Show only kotlin variables"), but it is an observable
difference.
This commit is contained in:
committed by
Alexander Udalov
parent
82abc80215
commit
77836f1aa9
-9
@@ -1,9 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A {
|
||||
suspend fun foo() {}
|
||||
}
|
||||
|
||||
// METHOD : A.foo(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=this TYPE=LA; INDEX=0
|
||||
// VARIABLE : NAME=$completion TYPE=Lkotlin/coroutines/Continuation; INDEX=1
|
||||
Vendored
-16
@@ -1,16 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A {
|
||||
suspend fun foo() {}
|
||||
suspend fun foo1(l: Long) {
|
||||
foo()
|
||||
foo()
|
||||
val dead = l
|
||||
}
|
||||
}
|
||||
|
||||
// METHOD : A.foo1(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=this TYPE=LA; INDEX=0
|
||||
// VARIABLE : NAME=l TYPE=J INDEX=1
|
||||
// VARIABLE : NAME=$continuation TYPE=Lkotlin/coroutines/Continuation; INDEX=7
|
||||
// VARIABLE : NAME=$result TYPE=Ljava/lang/Object; INDEX=6
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
suspend fun foo() {}
|
||||
|
||||
// METHOD : StaticSimpleKt.foo(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=$completion TYPE=Lkotlin/coroutines/Continuation; INDEX=0
|
||||
Vendored
-9
@@ -1,9 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A
|
||||
|
||||
suspend fun A.foo() {}
|
||||
|
||||
// METHOD : StaticSimpleReceiverKt.foo(LA;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=$this$foo TYPE=LA; INDEX=0
|
||||
// VARIABLE : NAME=$completion TYPE=Lkotlin/coroutines/Continuation; INDEX=1
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
suspend fun foo() {}
|
||||
suspend fun foo1(l: Long) {
|
||||
foo()
|
||||
foo()
|
||||
val dead = l
|
||||
}
|
||||
|
||||
// METHOD : StaticStateMachineKt.foo1(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=l TYPE=J INDEX=0
|
||||
// VARIABLE : NAME=$continuation TYPE=Lkotlin/coroutines/Continuation; INDEX=6
|
||||
// VARIABLE : NAME=$result TYPE=Ljava/lang/Object; INDEX=5
|
||||
compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticStateMachineReceiver.kt
Vendored
-16
@@ -1,16 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A
|
||||
|
||||
suspend fun A.foo() {}
|
||||
suspend fun A.foo1(l: Long) {
|
||||
foo()
|
||||
foo()
|
||||
val dead = l
|
||||
}
|
||||
|
||||
// METHOD : StaticStateMachineReceiverKt.foo1(LA;JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=$this$foo1 TYPE=LA; INDEX=0
|
||||
// VARIABLE : NAME=l TYPE=J INDEX=1
|
||||
// VARIABLE : NAME=$continuation TYPE=Lkotlin/coroutines/Continuation; INDEX=7
|
||||
// VARIABLE : NAME=$result TYPE=Ljava/lang/Object; INDEX=6
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
// WITH_COROUTINES
|
||||
// FILE: test.kt
|
||||
class A {
|
||||
suspend fun foo() {}
|
||||
}
|
||||
|
||||
suspend fun box() {
|
||||
A().foo()
|
||||
}
|
||||
|
||||
// LOCAL VARIABLES
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:5 foo: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:10 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
|
||||
// WITH_COROUTINES
|
||||
// FILE: test.kt
|
||||
class A {
|
||||
suspend fun foo() {}
|
||||
suspend fun foo1(l: Long) {
|
||||
foo()
|
||||
foo()
|
||||
val dead = l
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun box() {
|
||||
A().foo1(42)
|
||||
}
|
||||
|
||||
// The lambda object constructor has a local variables table on the IR backend.
|
||||
|
||||
// LOCAL VARIABLES
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:6 foo1:
|
||||
// CoroutineUtil.kt:28 getContext:
|
||||
|
||||
// LOCAL VARIABLES JVM
|
||||
// test.kt:-1 <init>:
|
||||
// LOCAL VARIABLES JVM_IR
|
||||
// test.kt:-1 <init>: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
|
||||
// LOCAL VARIABLES
|
||||
// test.kt:6 foo1:
|
||||
// test.kt:7 foo1: $continuation:kotlin.coroutines.Continuation=A$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:5 foo: $completion:kotlin.coroutines.Continuation=A$foo1$1
|
||||
// test.kt:7 foo1: $continuation:kotlin.coroutines.Continuation=A$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:8 foo1: $continuation:kotlin.coroutines.Continuation=A$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:5 foo: $completion:kotlin.coroutines.Continuation=A$foo1$1
|
||||
// test.kt:8 foo1: $continuation:kotlin.coroutines.Continuation=A$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:9 foo1: $continuation:kotlin.coroutines.Continuation=A$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:10 foo1: $continuation:kotlin.coroutines.Continuation=A$foo1$1, $result:java.lang.Object=null
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:15 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
// WITH_COROUTINES
|
||||
// FILE: test.kt
|
||||
suspend fun box() {}
|
||||
|
||||
|
||||
// LOCAL VARIABLES
|
||||
// test.kt:4 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
|
||||
// WITH_COROUTINES
|
||||
// FILE: test.kt
|
||||
class A
|
||||
|
||||
suspend fun A.foo() {}
|
||||
|
||||
suspend fun box() {
|
||||
A().foo()
|
||||
}
|
||||
|
||||
|
||||
// LOCAL VARIABLES
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:6 foo: $this$foo:A=A, $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:10 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
|
||||
// WITH_COROUTINES
|
||||
// FILE: test.kt
|
||||
suspend fun foo() {}
|
||||
suspend fun foo1(l: Long) {
|
||||
foo()
|
||||
foo()
|
||||
val dead = l
|
||||
}
|
||||
|
||||
suspend fun box() {
|
||||
foo1(42)
|
||||
}
|
||||
|
||||
// The lambda object constructor has a local variables table on the IR backend.
|
||||
|
||||
// LOCAL VARIABLES
|
||||
// test.kt:12 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:5 foo1:
|
||||
// CoroutineUtil.kt:28 getContext:
|
||||
|
||||
// LOCAL VARIABLES JVM
|
||||
// test.kt:-1 <init>:
|
||||
// LOCAL VARIABLES JVM_IR
|
||||
// test.kt:-1 <init>: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
|
||||
// LOCAL VARIABLES
|
||||
// test.kt:5 foo1:
|
||||
// test.kt:6 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:4 foo: $completion:kotlin.coroutines.Continuation=TestKt$foo1$1
|
||||
// test.kt:6 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:7 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:4 foo: $completion:kotlin.coroutines.Continuation=TestKt$foo1$1
|
||||
// test.kt:7 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:8 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:9 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null
|
||||
// test.kt:12 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:13 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
|
||||
// WITH_COROUTINES
|
||||
// FILE: test.kt
|
||||
class A
|
||||
|
||||
suspend fun A.foo() {}
|
||||
suspend fun A.foo1(l: Long) {
|
||||
foo()
|
||||
foo()
|
||||
val dead = l
|
||||
}
|
||||
|
||||
suspend fun box() {
|
||||
A().foo1(42)
|
||||
}
|
||||
|
||||
// The lambda object constructor has a local variables table on the IR backend.
|
||||
|
||||
// LOCAL VARIABLES
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:4 <init>:
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:7 foo1:
|
||||
// CoroutineUtil.kt:28 getContext:
|
||||
|
||||
// LOCAL VARIABLES JVM
|
||||
// test.kt:-1 <init>:
|
||||
// LOCAL VARIABLES JVM_IR
|
||||
// test.kt:-1 <init>: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
|
||||
// LOCAL VARIABLES
|
||||
// test.kt:7 foo1:
|
||||
// test.kt:8 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, $this$foo1:A=A, l:long=42:long
|
||||
// test.kt:6 foo: $this$foo:A=A, $completion:kotlin.coroutines.Continuation=TestKt$foo1$1
|
||||
// test.kt:8 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, $this$foo1:A=A, l:long=42:long
|
||||
// test.kt:9 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, $this$foo1:A=A, l:long=42:long
|
||||
// test.kt:6 foo: $this$foo:A=A, $completion:kotlin.coroutines.Continuation=TestKt$foo1$1
|
||||
// test.kt:9 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:10 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
|
||||
// test.kt:11 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null
|
||||
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
// test.kt:15 box: $completion:kotlin.coroutines.Continuation=helpers.ResultContinuation
|
||||
Generated
-43
@@ -105,49 +105,6 @@ public class CheckLocalVariablesTableTestGenerated extends AbstractCheckLocalVar
|
||||
runTest("compiler/testData/checkLocalVariablesTable/underscoreNames.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CompletionInSuspendFunction extends AbstractCheckLocalVariablesTableTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCompletionInSuspendFunction() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nonStaticSimple.kt")
|
||||
public void testNonStaticSimple() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/nonStaticSimple.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nonStaticStateMachine.kt")
|
||||
public void testNonStaticStateMachine() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/nonStaticStateMachine.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("staticSimple.kt")
|
||||
public void testStaticSimple() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticSimple.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("staticSimpleReceiver.kt")
|
||||
public void testStaticSimpleReceiver() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticSimpleReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("staticStateMachine.kt")
|
||||
public void testStaticStateMachine() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticStateMachine.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("staticStateMachineReceiver.kt")
|
||||
public void testStaticStateMachineReceiver() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticStateMachineReceiver.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/checkLocalVariablesTable/parametersInSuspendLambda")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+50
@@ -178,5 +178,55 @@ public class IrLocalVariableTestGenerated extends AbstractIrLocalVariableTest {
|
||||
public void testUnderscoreNames() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/underscoreNames.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/debug/localVariables/suspend/completion")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(BlockJUnit4ClassRunner.class)
|
||||
public static class Completion extends AbstractIrLocalVariableTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInCompletion() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables/suspend/completion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nonStaticSimple.kt")
|
||||
public void testNonStaticSimple() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/nonStaticSimple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nonStaticStateMachine.kt")
|
||||
public void testNonStaticStateMachine() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/nonStaticStateMachine.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticSimple.kt")
|
||||
public void testStaticSimple() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticSimple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticSimpleReceiver.kt")
|
||||
public void testStaticSimpleReceiver() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticSimpleReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticStateMachine.kt")
|
||||
public void testStaticStateMachine() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticStateMachine.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticStateMachineReceiver.kt")
|
||||
public void testStaticStateMachineReceiver() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticStateMachineReceiver.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+50
@@ -178,5 +178,55 @@ public class LocalVariableTestGenerated extends AbstractLocalVariableTest {
|
||||
public void testUnderscoreNames() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/underscoreNames.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/debug/localVariables/suspend/completion")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(BlockJUnit4ClassRunner.class)
|
||||
public static class Completion extends AbstractLocalVariableTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInCompletion() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables/suspend/completion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nonStaticSimple.kt")
|
||||
public void testNonStaticSimple() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/nonStaticSimple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nonStaticStateMachine.kt")
|
||||
public void testNonStaticStateMachine() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/nonStaticStateMachine.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticSimple.kt")
|
||||
public void testStaticSimple() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticSimple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticSimpleReceiver.kt")
|
||||
public void testStaticSimpleReceiver() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticSimpleReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticStateMachine.kt")
|
||||
public void testStaticStateMachine() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticStateMachine.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticStateMachineReceiver.kt")
|
||||
public void testStaticStateMachineReceiver() throws Exception {
|
||||
runTest("compiler/testData/debug/localVariables/suspend/completion/staticStateMachineReceiver.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
-43
@@ -105,49 +105,6 @@ public class IrCheckLocalVariablesTableTestGenerated extends AbstractIrCheckLoca
|
||||
runTest("compiler/testData/checkLocalVariablesTable/underscoreNames.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CompletionInSuspendFunction extends AbstractIrCheckLocalVariablesTableTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCompletionInSuspendFunction() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nonStaticSimple.kt")
|
||||
public void testNonStaticSimple() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/nonStaticSimple.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nonStaticStateMachine.kt")
|
||||
public void testNonStaticStateMachine() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/nonStaticStateMachine.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("staticSimple.kt")
|
||||
public void testStaticSimple() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticSimple.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("staticSimpleReceiver.kt")
|
||||
public void testStaticSimpleReceiver() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticSimpleReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("staticStateMachine.kt")
|
||||
public void testStaticStateMachine() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticStateMachine.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("staticStateMachineReceiver.kt")
|
||||
public void testStaticStateMachineReceiver() throws Exception {
|
||||
runTest("compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticStateMachineReceiver.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/checkLocalVariablesTable/parametersInSuspendLambda")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user