Sha256: 34df8c417c1696edd795a3f292b3f7f2a2e4d304f811a791775d0461a9af1fc8

Contents?: true

Size: 277 Bytes

Versions: 16

Compression:

Stored size: 277 Bytes

Contents

require 'facets/hash/inverse'
require 'test/unit'

class TC_Hash_Inverse < Test::Unit::TestCase

  def test_inverse
    h1 = { :a=>1, :b=>2, :c=>2 }
    h2 = h1.inverse
    assert_equal( :a, h2[1] )
    assert( h2[2].include?(:b) )
    assert( h2[2].include?(:c) )
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/hash/test_inverse.rb
facets-2.8.3 test/core/hash/test_inverse.rb
facets-2.8.2 test/core/hash/test_inverse.rb
facets-2.8.1 test/core/hash/test_inverse.rb
facets-2.8.0 test/core/hash/test_inverse.rb
facets-2.7.0 test/core/hash/test_inverse.rb
facets-2.6.0 test/core/hash/test_inverse.rb
facets-2.4.0 test/hash/test_inverse.rb
facets-2.4.1 test/hash/test_inverse.rb
facets-2.4.3 test/core/hash/test_inverse.rb
facets-2.4.4 test/core/hash/test_inverse.rb
facets-2.4.2 test/core/hash/test_inverse.rb
facets-2.4.5 test/core/hash/test_inverse.rb
facets-2.5.1 test/core/hash/test_inverse.rb
facets-2.5.0 test/core/hash/test_inverse.rb
facets-2.5.2 test/core/hash/test_inverse.rb