Sha256: efce6bd6d85c97f74af9b5b633f5f9b728c08ab2f06b9b95fae9a4f477d69fbb

Contents?: true

Size: 1004 Bytes

Versions: 1

Compression:

Stored size: 1004 Bytes

Contents

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

require 'facet/comparable/clip.rb'


  require 'test/unit'

  class TCComparable < Test::Unit::TestCase

    def test_clip
      assert_equal( 4, 3.clip(4) )
      assert_equal( 4, 4.clip(4) )
      assert_equal( 5, 5.clip(4) )
      assert_equal( 4, 4.clip(3,5) )
      assert_equal( 3, 3.clip(3,5) )
      assert_equal( 5, 5.clip(3,5) )
      assert_equal( 3, 2.clip(3,5) )
      assert_equal( 5, 6.clip(3,5) )
      assert_equal( 'd', 'd'.clip('c','e') )
      assert_equal( 'c', 'c'.clip('c','e') )
      assert_equal( 'e', 'e'.clip('c','e') )
      assert_equal( 'c', 'b'.clip('c','e') )
      assert_equal( 'e', 'f'.clip('c','e') )
    end

    def test_cap
      assert_equal( 3, 3.cap(4) )
      assert_equal( 4, 4.cap(4) )
      assert_equal( 4, 5.cap(4) )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.0.3 packages/core/test/lib/facet/comparable/test_clip.rb