Test for CFA in string templates

This commit is contained in:
Andrey Breslav
2013-12-04 14:26:48 +04:00
parent 11fcd64949
commit e09d3aab3a
3 changed files with 30 additions and 0 deletions
@@ -0,0 +1,22 @@
== test ==
fun test() {
"${throw Exception()} ${1}"
}
---------------------
L0:
<START>
mark({ "${throw Exception()} ${1}" })
mark("${throw Exception()} ${1}")
mark(throw Exception())
mark(Exception())
call(Exception, <init>)
throw (throw Exception()) NEXT:[<ERROR>]
- r(1) PREV:[]
- r("${throw Exception()} ${1}") PREV:[]
L1:
<END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> PREV:[throw (throw Exception())]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
@@ -0,0 +1,3 @@
fun test() {
"${throw Exception()} ${1}"
}
@@ -228,6 +228,11 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
doTest("compiler/testData/cfg/deadCode/returnInElvis.kt");
}
@TestMetadata("stringTemplate.kt")
public void testStringTemplate() throws Exception {
doTest("compiler/testData/cfg/deadCode/stringTemplate.kt");
}
}
public static Test suite() {