Sha256: 790d896eb0fa2669ac05b1991cd7cc09e4d84d450772361aae754749c846880d
Contents?: true
Size: 601 Bytes
Versions: 121
Compression:
Stored size: 601 Bytes
Contents
# frozen_string_literal: true require 'eac_ruby_utils/bit_array' RSpec.describe ::EacRubyUtils::BitArray do describe '#to_byte_array' do let(:instance) { described_class.new([0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1]) } { false => [0xF0, 0xDC], true => [0x0F, 0x3B] }.each do |big_endian, expected_bytes| context "when big-endian is #{big_endian}" do let(:expected_value) { ::EacRubyUtils::ByteArray.new(expected_bytes) } it do expect(instance.to_byte_array(big_endian)).to eq(expected_value) end end end end end
Version data entries
121 entries across 121 versions & 2 rubygems