Sha256: e27ce20d21c937503c031cb9e66248d071e4b87f3aac116da32ca6f04af1d00e

Contents?: true

Size: 716 Bytes

Versions: 32

Compression:

Stored size: 716 Bytes

Contents

# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__)) + '/helper'

class TestZipTuples < Test::Unit::TestCase
  include Tracksperanto::ZipTuples
  
  def test_zip_with_empty
    assert_equal [], zip_curve_tuples([])
  end
  
  def test_zip_with_standard_dataset
    assert_equal [[1, 123, 234]], zip_curve_tuples([[1, 123], [1,234]])
  end

  def test_zip_with_missing_step
    assert_equal [[1, 123, 345], [2, 234]], zip_curve_tuples([[1, 123], [1, 345], [2,234]])
  end
  
  def test_zip_with_two_curves
    curve_a = [[1, 123], [2, 345]]
    curve_b = [[1, 23.4], [2, 14.5]]
    result = [[1, 123, 23.4], [2, 345, 14.5]]
    assert_equal result, zip_curve_tuples(curve_a, curve_b)
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
tracksperanto-3.5.4 test/test_zip_tuples.rb
tracksperanto-3.5.2 test/test_zip_tuples.rb
tracksperanto-3.5.1 test/test_zip_tuples.rb
tracksperanto-3.5.0 test/test_zip_tuples.rb
tracksperanto-3.4.1 test/test_zip_tuples.rb
tracksperanto-3.4.0 test/test_zip_tuples.rb
tracksperanto-3.3.13 test/test_zip_tuples.rb
tracksperanto-3.3.12 test/test_zip_tuples.rb
tracksperanto-3.3.11 test/test_zip_tuples.rb
tracksperanto-3.3.10 test/test_zip_tuples.rb
tracksperanto-3.3.9 test/test_zip_tuples.rb
tracksperanto-3.3.8 test/test_zip_tuples.rb
tracksperanto-3.3.7 test/test_zip_tuples.rb
tracksperanto-3.3.6 test/test_zip_tuples.rb
tracksperanto-3.3.0.pre test/test_zip_tuples.rb
tracksperanto-3.2.2 test/test_zip_tuples.rb
tracksperanto-3.2.1 test/test_zip_tuples.rb
tracksperanto-3.2.0 test/test_zip_tuples.rb
tracksperanto-3.1.0 test/test_zip_tuples.rb
tracksperanto-3.0.1 test/test_zip_tuples.rb