Sha256: 0427dc12544c3d12c3355a8f88072780db6fa70164bfc356a5ca6c153c653d6a

Contents?: true

Size: 404 Bytes

Versions: 16

Compression:

Stored size: 404 Bytes

Contents

require 'facets/range/combine'
require 'test/unit'

class TestRangeCombine < Test::Unit::TestCase

  def test_combine_ranges
    r = Range.combine(0..4, 2..6, 6..10, 13..17, 12..19)
    x = [0..10, 12..19]
    assert_equal(x, r)
  end

  def test_combine_arrays_as_intervals
    r = Range.combine([0, 4], [2, 6], [6, 10], [13, 17], [12, 19])
    x = [[0, 10], [12, 19]]
    assert_equal(x, r)
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/range/test_combine.rb
facets-2.8.3 test/core/range/test_combine.rb
facets-2.8.2 test/core/range/test_combine.rb
facets-2.8.1 test/core/range/test_combine.rb
facets-2.8.0 test/core/range/test_combine.rb
facets-2.7.0 test/core/range/test_combine.rb
facets-2.6.0 test/core/range/test_combine.rb
facets-2.4.0 test/range/test_combine.rb
facets-2.4.1 test/range/test_combine.rb
facets-2.4.4 test/core/range/test_combine.rb
facets-2.4.2 test/core/range/test_combine.rb
facets-2.4.3 test/core/range/test_combine.rb
facets-2.5.1 test/core/range/test_combine.rb
facets-2.5.0 test/core/range/test_combine.rb
facets-2.4.5 test/core/range/test_combine.rb
facets-2.5.2 test/core/range/test_combine.rb