# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/comparable/clip.rb # # Extracted Fri Feb 16 02:00:36 EST 2007 # Project.rb Test Extraction # require 'facets/core/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