painless: restore accidentally removed test

This commit is contained in:
Uwe Schindler 2016-05-14 12:00:30 +02:00
parent 17de294460
commit c8bd521ed3
1 changed files with 6 additions and 0 deletions

View File

@ -175,6 +175,12 @@ public class WhenThingsGoWrongTests extends ScriptTestCase {
});
}
public void testDynamicWrongArgs() {
expectThrows(WrongMethodTypeException.class, () -> {
exec("def x = new ArrayList(); return x.get('bogus');");
});
}
public void testDynamicArrayWrongIndex() {
expectThrows(WrongMethodTypeException.class, () -> {
exec("def x = new long[1]; x[0]=1; return x['bogus'];");