Skip to content

Commit 48f03aa

Browse files
committed
Add test for vtable abbreviation
Also amend virtual6 whose expected results are now slightly different.
1 parent 260c8ec commit 48f03aa

File tree

9 files changed

+37
-1
lines changed

9 files changed

+37
-1
lines changed

regression/cbmc-java/virtual6/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ A.class
55
^SIGNAL=0$
66
IF "java::C".*THEN GOTO
77
IF "java::B".*THEN GOTO
8-
IF "java::A".*THEN GOTO

regression/cbmc-java/virtual7/A.class

222 Bytes
Binary file not shown.

regression/cbmc-java/virtual7/B.class

207 Bytes
Binary file not shown.

regression/cbmc-java/virtual7/C.class

207 Bytes
Binary file not shown.

regression/cbmc-java/virtual7/D.class

164 Bytes
Binary file not shown.

regression/cbmc-java/virtual7/E.class

164 Bytes
Binary file not shown.
371 Bytes
Binary file not shown.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
test.class
3+
--show-goto-functions
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
IF "java::E".*THEN GOTO [12]
7+
IF "java::B".*THEN GOTO [12]
8+
IF "java::D".*THEN GOTO [12]
9+
IF "java::C".*THEN GOTO [12]
10+
--
11+
IF "java::A".*THEN GOTO
12+
GOTO 4
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
public class test {
2+
public static void main() {
3+
A[] as = { new A(), new B(), new C(), new D(), new E() };
4+
as[2].f();
5+
}
6+
}
7+
8+
class A {
9+
void f() { }
10+
}
11+
12+
13+
class B extends A {
14+
void f() { }
15+
}
16+
17+
class C extends A {
18+
void f() { }
19+
}
20+
21+
class D extends C {
22+
}
23+
24+
class E extends B {
25+
}

0 commit comments

Comments
 (0)