2015-06-04 07:22:38 +02:00
|
|
|
require_relative "../helper"
|
|
|
|
|
|
|
|
class TestPadding < MiniTest::Test
|
|
|
|
|
|
|
|
def test_small
|
2015-11-15 19:42:07 +01:00
|
|
|
[6,27,28].each do |p|
|
2016-12-31 19:08:33 +01:00
|
|
|
assert_equal 32 , Padding.padded(p) , "Expecting 32 for #{p}"
|
2015-06-04 07:22:38 +02:00
|
|
|
end
|
|
|
|
end
|
2015-06-28 09:50:47 +02:00
|
|
|
def test_medium
|
2015-11-15 19:42:07 +01:00
|
|
|
[29,33,40,57,60].each do |p|
|
2016-12-31 19:08:33 +01:00
|
|
|
assert_equal 64 , Padding.padded(p) , "Expecting 64 for #{p}"
|
2015-06-04 07:22:38 +02:00
|
|
|
end
|
|
|
|
end
|
2015-07-19 09:54:36 +02:00
|
|
|
def test_large
|
2015-11-15 19:42:07 +01:00
|
|
|
[61,65,88].each do |p|
|
2016-12-31 19:08:33 +01:00
|
|
|
assert_equal 96 , Padding.padded(p) , "Expecting 96 for #{p}"
|
2015-07-19 09:54:36 +02:00
|
|
|
end
|
2015-06-04 07:22:38 +02:00
|
|
|
end
|
|
|
|
end
|