Skip to content

Commit

Permalink
Regression test for ArithmeticException
Browse files Browse the repository at this point in the history
  • Loading branch information
cristina-david authored and smowton committed Aug 7, 2017
1 parent 6ed24e5 commit fb89e5a
Show file tree
Hide file tree
Showing 18 changed files with 120 additions and 0 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
public class ArithmeticExceptionTest {
public static void main(String args[]) {
try {
int i=0;
int j=10/i;
}
catch(ArithmeticException exc) {
assert false;
}
}
}
9 changes: 9 additions & 0 deletions regression/cbmc-java/ArithmeticException1/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
ArithmeticExceptionTest.class
--java-throw-runtime-exceptions
^EXIT=10$
^SIGNAL=0$
^.*assertion at file ArithmeticExceptionTest.java line 8 function.*: FAILURE$
^VERIFICATION FAILED
--
^warning: ignoring
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
public class ArithmeticExceptionTest {
public static void main(String args[]) {
try {
long denom=0;
long num=10;
long j=num/denom;
}
catch(ArithmeticException exc) {
assert false;
}
}
}
9 changes: 9 additions & 0 deletions regression/cbmc-java/ArithmeticException2/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
ArithmeticExceptionTest.class
--java-throw-runtime-exceptions
^EXIT=10$
^SIGNAL=0$
^.*assertion at file ArithmeticExceptionTest.java line 9 function.*: FAILURE$
^VERIFICATION FAILED
--
^warning: ignoring
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
public class ArithmeticExceptionTest {
public static void main(String args[]) {
try {
int i=0;
int j=10%i;
}
catch(ArithmeticException exc) {
assert false;
}
}
}
9 changes: 9 additions & 0 deletions regression/cbmc-java/ArithmeticException3/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
ArithmeticExceptionTest.class
--java-throw-runtime-exceptions
^EXIT=10$
^SIGNAL=0$
^.*assertion at file ArithmeticExceptionTest.java line 8 function.*: FAILURE$
^VERIFICATION FAILED
--
^warning: ignoring
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
public class ArithmeticExceptionTest {
public static void main(String args[]) {
try {
long denom=0;
long num=10;
long result=num%denom;
}
catch(ArithmeticException exc) {
assert false;
}
}
}
9 changes: 9 additions & 0 deletions regression/cbmc-java/ArithmeticException4/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
ArithmeticExceptionTest.class
--java-throw-runtime-exceptions
^EXIT=10$
^SIGNAL=0$
^.*assertion at file ArithmeticExceptionTest.java line 9 function.*: FAILURE$
^VERIFICATION FAILED
--
^warning: ignoring
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
public class ArithmeticExceptionTest {
public static void main(String args[]) {
try {
double i=0;
double j=10/i;
}
catch(ArithmeticException exc) {
assert false;
}
}
}
8 changes: 8 additions & 0 deletions regression/cbmc-java/ArithmeticException5/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CORE
ArithmeticExceptionTest.class
--java-throw-runtime-exceptions
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL
--
^warning: ignoring
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
public class ArithmeticExceptionTest {
public static void main(int denom) {
try {
int j=10/denom;
}
catch(ArithmeticException exc) {
assert false;
}
}
}
9 changes: 9 additions & 0 deletions regression/cbmc-java/ArithmeticException6/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
ArithmeticExceptionTest.class
--java-throw-runtime-exceptions
^EXIT=10$
^SIGNAL=0$
^.*assertion at file ArithmeticExceptionTest.java line 7 function.*: FAILURE$
^VERIFICATION FAILED
--
^warning: ignoring

0 comments on commit fb89e5a

Please sign in to comment.