Skip to content

Commit

Permalink
Add basic tests for RT#115966. Fudged for now until other PRs pulled.
Browse files Browse the repository at this point in the history
  • Loading branch information
skids committed May 14, 2014
1 parent 3f8942b commit 5313c52
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S03-operators/bit.t
Expand Up @@ -4,7 +4,7 @@ use Test;

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

plan 34;
plan 37;

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

Expand Down Expand Up @@ -32,6 +32,12 @@ plan 34;
is +^ 0xdeaddead0000deaddead0000dead, -0xdeaddead0000deaddead0000deae,
'numeric bitwise negation';

# Negative numbers. These really need more tests for bigint vs sized natives
#?rakudo 3 skip 'RT#115966'
is (-5 +& -2),(-6), "logical AND of two negative Int is twos complement";
is (-7 +| -6),(-5), "logical OR of two negative Int is twos complement";
is (-7 +^ -6),( 3), "logical XOR of two negative Int is twos complement";

# string
#?niecza 6 skip 'string bitops'
is( 'a' ~& 'A', 'A', 'string bitwise ~& of "a" and "A"' );
Expand Down

0 comments on commit 5313c52

Please sign in to comment.