Sha256: 42766590a536733e89c87f0df0b0578b76d0d2af2c498d6616af51201e2aa602
Contents?: true
Size: 595 Bytes
Versions: 1
Compression:
Stored size: 595 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/enumerable/graph.rb # # Extracted Wed Aug 23 18:22:52 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.30 | test/lib/facets/core/enumerable/test_graph.rb |