# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/enumerable/self/cross.rb # # Extracted Wed Jul 05 11:47:50 EDT 2006 # Unit Tools Reap Test Extractor # require 'facets/core/enumerable/self/cross.rb' require 'test/unit' class TCEnumerable < Test::Unit::TestCase def test_cross i = [[1,2], [3,4]] o = [[1, 3], [1, 4], [2, 3], [2, 4]] assert_equal( o, Enumerable.cross(*i) ) i = [[1,2], [4], ["apple", "banana"]] o = [[1, 4, "apple"], [1, 4, "banana"], [2, 4, "apple"], [2, 4, "banana"]] assert_equal( o, Enumerable.cross(*i) ) end end