Correct Java runtime test
This commit is contained in:
parent
870b814f5e
commit
5a4291911e
1 changed files with 4 additions and 4 deletions
|
|
@ -69,14 +69,14 @@ public class cpp11_li_std_array_runme {
|
|||
|
||||
// out of range errors
|
||||
try {
|
||||
ai.set(ai.size()) = 999;
|
||||
ai.set((int)ai.size(), 0);
|
||||
throw new RuntimeException("Out of range exception not caught");
|
||||
} catch(OutOfRangeException e) {
|
||||
} catch(IndexOutOfBoundsException e) {
|
||||
}
|
||||
try {
|
||||
ai.set(-1) = 999;
|
||||
ai.set(-1, 0);
|
||||
throw new RuntimeException("Out of range exception not caught");
|
||||
} catch(OutOfRangeException e) {
|
||||
} catch(IndexOutOfBoundsException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue