Skip to content

Commit c7b8de2

Browse files
committed
Add tests
1 parent 4649261 commit c7b8de2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

integration_tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ RUN(NAME test_unary_op_05 LABELS cpython llvm c) # unsigned unary minus, plus
574574
RUN(NAME test_unary_op_06 LABELS cpython llvm c) # unsigned unary bitnot
575575
RUN(NAME test_unsigned_01 LABELS cpython llvm c) # unsigned bitshift left, right
576576
RUN(NAME test_unsigned_02 LABELS cpython llvm c)
577+
RUN(NAME test_unsigned_03 LABELS cpython llvm c)
577578
RUN(NAME test_bool_binop LABELS cpython llvm c)
578579
RUN(NAME test_issue_518 LABELS cpython llvm c NOFAST)
579580
RUN(NAME structs_01 LABELS cpython llvm c)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from lpython import u16, i32, u8, u16, u64, i64, u32, i8
2+
3+
# test issue 2174
4+
5+
def f():
6+
u: u16 = u16(32768)
7+
assert i32(u) == 32768
8+
u1: u8 = u8(23)
9+
assert i8(u1) == i8(23)
10+
assert u16(u1) == u16(23)
11+
assert u32(u1) == u32(23)
12+
assert u64(u1) == u64(23)
13+
print(i8(u1), u16(u1), u32(u1), u64(u1))
14+
assert i64(u1) == i64(23)
15+
assert i64(u) == i64(32768)
16+
assert i32(u1) == 23
17+
print(i64(u), i32(u))
18+
19+
f()

0 commit comments

Comments
 (0)