Sha256: 4752fc476f7fd24ae08c2e01213a471365bf90739fb1baa809788bebbb154607
Contents?: true
Size: 595 Bytes
Versions: 1
Compression:
Stored size: 595 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/enumerable/graph.rb # # Extracted Tue Jul 25 10:07:15 EDT 2006 # Unit Tools Reap Test Extractor # require 'facets/core/enumerable/graph.rb' require 'test/unit' class TCEnumerable < Test::Unit::TestCase def test_graph numbers = (1..3) squares = numbers.graph{ |n| [n, n*n] } assert_equal( {1=>1, 2=>4, 3=>9}, squares ) sq_roots = numbers.graph{ |n| [n*n, n] } assert_equal( {1=>1, 4=>2, 9=>3}, sq_roots ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.7.0 | test/lib/facets/core/enumerable/test_graph.rb |