Sha256: 1771bb9aace7a460162ad75f6b7d2f2d281cda05adedd07051edab3ffb6028db

Contents?: true

Size: 305 Bytes

Versions: 14

Compression:

Stored size: 305 Bytes

Contents

require 'facets/array/permutation'
require 'test/unit'
require 'set'

class TestEnumerablePermutation < Test::Unit::TestCase

  def test_permutation
    o = Set.new
    %w[a b c].permutation{ |x| o << x.join('') }
    r = Set.new(['abc','acb','bac','bca','cab','cba'])
    assert_equal( r, o )
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/array/test_permutation.rb
facets-2.8.3 test/core/array/test_permutation.rb
facets-2.8.2 test/core/array/test_permutation.rb
facets-2.8.1 test/core/array/test_permutation.rb
facets-2.8.0 test/core/array/test_permutation.rb
facets-2.7.0 test/core/array/test_permutation.rb
facets-2.6.0 test/core/array/test_permutation.rb
facets-2.4.4 test/core/array/test_permutation.rb
facets-2.4.2 test/core/array/test_permutation.rb
facets-2.4.3 test/core/array/test_permutation.rb
facets-2.5.0 test/core/array/test_permutation.rb
facets-2.4.5 test/core/array/test_permutation.rb
facets-2.5.1 test/core/array/test_permutation.rb
facets-2.5.2 test/core/array/test_permutation.rb