forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for NegativeArraySizeException
The new test is similar to NegativeArraySizeException1 (was called NegativeArraySizeException before the previous commit). It checks that a NegativeArraySizeException is correctly caught if the catch block specifies one of its superclasses.
- Loading branch information
1 parent
9cc3192
commit 94a6ad4
Showing
7 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+626 Bytes
regression/cbmc-java/NegativeArraySizeException2/NegativeArraySizeExceptionTest.class
Binary file not shown.
10 changes: 10 additions & 0 deletions
10
regression/cbmc-java/NegativeArraySizeException2/NegativeArraySizeExceptionTest.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 NegativeArraySizeExceptionTest { | ||
public static void main(String args[]) { | ||
try { | ||
int a[]=new int[-1]; | ||
} | ||
catch (Exception exc) { | ||
assert false; | ||
} | ||
} | ||
} |
Binary file added
BIN
+246 Bytes
regression/cbmc-java/NegativeArraySizeException2/java/lang/NegativeArraySizeException.class
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
regression/cbmc-java/NegativeArraySizeException2/java/lang/NegativeArraySizeException.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,4 @@ | ||
package java.lang; | ||
|
||
public class NegativeArraySizeException extends RuntimeException { | ||
} |
Binary file added
BIN
+219 Bytes
regression/cbmc-java/NegativeArraySizeException2/java/lang/RuntimeException.class
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
regression/cbmc-java/NegativeArraySizeException2/java/lang/RuntimeException.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,4 @@ | ||
package java.lang; | ||
|
||
public class RuntimeException extends Exception { | ||
} |
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 | ||
NegativeArraySizeExceptionTest.class | ||
--java-throw-runtime-exceptions | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^.*assertion at file NegativeArraySizeExceptionTest.java line 7 function.*: FAILURE$ | ||
^VERIFICATION FAILED$ | ||
-- | ||
^warning: ignoring |