Control-Flow: Add tests for pseudo-values of labeled expressions
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
== foo ==
|
||||
fun foo(): Int {
|
||||
val t = @x (1 + 2)
|
||||
return t
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
2 mark({ val t = @x (1 + 2) return t })
|
||||
v(val t = @x (1 + 2))
|
||||
mark(@x (1 + 2))
|
||||
mark((1 + 2))
|
||||
r(1) -> <v0>
|
||||
r(2) -> <v1>
|
||||
mark(1 + 2)
|
||||
call(1 + 2, plus|<v0>, <v1>) -> <v2>
|
||||
w(t|<v2>)
|
||||
r(t) -> <v3>
|
||||
ret(*|<v3>) L1
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
@@ -0,0 +1,4 @@
|
||||
fun foo(): Int {
|
||||
val t = @x (1 + 2)
|
||||
return t
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
== foo ==
|
||||
fun foo(): Int {
|
||||
val t = @x (1 + 2)
|
||||
return t
|
||||
}
|
||||
---------------------
|
||||
1 <v0>: Int NEW: r(1) -> <v0>
|
||||
2 <v1>: Int NEW: r(2) -> <v1>
|
||||
1 + 2 <v2>: Int NEW: call(1 + 2, plus|<v0>, <v1>) -> <v2>
|
||||
(1 + 2) <v2>: Int COPY
|
||||
@x (1 + 2) <v2>: Int COPY
|
||||
t <v3>: Int NEW: r(t) -> <v3>
|
||||
return t !<v4>: *
|
||||
{ val t = @x (1 + 2) return t } !<v4>: * COPY
|
||||
=====================
|
||||
@@ -508,6 +508,12 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("labeledExpression.kt")
|
||||
public void testLabeledExpression() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/labeledExpression.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("LazyBooleans.kt")
|
||||
public void testLazyBooleans() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/LazyBooleans.kt");
|
||||
|
||||
@@ -510,6 +510,12 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("labeledExpression.kt")
|
||||
public void testLabeledExpression() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/labeledExpression.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("LazyBooleans.kt")
|
||||
public void testLazyBooleans() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/LazyBooleans.kt");
|
||||
|
||||
Reference in New Issue
Block a user