Sha256: 1c349005da05546bfa21161beeffd7fc8fcd791e9aa679b9ea4c6b60f39e1a23

Contents?: true

Size: 594 Bytes

Versions: 5

Compression:

Stored size: 594 Bytes

Contents

covers 'facets/enumerable/ewise'

test_case Enumerable do

  method :ewise do

    test do
      a = [1,2,3]
      (a.ewise + 3).assert == [4,5,6]
      (a.ewise + [4,5]).assert == [5,7]
      (a.ewise.+([4,5],2)).assert == [[5,7],[3,4,5]]
      (a.ewise.+([4,5],3)).assert == [[5,7],[4,5,6]]
    end

  end

  method :elementwise do

    test do
      a = [1,2,3]
      (a.elementwise + 3).assert == [4,5,6]
      (a.elementwise + [4,5]).assert == [5,7]
      (a.elementwise.+([4,5],2)).assert == [[5,7],[3,4,5]]
      (a.elementwise.+([4,5],3)).assert == [[5,7],[4,5,6]]
    end

  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 test/core/enumerable/test_ewise.rb
facets-3.1.0 test/core/enumerable/test_ewise.rb
facets-3.0.0 test/core/enumerable/test_ewise.rb
facets-2.9.3 test/core/enumerable/test_ewise.rb
facets-2.9.2 test/core/enumerable/test_ewise.rb