spec/int_spec.rb in bindata-0.5.1 vs spec/int_spec.rb in bindata-0.6.0

- old
+ new

@@ -7,11 +7,13 @@ specify "should have a sensible value of zero" do [BinData::Int8, BinData::Int16le, BinData::Int16be, BinData::Int32le, - BinData::Int32be].each do |klass| + BinData::Int32be, + BinData::Int64le, + BinData::Int64be].each do |klass| klass.new.value.should eql(0) end end specify "should pass these tests" do @@ -19,10 +21,12 @@ [1, true, BinData::Int8], [2, false, BinData::Int16le], [2, true, BinData::Int16be], [4, false, BinData::Int32le], [4, true, BinData::Int32be], + [8, false, BinData::Int64le], + [8, true, BinData::Int64be], ].each do |nbytes, big_endian, klass| gen_int_test_data(nbytes, big_endian).each do |val, clamped_val, str| test_read_write(klass, val, clamped_val, str) end end @@ -33,11 +37,13 @@ specify "should have a sensible value of zero" do [BinData::Uint8, BinData::Uint16le, BinData::Uint16be, BinData::Uint32le, - BinData::Uint32be].each do |klass| + BinData::Uint32be, + BinData::Uint64le, + BinData::Uint64be].each do |klass| klass.new.value.should eql(0) end end specify "should pass these tests" do @@ -45,9 +51,11 @@ [1, true, BinData::Uint8], [2, false, BinData::Uint16le], [2, true, BinData::Uint16be], [4, false, BinData::Uint32le], [4, true, BinData::Uint32be], + [8, false, BinData::Uint64le], + [8, true, BinData::Uint64be], ].each do |nbytes, big_endian, klass| gen_uint_test_data(nbytes, big_endian).each do |val, clamped_val, str| test_read_write(klass, val, clamped_val, str) end end