Sha256: b632b591e96200ed5f55f816ed56bf6a5bcc2dc4351c68cb08d3e2da3cf6edc0
Contents?: true
Size: 651 Bytes
Versions: 1
Compression:
Stored size: 651 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/enumerable/cross.rb # # Extracted Wed Aug 23 18:22:52 EDT 2006 # Unit Tools Reap Test Extractor # require 'facets/core/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.7.30 | test/lib/facets/core/enumerable/test_cross.rb |