Sha256: 8dfad97c8f3b22bf07210ba47a29f39b3cbcf9010c53bba03b37675f03377891
Contents?: true
Size: 546 Bytes
Versions: 16
Compression:
Stored size: 546 Bytes
Contents
require 'facets/array/pad' require 'test/unit' class TC_Array_Prime < Test::Unit::TestCase def test_pad r = [0,1,2,3].pad(7,"x") x = [0,1,2,3,"x","x","x"] assert_equal(x,r) end def test_pad! a = [0,1,2,3] r = a.pad!(6,"y") x = [0,1,2,3,"y","y"] assert_equal(x,a) end def test_pad_negative r = [0,1,2,3].pad(-7,"n") x = ["n","n","n",0,1,2,3] assert_equal(x,r) end def test_pad_negative! a = [0,1,2,3] r = a.pad!(-6,"q") x = ["q","q",0,1,2,3] assert_equal(x,a) end end
Version data entries
16 entries across 16 versions & 1 rubygems