def test_fexpressions2(): f_exp = pddl.FExpression('=', [ pddl.FHead('blue-count', pddl_functions.make_variable_list(['t0'])), pddl.ConstantNumber(1) ]) cc = pddl_functions.ColourCount.from_fexpression(f_exp) assert (f_exp.asPDDL() == cc.asPDDL())
def test_fexpressions3(): f_exp = pddl.FExpression('=', [ pddl.FHead('blue-count', pddl_functions.make_variable_list(['t0'])), pddl.ConstantNumber(2) ]) cc = pddl_functions.ColourCount('blue', 't0', 1) cc.number = 2 assert (f_exp.asPDDL() == cc.asPDDL())