restructured control flow tests
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
== C ==
|
||||
class C {
|
||||
fun component1() = 1
|
||||
fun component2() = 2
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== component1 ==
|
||||
fun component1() = 1
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
r(1)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== component2 ==
|
||||
fun component2() = 2
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
r(2)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== test ==
|
||||
fun test(c: C) {
|
||||
val (a, b) = c
|
||||
val d = 1
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(c: C)
|
||||
w(c)
|
||||
mark({ val (a, b) = c val d = 1 })
|
||||
r(c)
|
||||
v(a)
|
||||
call(a, component1)
|
||||
w(a)
|
||||
v(b)
|
||||
call(b, component2)
|
||||
w(b)
|
||||
v(val d = 1)
|
||||
r(1)
|
||||
w(d)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
@@ -0,0 +1,11 @@
|
||||
package n
|
||||
|
||||
class C {
|
||||
fun component1() = 1
|
||||
fun component2() = 2
|
||||
}
|
||||
|
||||
fun test(c: C) {
|
||||
val (a, b) = c
|
||||
val d = 1
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
== foo ==
|
||||
fun foo(x: Int) {
|
||||
val (a, b) = x
|
||||
a
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(x: Int)
|
||||
w(x)
|
||||
mark({ val (a, b) = x a })
|
||||
r(x)
|
||||
v(a)
|
||||
w(a)
|
||||
v(b)
|
||||
w(b)
|
||||
r(a)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
@@ -0,0 +1,4 @@
|
||||
fun foo(x: Int) {
|
||||
val (a, b) = x
|
||||
a
|
||||
}
|
||||
Reference in New Issue
Block a user