context.setFunction("vararg", "f", getClass().getMethod("foovar", new Class[]{int[].class}));
context.getELResolver().setValue(context, null, "var111", new int[]{1,1,1});
}
public void testVarargs() {
Builder builder = new Builder(Feature.VARARGS);
Tree tree = null;
tree = builder.build("${vararg:f()}");
assertEquals(foovar(), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));
tree = builder.build("${vararg:f(1)}");
assertEquals(foovar(1), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));
tree = builder.build("${vararg:f(1,1)}");
assertEquals(foovar(1,1), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));
tree = builder.build("${vararg:f(null)}");
assertEquals(foovar(0), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), null));
tree = builder.build("${vararg:f(var111)}");
assertEquals(foovar(1,1,1), getNode(tree).eval(tree.bind(context.getFunctionMapper(), null), context));
}