Sha256: 51a0754a0d868afdfa41354b0ea24e6bdc7f547c7c0c206b5f8585d1da83b275

Contents?: true

Size: 604 Bytes

Versions: 1

Compression:

Stored size: 604 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/enumerable/find_collisions.rb
#
# Extracted Mon Jun 05 08:14:29 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/core/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.4.0 test/lib/facets/core/enumerable/test_find_collisions.rb