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 ArrayIndexOutOfBoundsException
The new test is similar to ArrayIndexOutOfBoundsException1. It checks that an ArrayIndexOutOfBoundsException is correctly caught if the catch block specifies one of its superclasses.
- Loading branch information
1 parent
379e415
commit 200017a
Showing
9 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+642 Bytes
...ession/cbmc-java/ArrayIndexOutOfBoundsException3/ArrayIndexOutOfBoundsExceptionTest.class
Binary file not shown.
11 changes: 11 additions & 0 deletions
11
regression/cbmc-java/ArrayIndexOutOfBoundsException3/ArrayIndexOutOfBoundsExceptionTest.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 ArrayIndexOutOfBoundsExceptionTest { | ||
public static void main(String args[]) { | ||
try { | ||
int[] a=new int[4]; | ||
a[4]=0; | ||
} | ||
catch (Exception exc) { | ||
assert false; | ||
} | ||
} | ||
} |
Binary file added
BIN
+263 Bytes
.../cbmc-java/ArrayIndexOutOfBoundsException3/java/lang/ArrayIndexOutOfBoundsException.class
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
...n/cbmc-java/ArrayIndexOutOfBoundsException3/java/lang/ArrayIndexOutOfBoundsException.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 ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException { | ||
} |
Binary file added
BIN
+244 Bytes
...ssion/cbmc-java/ArrayIndexOutOfBoundsException3/java/lang/IndexOutOfBoundsException.class
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
...ession/cbmc-java/ArrayIndexOutOfBoundsException3/java/lang/IndexOutOfBoundsException.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 IndexOutOfBoundsException extends RuntimeException { | ||
} |
Binary file added
BIN
+219 Bytes
regression/cbmc-java/ArrayIndexOutOfBoundsException3/java/lang/RuntimeException.class
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
regression/cbmc-java/ArrayIndexOutOfBoundsException3/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 { | ||
} |
9 changes: 9 additions & 0 deletions
9
regression/cbmc-java/ArrayIndexOutOfBoundsException3/test.desc
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 | ||
ArrayIndexOutOfBoundsExceptionTest.class | ||
--java-throw-runtime-exceptions | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^.*assertion at file ArrayIndexOutOfBoundsExceptionTest.java line 8 function.*: FAILURE$ | ||
^VERIFICATION FAILED$ | ||
-- | ||
^warning: ignoring |