Skip to content

Commit

Permalink
add some sanity checks
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed May 16, 2023
1 parent 6773042 commit f28b1db
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/compiler/ir/test_optimize_ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,10 @@ def test_ir_optimizer(ir):
def test_static_assertions(ir, assert_compile_failed):
ir = IRnode.from_list(ir)
assert_compile_failed(lambda: optimizer.optimize(ir), StaticAssertionException)


def test_operator_set_values():
# some sanity checks
assert optimizer.COMPARISON_OPS == {"lt", "gt", "le", "ge", "slt", "sgt", "sle", "sge"}
assert optimizer.STRICT_COMPARISON_OPS == {"lt", "gt", "slt", "sgt"}
assert optimizer.UNSTRICT_COMPARISON_OPS == {"le", "ge", "sle", "sge"}

0 comments on commit f28b1db

Please sign in to comment.