restructured control flow tests

This commit is contained in:
Svetlana Isakova
2014-03-04 19:00:18 +04:00
parent fe349da4d5
commit ec47821567
85 changed files with 317 additions and 203 deletions
@@ -0,0 +1,82 @@
== A ==
trait A {
fun foo() : Int
}
---------------------
L0:
<START>
L1:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== foo ==
fun foo() : Int
---------------------
L0:
<START>
L1:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== B ==
class B : A {
override fun foo() = 10
}
---------------------
L0:
<START>
unsupported(DELEGATOR_SUPER_CLASS : A)
L1:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== foo ==
override fun foo() = 10
---------------------
L0:
<START>
r(10)
L1:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== foo ==
fun foo(b: B) : Int {
val o = object : A by b {}
return o.foo()
}
---------------------
L0:
<START>
v(b: B)
w(b)
mark({ val o = object : A by b {} return o.foo() })
v(val o = object : A by b {})
mark(object : A by b {})
r(b)
r(object : A by b {})
w(o)
mark(o.foo())
mark(foo())
r(o)
call(foo, foo)
ret(*) L1
L1:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================