Add a test.
This commit is contained in:
parent
36f7632232
commit
5cef06fa3e
|
@ -229,4 +229,9 @@ public class WhenThingsGoWrongTests extends ScriptTestCase {
|
|||
assertThat(e.getMessage(), containsString("\\ujjjj"));
|
||||
}
|
||||
|
||||
public void testBadBoxingCast() {
|
||||
expectScriptThrows(ClassCastException.class, () -> {
|
||||
exec("BitSet bs = new BitSet(); bs.and(2);");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue