Skip to content

Commit b2c1912

Browse files
Fix nonsensical jbmc/catch1 test
some_exception1 and some_exception2 classes were missing, leading to wrong results. Changed to test to check in heritance behavior on catching exception classes.
1 parent ce13d28 commit b2c1912

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

jbmc/regression/jbmc/catch1/src/main/java/catch1.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class some_exception2 extends some_exception1
88

99
class catch1
1010
{
11-
public static void main(String[] args)
11+
public static void catchSuper() throws Throwable
1212
{
1313
try
1414
{
@@ -19,5 +19,17 @@ public static void main(String[] args)
1919
{
2020
}
2121
}
22+
23+
public static void catchSub() throws Throwable
24+
{
25+
try
26+
{
27+
throw new some_exception1();
28+
}
29+
30+
catch(some_exception2 e)
31+
{
32+
}
33+
}
2234
}
2335

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
CORE
2-
catch1
2+
catch1.catchSub
33
-cp target/classes
44
^EXIT=10$
55
^SIGNAL=0$
66
^VERIFICATION FAILED$
7-
^\[.*\] line 15 no uncaught exception: FAILURE$
7+
^\[.*\] line 27 no uncaught exception: FAILURE$
88
--
99
^warning: ignoring

jbmc/regression/jbmc/catch1/test_no_uncaught_exceptions.desc renamed to jbmc/regression/jbmc/catch1/test_catch_super.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
2-
catch1
3-
--disable-uncaught-exception-check -cp target/classes
2+
catch1.catchSuper
3+
-cp target/classes
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$

0 commit comments

Comments
 (0)