Created
April 1, 2010 21:43
-
-
Save kronos/352402 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/spec/ruby/core/bignum/bit_xor_spec.rb b/spec/ruby/core/bignum/bit_xor_spec.rb | |
| index 38a5850..26a38ea 100644 | |
| --- a/spec/ruby/core/bignum/bit_xor_spec.rb | |
| +++ b/spec/ruby/core/bignum/bit_xor_spec.rb | |
| @@ -11,6 +11,18 @@ describe "Bignum#^" do | |
| (@bignum ^ 14).should == 9223372036854775836 | |
| end | |
| + it "returns self bitwise EXCLUSIVE OR negative other when one operand is negative" do | |
| + (@bignum ^ -0x40000000000000000).should == -64563604257983430638 | |
| + (@bignum ^ -@bignum).should == -4 | |
| + (@bignum ^ -0x8000000000000000).should == -18446744073709551598 | |
| + end | |
| + | |
| + it "returns self bitwise EXCLUSIVE OR negative other when both operands is negative" do | |
| + (-@bignum ^ -0x40000000000000000).should == 64563604257983430638 | |
| + (-@bignum ^ -@bignum).should == 0 | |
| + (-@bignum ^ -0x4000000000000000).should == 13835058055282163694 | |
| + end | |
| + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment