def test_comparison_lits():
    px = Promise('x', TypeEngine.to_literal(None, 5, int, None))
    py = Promise('y', TypeEngine.to_literal(None, 8, int, None))

    def eval_expr(expr, expected: bool):
        print(f'{expr} evals to {expr.eval()}')
        assert (expected == expr.eval())
    eval_expr((px == py), False)
    eval_expr((px < py), True)
    eval_expr(((px == py) & (px < py)), False)
    eval_expr((((px == py) & (px < py)) | (px > py)), False)
    eval_expr((px < 5), False)
    eval_expr((px >= 5), True)
    eval_expr((py >= 5), True)
def test_comparison_lits():
    px = Promise('x', TypeEngine.to_literal(None, 5, int, None))
    py = Promise('y', TypeEngine.to_literal(None, 8, int, None))

    def eval_expr(expr, expected: bool):
        print(f'{expr} evals to {expr.eval()}')
        assert (expected == expr.eval())
    eval_expr((px == py), False)
    eval_expr((px < py), True)
    eval_expr(((px == py) & (px < py)), False)
    eval_expr((((px == py) & (px < py)) | (px > py)), False)
    eval_expr((px < 5), False)
    eval_expr((px >= 5), True)
    eval_expr((py >= 5), True)