Sha256: fe55eaa65ce781b40af89105e2946e6cbcf4d254fa0a2080461f4070ac4f3b0a
Contents?: true
Size: 639 Bytes
Versions: 1
Compression:
Stored size: 639 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facet/enumerable/cross.rb # # Extracted Wed Jan 25 11:25:39 EST 2006 # Unit Tools Reap Test Extractor # require 'facet/enumerable/cross.rb' require 'test/unit' class TCEnumerable < Test::Unit::TestCase def test_cross a = [1,2,3].cross([4,5,6]) assert_equal( [[1, 4],[1, 5],[1, 6],[2, 4],[2, 5],[2, 6],[3, 4],[3, 5],[3, 6]], a ) a = [] [1,2,3].cross([4,5,6]) {|elem| a << elem } assert_equal( [[1, 4],[1, 5],[1, 6],[2, 4],[2, 5],[2, 6],[3, 4],[3, 5],[3, 6]], a ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.0.3 | packages/core/test/lib/facet/enumerable/test_cross.rb |