use of org.apache.jena.sparql.function.FunctionEnvBase in project jena by apache.
the class TestExpressions method testNumeric.
private static void testNumeric(String string, int i) {
Expr expr = parse(string);
NodeValue v = expr.eval(BindingFactory.binding(), new FunctionEnvBase());
assertTrue(v.isInteger());
assertEquals(i, v.getInteger().intValue());
}
use of org.apache.jena.sparql.function.FunctionEnvBase in project jena by apache.
the class TestExpressions method testBoolean.
private static void testBoolean(String string, boolean b, Binding env) {
Expr expr = parse(string);
NodeValue v = expr.eval(env, new FunctionEnvBase());
assertTrue(v.isBoolean());
assertEquals(b, v.getBoolean());
}
use of org.apache.jena.sparql.function.FunctionEnvBase in project jena by apache.
the class TestExpressions method testNumeric.
private static void testNumeric(String string, double d) {
Expr expr = parse(string);
NodeValue v = expr.eval(BindingFactory.binding(), new FunctionEnvBase());
assertTrue(v.isDouble());
assertEquals(d, v.getDouble(), 0);
}
Aggregations