Skip to content

Commit 5313c52

Browse files
committed
Add basic tests for RT#115966. Fudged for now until other PRs pulled.
1 parent 3f8942b commit 5313c52

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

S03-operators/bit.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Test;
44

55
# Mostly copied from Perl 5.8.4 s t/op/bop.t
66

7-
plan 34;
7+
plan 37;
88

99
# test the bit operators '&', '|', '^', '+<', and '+>'
1010

@@ -32,6 +32,12 @@ plan 34;
3232
is +^ 0xdeaddead0000deaddead0000dead, -0xdeaddead0000deaddead0000deae,
3333
'numeric bitwise negation';
3434

35+
# Negative numbers. These really need more tests for bigint vs sized natives
36+
#?rakudo 3 skip 'RT#115966'
37+
is (-5 +& -2),(-6), "logical AND of two negative Int is twos complement";
38+
is (-7 +| -6),(-5), "logical OR of two negative Int is twos complement";
39+
is (-7 +^ -6),( 3), "logical XOR of two negative Int is twos complement";
40+
3541
# string
3642
#?niecza 6 skip 'string bitops'
3743
is( 'a' ~& 'A', 'A', 'string bitwise ~& of "a" and "A"' );

0 commit comments

Comments
 (0)