Permalink
Browse files

Alter column_family_spec to run properly on 32-bit machines

  • Loading branch information...
1 parent 12c7ded commit c20500a7ccb3c09e71d9bc0e5a9d7857087dc1b4 @kreynolds committed Sep 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 spec/column_family_spec.rb
@@ -62,15 +62,15 @@
it "should turn a packed long into a number" do
number = 2**33
- packed = [number >> 32, number].pack("N*")
+ packed = [number >> 32, number % 2**32].pack("N*")
ColumnFamily.cast(packed, "LongType").should eq(number)
ColumnFamily.cast(packed, "CounterColumnType").should eq(number)
end
it "should turn a packed negative long into a negative number" do
number = -2**33
- packed = [number >> 32, number].pack("N*")
+ packed = [number >> 32, number % 2**32].pack("N*")
ColumnFamily.cast(packed, "LongType").should eq(number)
ColumnFamily.cast(packed, "CounterColumnType").should eq(number)

0 comments on commit c20500a

Please sign in to comment.