Sha256: 6c5f4ac27bd2f82e7ad51959a04590afd2ff0f911ae1cbf8b23a240a5c88ed41

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/more/tuple.rb
#
# Extracted Wed Aug 23 18:22:52 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/more/tuple.rb'


  require 'test/unit'

  class TC_Tuple < Test::Unit::TestCase

    def test_01
      t1 = Tuple[1,2,3]
      t2 = Tuple[2,4,5]
      assert( t1 < t2 )
      assert( t2 > t1 )
    end

    def test_02
      t1 = Tuple[1,2,3]
      a1 = t1.to_a
      assert( Array === a1 )
    end

    def test_03
      t1 = Tuple[1,2,3]
      t2 = Tuple[1,2,3]
      assert( t1.object_id === t2.object_id )
    end

    def test_04
      t1 = Tuple[1,2,3]
      t1 = t1 << 4
      assert( Tuple === t1 )
      t2 = Tuple[1,2,3,4]
      assert( t1.object_id == t2.object_id )
    end

    def test_05
      t1 = "1.2.3".to_t
      assert( Tuple === t1 )
      t2 = Tuple[1,2,3]
      assert( t1.object_id == t2.object_id )
    end

    def test_06
      t1 = "1.2.3a".to_t
      assert( Tuple === t1 )
      t2 = Tuple[1,2,'3a']
      assert_equal( t2, t1 )
      assert( t2.object_id == t1.object_id )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.7.30 test/lib/facets/more/test_tuple.rb