Sha256: 8b009082a11ed92fadb2fbe30ef8d13325625477b9882f8643faf64782ae6d3d

Contents?: true

Size: 835 Bytes

Versions: 10

Compression:

Stored size: 835 Bytes

Contents

  #  _____         _
  # |_   _|__  ___| |_
  #   | |/ _ \/ __| __|
  #   | |  __/\__ \ |
  #   |_|\___||___/\__|
  #
  # for lib/facets/array/pad.rb
  #
  # Extracted Mon Sep 03 16:23:07 -0700 2007
  # w/ Test Extraction Ratchet
  #

 require 'facets/array/pad.rb'



  require 'test/unit'

  class TestArray < 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

10 entries across 10 versions & 1 rubygems

Version Path
facets-2.0.1 test/unit/array/test_pad.rb
facets-2.0.0 test/unit/array/test_pad.rb
facets-2.0.2 test/unit/array/test_pad.rb
facets-2.1.0 test/unit/array/test_pad.rb
facets-2.1.1 test/unit/array/test_pad.rb
facets-2.1.2 test/unit/array/test_pad.rb
facets-2.0.3 test/unit/array/test_pad.rb
facets-2.0.4 test/unit/array/test_pad.rb
facets-2.0.5 test/unit/array/test_pad.rb
facets-2.1.3 test/unit/array/test_pad.rb