Skip to content

Commit

Permalink
Add test with asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
Smit-create committed Jul 18, 2023
1 parent c7b8de2 commit 6dc605a
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions integration_tests/test_unsigned_02.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
from lpython import u16, i32
from lpython import u16, i32, u8, u32, u64

# test issue 2170

i : i32
u : u16 = u16(32768)
x : i32
u_1 : u16 = u16(32768)
u_2 : u8 = u8(24)
u_3 : u32 = u32(32768)
u_4 : u64 = u64(32768)

for i in range(i32(u)):
x = i * 2
assert u_1 == u16(32768)
assert u_2 == u8(24)
assert u_3 == u32(32768)
assert u_4 == u64(32768)

print(u_1, u_2, u_3, u_4)

0 comments on commit 6dc605a

Please sign in to comment.