Sha256: fff482f65940a2e6e1f33df67b485e366a4d2d5255176aa6b368b617ee95d933

Contents?: true

Size: 232 Bytes

Versions: 4

Compression:

Stored size: 232 Bytes

Contents

require 'facets/enumerable/map_with_index.rb'
require 'test/unit'

class TestEnumerable < Test::Unit::TestCase

  def test_collect_with_index
    a = [1,2,3].collect_with_index{ |e,i| e*i }
    assert_equal( [0,2,6], a )
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/enumerable/test_map_with_index.rb
facets-2.8.3 test/core/enumerable/test_map_with_index.rb
facets-2.8.2 test/core/enumerable/test_map_with_index.rb
facets-2.8.1 test/core/enumerable/test_map_with_index.rb