Sha256: c89e94c0fb96e02c561be5bd9bef2b0e69cf5a06972f4e5400510946340efd64

Contents?: true

Size: 592 Bytes

Versions: 1

Compression:

Stored size: 592 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facet/enumerable/find_collisions.rb
#
# Extracted Wed Jan 25 11:25:39 EST 2006
# Unit Tools Reap Test Extractor
#

require 'facet/enumerable/find_collisions.rb'


  require 'test/unit'

  class TCEnumerable < Test::Unit::TestCase

    def test_find_collisions
      a = [1,2,2,3,3,3]
      assert_equal( [2,3], a.find_collisions )
      a = [1,2,2,3,3,3]
      r = {false=>[1, 2, 2], true=>[3, 3, 3]}
      assert_equal( r, a.find_collisions { |x| x > 2 } )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.0.3 packages/core/test/lib/facet/enumerable/test_find_collisions.rb