Sha256: aefbd613a29baca26aa64d9e5d0d58d81d4a422d444e3609f01c14c7ded660bb

Contents?: true

Size: 498 Bytes

Versions: 10

Compression:

Stored size: 498 Bytes

Contents

require 'facets/comparable/bound.rb'
require 'test/unit'

class TestComparable < Test::Unit::TestCase

  def test_at_most
    assert_equal( 3, 3.at_most(4) )
    assert_equal( 4, 4.at_most(4) )
    assert_equal( 4, 5.at_most(4) )
  end

  def test_at_least
    assert_equal( 4, 3.at_least(4) )
    assert_equal( 4, 4.at_least(4) )
    assert_equal( 5, 5.at_least(4) )
  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

10 entries across 10 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/comparable/test_cap.rb
facets-2.8.3 test/core/comparable/test_cap.rb
facets-2.8.2 test/core/comparable/test_cap.rb
facets-2.8.1 test/core/comparable/test_cap.rb
facets-2.8.0 test/core/comparable/test_cap.rb
facets-2.7.0 test/core/comparable/test_cap.rb
facets-2.6.0 test/core/comparable/test_cap.rb
facets-2.5.1 test/core/comparable/test_cap.rb
facets-2.5.0 test/core/comparable/test_cap.rb
facets-2.5.2 test/core/comparable/test_cap.rb