add test case for cross function
This commit is contained in:
parent
f03be76475
commit
af731a3c1f
@ -166,6 +166,21 @@ public class GrelTests extends RefineTest {
|
|||||||
parseEval(bindings, test);
|
parseEval(bindings, test);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// to demonstrate bug fixing for #1204
|
||||||
|
@Test
|
||||||
|
public void testCrossFunctionEval() {
|
||||||
|
String test = "cross(\"Mary\", \"My Address Book\", \"friend\")";
|
||||||
|
|
||||||
|
try {
|
||||||
|
Evaluable eval = MetaParser.parse("grel:" + test);
|
||||||
|
Object result = eval.evaluate(bindings);
|
||||||
|
Assert.assertTrue(result instanceof EvalError );
|
||||||
|
} catch (ParsingException e) {
|
||||||
|
Assert.fail("Unexpected parse failure for cross function: " + test);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void parseEval(Properties bindings, String[] test)
|
private void parseEval(Properties bindings, String[] test)
|
||||||
throws ParsingException {
|
throws ParsingException {
|
||||||
Evaluable eval = MetaParser.parse("grel:" + test[0]);
|
Evaluable eval = MetaParser.parse("grel:" + test[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user