Skip to content

Commit 59eb1c9

Browse files
author
Daniel Kroening
authored
Merge pull request #442 from smowton/add_lvt_tests
Add tests for local variable live ranges with holes
2 parents 0a3897b + 7fe27bd commit 59eb1c9

File tree

6 files changed

+58
-0
lines changed

6 files changed

+58
-0
lines changed
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
public class live_range_with_holes {
3+
4+
public static void main(int arg) {
5+
6+
int x;
7+
int y;
8+
switch(arg) {
9+
case 1:
10+
x = 1;
11+
y = 1;
12+
break;
13+
case 2:
14+
x = 2;
15+
y = 2;
16+
break;
17+
default:
18+
x = 0;
19+
y = 0;
20+
break;
21+
}
22+
assert(x >= 0 && x <= 2);
23+
24+
}
25+
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
live_range_with_holes.class
3+
--function live_range_with_holes.main
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
public class live_range_exception {
3+
public static void main() {
4+
int x;
5+
int y;
6+
try
7+
{
8+
x = 0;
9+
y = 0;
10+
}
11+
catch(Exception e)
12+
{
13+
x = 1;
14+
y = 1;
15+
}
16+
assert(x==0 || x==1);
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
live_range_exception.class
3+
--function live_range_exception.main
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--

0 commit comments

Comments
 (0)