Sha256: 959c112bb1b9694d88f5338a093818ab6064d3e7f413f57b9972abde17ef4d13

Contents?: true

Size: 836 Bytes

Versions: 2

Compression:

Stored size: 836 Bytes

Contents

require 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_txt_export.txt')
     
     parser = Tracksperanto::Import::Boujou.new
     parser.width = 2560
     parser.height = 1200
     
     trackers = parser.parse(fixture)
     assert_equal 20, 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

2 entries across 2 versions & 1 rubygems

Version Path
tracksperanto-1.6.5 test/import/test_boujou_import.rb
tracksperanto-1.6.4 test/import/test_boujou_import.rb