spec/argus/nav_data_spec.rb
# Try one of the alternatives. Sending method to the navdata
# constructed with mask should return teh expected value.
Try one of the alternatives. Sending method to the navdata
constructed with mask should return teh expected value.
Try one of the alternatives . Sending method to the navdata constructed with mask should return teh expected value .
def try_alternative(method, mask, expected)
          raw = Bytes.make_nav_data(Bytes.make_header(mask, 1, 0))
          nav_data = NavData.new(raw)
          result = nav_data.send(method)
          return true if result == expected
          @msg = "expected mask of 0x#{'%08x' % mask} with #{method}\n" +
            "to return: #{expected.inspect}\n" +
            "got:       #{result.inspect}"
          false
        end
def try_alternative ( method , mask , expected ) raw = Bytes . make_nav_data ( Bytes . make_header ( mask , 1 , 0 ) ) nav_data = NavData . new ( raw ) result = nav_data . send ( method ) return true if result == expected @msg = "expected mask of 0x#{'%08x' % mask} with #{method}\n" + "to return: #{expected.inspect}\n" + "got:       #{result.inspect}" false end
Try one of the alternatives.
Try one of the alternatives .
method
<not_specific>
mask
<not_specific>
expected
<not_specific>