Skip to content

Commit

Permalink
Added test for cast in increment expression
Browse files Browse the repository at this point in the history
  • Loading branch information
czgdp1807 committed Jan 6, 2023
1 parent 3f2c9f3 commit c9e229f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions integration_tests/loop_01.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from ltypes import i32, i64, i16

def main0():
s: str = 'aabbcc'; c: str
for c in s:
Expand All @@ -9,5 +11,14 @@ def test_issue_770():
res += int(i)
assert res == int(45)

def test_increment():
i: i16
sumi: i16 = i16(0)
for i in range(i16(15), i16(-1), i16(-1)):
sumi += i
print(sumi)
assert sumi == i16(120)

main0()
test_issue_770()
test_increment()

0 comments on commit c9e229f

Please sign in to comment.