context.setVariable("var_var_long_1", new TreeValueExpression(new TreeStore(BUILDER, null), null, context.getVariableMapper(), "${var_long_1}", long.class));
context.setVariable("var_property_long_1", new TreeValueExpression(new TreeStore(BUILDER, null), null, context.getVariableMapper(), "${property_long_1}", long.class));
}
public void testEval() {
Tree tree = null;
Bindings bindings = null;
tree = parse("${bad}");
bindings = tree.bind(null, context.getVariableMapper());
try { getNode(tree).eval(bindings, context); fail(); } catch (ELException e) {}
tree = parse("${var_long_1}");
bindings = tree.bind(null, context.getVariableMapper());
assertEquals(1l, getNode(tree).eval(bindings, context));
tree = parse("${property_long_1}");
bindings = tree.bind(null, context.getVariableMapper());
assertEquals(1l, getNode(tree).eval(bindings, context));
tree = parse("${indentifier_string}");
bindings = tree.bind(null, context.getVariableMapper());
assertEquals("foo", getNode(tree).eval(bindings, context));
tree = parse("${var_var_long_1}");
bindings = tree.bind(null, context.getVariableMapper());
assertEquals(1l, getNode(tree).eval(bindings, context));
tree = parse("${var_property_long_1}");
bindings = tree.bind(null, context.getVariableMapper());
assertEquals(1l, getNode(tree).eval(bindings, context));
}