rubyx/test/register/test_padding.rb
Torsten Ruger 8e82da0b61 fix arm (assembled) indexing
by having a dummy 0 index in salaam. when assembled
2015-11-15 20:42:07 +02:00

28 lines
521 B
Ruby

require_relative "../helper"
class Padded
include Padding
end
class TestPadding < MiniTest::Test
def setup
@pad = Padded.new
end
def test_small
[6,27,28].each do |p|
assert_equal 32 , @pad.padded(p) , "Expecting 32 for #{p}"
end
end
def test_medium
[29,33,40,57,60].each do |p|
assert_equal 64 , @pad.padded(p) , "Expecting 64 for #{p}"
end
end
def test_large
[61,65,88].each do |p|
assert_equal 96 , @pad.padded(p) , "Expecting 96 for #{p}"
end
end
end