Skip to content

Commit 41d77f4

Browse files
committed
Add regression test for ArithmeticException
The new regression test checks that an ArithmeticException is correctly caught if the catch block specifies one of its superclasses.
1 parent 4c472e9 commit 41d77f4

File tree

7 files changed

+28
-0
lines changed

7 files changed

+28
-0
lines changed
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
public class ArithmeticExceptionTest {
2+
public static void main(String args[]) {
3+
try {
4+
int i=0;
5+
int j=10/i;
6+
}
7+
catch(Exception exc) {
8+
assert false;
9+
}
10+
}
11+
}
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package java.lang;
2+
3+
public class ArithmeticException extends RuntimeException {
4+
}
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package java.lang;
2+
3+
public class RuntimeException extends Exception {
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
ArithmeticExceptionTest.class
3+
--java-throw-runtime-exceptions
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^.*assertion at file ArithmeticExceptionTest.java line 8 function.*: FAILURE$
7+
^VERIFICATION FAILED
8+
--
9+
^warning: ignoring

0 commit comments

Comments
 (0)