File tree 2 files changed +37
-31
lines changed
2 files changed +37
-31
lines changed Original file line number Diff line number Diff line change @@ -570,9 +570,11 @@ RUN(NAME test_unary_op_01 LABELS cpython llvm c) # unary minus
570
570
RUN(NAME test_unary_op_02 LABELS cpython llvm c) # unary plus
571
571
RUN(NAME test_unary_op_03 LABELS cpython llvm c wasm) # unary bitinvert
572
572
RUN(NAME test_unary_op_04 LABELS cpython llvm c) # unary bitinvert
573
- RUN(NAME test_unary_op_05 LABELS cpython llvm c) # unsigned unary minus, plus
573
+ # Unsigned unary minus is not supported in CPython
574
+ # RUN(NAME test_unary_op_05 LABELS cpython llvm c) # unsigned unary minus, plus
574
575
RUN(NAME test_unary_op_06 LABELS cpython llvm c) # unsigned unary bitnot
575
- RUN(NAME test_unsigned_01 LABELS cpython llvm c) # unsigned bitshift left, right
576
+ # The value after shift overflows in CPython
577
+ # RUN(NAME test_unsigned_01 LABELS cpython llvm c) # unsigned bitshift left, right
576
578
RUN(NAME test_unsigned_02 LABELS cpython llvm c)
577
579
RUN(NAME test_unsigned_03 LABELS cpython llvm c)
578
580
RUN(NAME test_bool_binop LABELS cpython llvm c)
Original file line number Diff line number Diff line change @@ -34,46 +34,50 @@ def test_02():
34
34
print (w )
35
35
assert w == u32 (11 )
36
36
37
- def test_03 ():
38
- x : u32 = u32 (- 10 )
39
- print (x )
40
- assert x == u32 (4294967286 )
37
+ # Disable following tests
38
+ # Negative numbers in unsigned should throw errors
39
+ # TODO: Add these tests as error reference tests
41
40
42
- y : u16 = u16 (x )
43
- print (y )
44
- assert y == u16 (65526 )
41
+ # def test_03():
42
+ # x : u32 = u32(-10)
43
+ # print(x)
44
+ # assert x == u32(4294967286)
45
45
46
- z : u64 = u64 ( y )
47
- print (z )
48
- assert z == u64 (65526 )
46
+ # y: u16 = u16(x )
47
+ # print(y )
48
+ # assert y == u16 (65526)
49
49
50
- w : u8 = u8 ( z )
51
- print (w )
52
- assert w == u8 ( 246 )
50
+ # z: u64 = u64(y )
51
+ # print(z )
52
+ # assert z == u64(65526 )
53
53
54
- def test_04 ():
55
- x : u64 = u64 (- 11 )
56
- print (x )
57
- # TODO: We are unable to store the following u64 in AST/R
58
- # assert x == u64(18446744073709551605)
54
+ # w: u8 = u8(z)
55
+ # print(w)
56
+ # assert w == u8(246)
59
57
60
- y : u8 = u8 (x )
61
- print (y )
62
- assert y == u8 (245 )
58
+ # def test_04():
59
+ # x : u64 = u64(-11)
60
+ # print(x)
61
+ # # TODO: We are unable to store the following u64 in AST/R
62
+ # # assert x == u64(18446744073709551605)
63
63
64
- z : u16 = u16 ( y )
65
- print (z )
66
- assert z == u16 (245 )
64
+ # y: u8 = u8(x )
65
+ # print(y )
66
+ # assert y == u8 (245)
67
67
68
- w : u32 = u32 (z )
69
- print (w )
70
- assert w == u32 (245 )
68
+ # z: u16 = u16(y)
69
+ # print(z)
70
+ # assert z == u16(245)
71
+
72
+ # w: u32 = u32(z)
73
+ # print(w)
74
+ # assert w == u32(245)
71
75
72
76
73
77
def main0 ():
74
78
test_01 ()
75
79
test_02 ()
76
- test_03 ()
77
- test_04 ()
80
+ # test_03()
81
+ # test_04()
78
82
79
83
main0 ()
You can’t perform that action at this time.
0 commit comments