File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 53
53
(dt .str64 , dt .str32 ), (dt .str64 , dt .str64 )]
54
54
55
55
56
+ src_integers = random .choices (range (100_000 ), k = 50 )
57
+
58
+
56
59
57
60
#-------------------------------------------------------------------------------
58
61
# logical ops
@@ -130,7 +133,22 @@ def test_logical_xor(seed):
130
133
for i in range (n )]
131
134
132
135
136
+ #-------------------------------------------------------------------------------
137
+ # Lshift/Rshift operators
138
+ #-------------------------------------------------------------------------------
139
+ def test_lshift ():
140
+ DT = dt .Frame ({'C0' : src_integers })
141
+ RES = DT [:, f .C0 << 2 ]
142
+ EXP = [entry << 2 for entry in src_integers ]
143
+ assert RES .to_list ()[0 ] == EXP
144
+
145
+ def test_rshift ():
146
+ DT = dt .Frame ({'C0' : src_integers })
147
+ RES = DT [:, f .C0 >> 2 ]
148
+ EXP = [entry >> 2 for entry in src_integers ]
149
+ assert RES .to_list ()[0 ] == EXP
133
150
151
+
134
152
#-------------------------------------------------------------------------------
135
153
# Equality operators
136
154
#-------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments