Sha256: 3c50e82c8c39baf01268ad00967bc7ecc01353c118b016189e2874b640b5c8cf
Contents?: true
Size: 887 Bytes
Versions: 1
Compression:
Stored size: 887 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/enumerable/self/combinations.rb # # Extracted Thu Aug 31 11:31:53 EDT 2006 # Unit Tools Reap Test Extractor # require 'facets/core/enumerable/self/combinations.rb' require 'test/unit' class TCEnumerable < Test::Unit::TestCase def test_combinations a = [1,2] b = [3,4] r = Enumerable.combinations(a,b) assert_equal( [[1,3],[1,4],[2,3],[2,4]], r ) r = [ ["a", "a", "x"], ["a", "a", "y"], ["a", "x", "x"], ["a", "x", "y"], ["b", "a", "x"], ["b", "a", "y"], ["b", "x", "x"], ["b", "x", "y"] ] a = %w|a b| b = %w|a x| c = %w|x y| z = Enumerable.combinations(a, b, c) assert_equal( r, z ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.7.38 | test/lib/facets/core/enumerable/self/test_combinations.rb |