}
@Test
public void booleanParamExpressions() throws HBqlException {
ExpressionTree tree;
tree = parseExpr(":test");
tree.setParameter(":test", Boolean.TRUE);
assertExpressionEvalTrue(tree);
tree.setParameter(":test", Boolean.FALSE);
assertExpressionEvalFalse(tree);
tree = parseExpr(":test AND :test");
tree.setParameter(":test", Boolean.TRUE);
assertExpressionEvalTrue(tree);
tree.setParameter(":test", Boolean.FALSE);
assertExpressionEvalFalse(tree);
tree = parseExpr(":test1 OR :test2");
tree.setParameter(":test1", Boolean.TRUE);
tree.setParameter(":test2", Boolean.FALSE);
assertExpressionEvalTrue(tree);
tree.setParameter(":test1", Boolean.FALSE);
assertExpressionEvalFalse(tree);
tree = parseExpr(":test1");
assertHasException(tree, InvalidTypeException.class);
tree = parseExpr(":b1 == :b2");
tree.setParameter("b1", Boolean.TRUE);
tree.setParameter("b2", Boolean.TRUE);
assertExpressionEvalTrue(tree);
tree.setParameter("b2", Boolean.FALSE);
assertExpressionEvalFalse(tree);
tree = parseExpr(":b1 != :b2");
tree.setParameter("b1", Boolean.TRUE);
tree.setParameter("b2", Boolean.FALSE);
assertExpressionEvalTrue(tree);
tree.setParameter("b2", Boolean.TRUE);
assertExpressionEvalFalse(tree);
tree = parseExpr("((((:b1 OR :b1 OR :b1))))" + " OR " + "((((:b1 OR :b1 OR :b1))))");
tree.setParameter("b1", Boolean.FALSE);
assertExpressionEvalFalse(tree);
tree = parseExpr(":b1 OR ((:b1) or :b1) OR :b2");
tree.setParameter("b1", Boolean.TRUE);
tree.setParameter("b2", Boolean.FALSE);
assertExpressionEvalTrue(tree);
}