File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,7 @@ RUN(NAME test_str_to_int LABELS cpython llvm c)
391
391
RUN (NAME test_platform LABELS cpython llvm c )
392
392
RUN (NAME test_vars_01 LABELS cpython llvm )
393
393
RUN (NAME test_version LABELS cpython llvm )
394
+ RUN (NAME logical_binop1 LABELS cpython llvm )
394
395
RUN (NAME vec_01 LABELS cpython llvm c )
395
396
RUN (NAME test_str_comparison LABELS cpython llvm c )
396
397
RUN (NAME test_bit_length LABELS cpython llvm c )
Original file line number Diff line number Diff line change
1
+ from ltypes import i32
2
+
3
+ def test_issue_1487_1 ():
4
+ a : i32
5
+ b : i32
6
+ x : i32
7
+ y : i32
8
+ or_op1 : i32
9
+ or_op2 : i32
10
+ a = 1
11
+ b = 2
12
+ x = 0
13
+ y = 4
14
+ or_op1 = a or b
15
+ or_op2 = x or y
16
+ assert or_op1 == 1
17
+ assert or_op2 == 4
18
+ y = 0
19
+ or_op2 = x or y
20
+ assert or_op2 == 0
21
+
22
+
23
+ def test_issue_1487_2 ():
24
+ a : i32
25
+ b : i32
26
+ x : i32
27
+ y : i32
28
+ and_op1 : i32
29
+ and_op2 : i32
30
+ a = 100
31
+ b = 150
32
+ x = 175
33
+ y = 0
34
+ and_op1 = a and b
35
+ and_op2 = y and x
36
+ assert and_op1 == 150
37
+ assert and_op2 == 0
38
+ x = 0
39
+ and_op2 = y and x
40
+ and_op1 = b and a
41
+ assert and_op2 == 0
42
+ assert and_op1 == 100
43
+
44
+
45
+ def check ():
46
+ test_issue_1487_1 ()
47
+ test_issue_1487_2 ()
48
+
49
+
50
+ check ()
You can’t perform that action at this time.
0 commit comments