# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/proc/op_mul.rb # # Extracted Tue Jul 25 10:07:15 EDT 2006 # Unit Tools Reap Test Extractor # require 'facets/core/proc/op_mul.rb' require 'test/unit' class TCProc < Test::Unit::TestCase def test_compose_op a = lambda { |x| x + 4 } b = lambda { |y| y / 2 } assert_equal( 6, (a * b).call(4) ) assert_equal( 4, (b * a).call(4) ) end def test_times_collect_op a = lambda { |x| x + 4 } assert_equal( [4,5,6], a * 3 ) end end