# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/nano/range/umbrella.rb # # Extracted Fri Oct 28 14:20:18 EDT 2005 # Unit Tools Reap Test Extractor # require 'nano/range/umbrella.rb' require 'test/unit' class TCRange < Test::Unit::TestCase def test_umbrella assert_equal( [1,1], (3..6).umbrella(2..7) ) assert_equal( [0,1], (3..6).umbrella(3..7) ) assert_equal( [-1,1], (3..6).umbrella(4..7) ) assert_equal( [1,0], (3..6).umbrella(2..6) ) assert_equal( [0,0], (3..6).umbrella(3..6) ) assert_equal( [-1,0], (3..6).umbrella(4..6) ) assert_equal( [1,-1], (3..6).umbrella(2..5) ) assert_equal( [0,-1], (3..6).umbrella(3..5) ) assert_equal( [-1,-1], (3..6).umbrella(4..5) ) end end