Sha256: 66d2023d45748cb272885f32ac1f3de789cfc051316a81e6ef2520e993b17ac6
Contents?: true
Size: 637 Bytes
Versions: 1
Compression:
Stored size: 637 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/nano/enumerable/cross.rb # # Extracted Fri Oct 28 14:20:18 EDT 2005 # Unit Tools Reap Test Extractor # require 'nano/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-0.9.0 | test/lib/nano/enumerable/test_cross.rb |