Skip to content

Commit fb89e5a

Browse files
cristina-davidsmowton
authored andcommitted
Regression test for ArithmeticException
1 parent 6ed24e5 commit fb89e5a

18 files changed

+120
-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(ArithmeticException exc) {
8+
assert false;
9+
}
10+
}
11+
}
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
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public class ArithmeticExceptionTest {
2+
public static void main(String args[]) {
3+
try {
4+
long denom=0;
5+
long num=10;
6+
long j=num/denom;
7+
}
8+
catch(ArithmeticException exc) {
9+
assert false;
10+
}
11+
}
12+
}
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 9 function.*: FAILURE$
7+
^VERIFICATION FAILED
8+
--
9+
^warning: ignoring
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(ArithmeticException exc) {
8+
assert false;
9+
}
10+
}
11+
}
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
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public class ArithmeticExceptionTest {
2+
public static void main(String args[]) {
3+
try {
4+
long denom=0;
5+
long num=10;
6+
long result=num%denom;
7+
}
8+
catch(ArithmeticException exc) {
9+
assert false;
10+
}
11+
}
12+
}
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 9 function.*: FAILURE$
7+
^VERIFICATION FAILED
8+
--
9+
^warning: ignoring
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+
double i=0;
5+
double j=10/i;
6+
}
7+
catch(ArithmeticException exc) {
8+
assert false;
9+
}
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
ArithmeticExceptionTest.class
3+
--java-throw-runtime-exceptions
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL
7+
--
8+
^warning: ignoring
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public class ArithmeticExceptionTest {
2+
public static void main(int denom) {
3+
try {
4+
int j=10/denom;
5+
}
6+
catch(ArithmeticException exc) {
7+
assert false;
8+
}
9+
}
10+
}
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 7 function.*: FAILURE$
7+
^VERIFICATION FAILED
8+
--
9+
^warning: ignoring

0 commit comments

Comments
 (0)