Skip to content

Commit

Permalink
Add more numeric tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Smit-create committed Jul 27, 2023
1 parent 1b036e9 commit ea2d3d7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ RUN(NAME expr_18 FAIL LABELS cpython llvm c)
RUN(NAME expr_19 LABELS cpython llvm c)
RUN(NAME expr_20 LABELS cpython llvm c)
RUN(NAME expr_21 LABELS cpython llvm c)
RUN(NAME expr_22 LABELS cpython llvm c)

RUN(NAME expr_01u LABELS cpython llvm c NOFAST)
RUN(NAME expr_02u LABELS cpython llvm c NOFAST)
Expand Down
22 changes: 22 additions & 0 deletions integration_tests/expr_22.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from lpython import i32

def f():
x: i32 = 2
y: i32 = 1
z: i32 = 1
t: i32 = 1
assert x > y == z
assert not (x == y == z)
assert y == z == t != x
assert x > y == z >= t
t = 0
assert x > y == z >= t
t = 4
assert not (x > y == z >= t)
assert t > x > y == z
assert 3 > 2 >= 0 <= 6
assert t > y < x
assert not (2 == 3 > 4)


f()

0 comments on commit ea2d3d7

Please sign in to comment.