File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -634,6 +634,7 @@ RUN(NAME test_str_comparison LABELS cpython llvm c)
634634RUN(NAME test_bit_length LABELS cpython llvm c)
635635RUN(NAME str_to_list_cast LABELS cpython llvm c)
636636RUN(NAME cast_01 LABELS cpython llvm c)
637+ RUN(NAME cast_02 LABELS cpython llvm c)
637638RUN(NAME test_sys_01 LABELS cpython llvm c NOFAST)
638639RUN(NAME intent_01 LABELS cpython llvm)
639640
Original file line number Diff line number Diff line change 1+ from lpython import u8 , u16 , u32 , u64
2+
3+ def test_01 ():
4+ x : u32 = u32 (10 )
5+ print (x )
6+ assert x == u32 (10 )
7+
8+ y : u16 = u16 (x )
9+ print (y )
10+ assert y == u16 (10 )
11+
12+ z : u64 = u64 (y )
13+ print (z )
14+ assert z == u64 (10 )
15+
16+ w : u8 = u8 (z )
17+ print (w )
18+ assert w == u8 (10 )
19+
20+ def test_02 ():
21+ x : u64 = u64 (11 )
22+ print (x )
23+ assert x == u64 (11 )
24+
25+ y : u8 = u8 (x )
26+ print (y )
27+ assert y == u8 (11 )
28+
29+ z : u16 = u16 (y )
30+ print (z )
31+ assert z == u16 (11 )
32+
33+ w : u32 = u32 (z )
34+ print (w )
35+ assert w == u32 (11 )
36+
37+
38+ def main0 ():
39+ test_01 ()
40+ test_02 ()
41+
42+ main0 ()
You can’t perform that action at this time.
0 commit comments