Sha256: f2de0e0007f381bc67cea6533a76297eef48e7c9834dc6f7130387328df9ed6d

Contents?: true

Size: 863 Bytes

Versions: 20

Compression:

Stored size: 863 Bytes

Contents

require File.expand_path(File.dirname(__FILE__)) + '/../helper'

class BoujouImportTest < Test::Unit::TestCase
  DELTA = 0.1
  
  def test_introspects_properly
    i = Tracksperanto::Import::Boujou
    assert_equal "Boujou feature tracks export", i.human_name
    assert !i.autodetects_size?
  end
  
  def test_parsing_from_fixture
     fixture = File.open(File.dirname(__FILE__) + '/samples/boujou_features_text/boujou_txt_export.txt')
     
     parser = Tracksperanto::Import::Boujou.new(:io => fixture, :width => 2560, :height => 1200)
     trackers = parser.to_a
     
     assert_equal 21, trackers.length
     
     tracker1 = trackers[1]
     
     assert_equal "tracker1", tracker1.name
     assert_equal 132, tracker1.length
     
     kf = tracker1[0]
     assert_in_delta 306.906, kf.abs_x, DELTA
     assert_in_delta 40.79, kf.abs_y, DELTA
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
tracksperanto-2.8.6 test/import/test_boujou_import.rb
tracksperanto-2.8.5 test/import/test_boujou_import.rb
tracksperanto-2.8.4 test/import/test_boujou_import.rb
tracksperanto-2.8.2 test/import/test_boujou_import.rb
tracksperanto-2.8.1 test/import/test_boujou_import.rb
tracksperanto-2.8.0 test/import/test_boujou_import.rb
tracksperanto-2.7.0 test/import/test_boujou_import.rb
tracksperanto-2.6.3 test/import/test_boujou_import.rb
tracksperanto-2.6.2 test/import/test_boujou_import.rb
tracksperanto-2.6.1 test/import/test_boujou_import.rb
tracksperanto-2.6.0 test/import/test_boujou_import.rb
tracksperanto-2.5.0 test/import/test_boujou_import.rb
tracksperanto-2.4.1 test/import/test_boujou_import.rb
tracksperanto-2.3.3 test/import/test_boujou_import.rb
tracksperanto-2.3.2 test/import/test_boujou_import.rb
tracksperanto-2.3.1 test/import/test_boujou_import.rb
tracksperanto-2.3.0 test/import/test_boujou_import.rb
tracksperanto-2.2.4 test/import/test_boujou_import.rb
tracksperanto-2.2.2 test/import/test_boujou_import.rb
tracksperanto-2.2.0 test/import/test_boujou_import.rb