Add a test.

This commit is contained in:
Jack Conradson 2016-06-14 14:28:47 -07:00
parent 36f7632232
commit 5cef06fa3e
1 changed files with 5 additions and 0 deletions

View File

@ -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);");
});
}
}