-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regression test for ArithmeticException
- Loading branch information
1 parent
6ed24e5
commit fb89e5a
Showing
18 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+818 Bytes
regression/cbmc-java/ArithmeticException1/ArithmeticExceptionTest.class
Binary file not shown.
11 changes: 11 additions & 0 deletions
11
regression/cbmc-java/ArithmeticException1/ArithmeticExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 added
BIN
+646 Bytes
regression/cbmc-java/ArithmeticException2/ArithmeticExceptionTest.class
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
regression/cbmc-java/ArithmeticException2/ArithmeticExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 added
BIN
+629 Bytes
regression/cbmc-java/ArithmeticException3/ArithmeticExceptionTest.class
Binary file not shown.
11 changes: 11 additions & 0 deletions
11
regression/cbmc-java/ArithmeticException3/ArithmeticExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 added
BIN
+646 Bytes
regression/cbmc-java/ArithmeticException4/ArithmeticExceptionTest.class
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
regression/cbmc-java/ArithmeticException4/ArithmeticExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 added
BIN
+639 Bytes
regression/cbmc-java/ArithmeticException5/ArithmeticExceptionTest.class
Binary file not shown.
11 changes: 11 additions & 0 deletions
11
regression/cbmc-java/ArithmeticException5/ArithmeticExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 added
BIN
+605 Bytes
regression/cbmc-java/ArithmeticException6/ArithmeticExceptionTest.class
Binary file not shown.
10 changes: 10 additions & 0 deletions
10
regression/cbmc-java/ArithmeticException6/ArithmeticExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |