Sha256: 62731fc40c281f50af4c0cc28139bc447d0fb18e5f1007fb40a3672bc5ded99a

Contents?: true

Size: 891 Bytes

Versions: 34

Compression:

Stored size: 891 Bytes

Contents

# -*- encoding : utf-8 -*-
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 39.79, kf.abs_y, DELTA
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
tracksperanto-3.5.9 test/import/test_boujou_import.rb
tracksperanto-3.5.8 test/import/test_boujou_import.rb
tracksperanto-3.5.7 test/import/test_boujou_import.rb
tracksperanto-3.5.6 test/import/test_boujou_import.rb
tracksperanto-3.5.5 test/import/test_boujou_import.rb
tracksperanto-3.5.4 test/import/test_boujou_import.rb
tracksperanto-3.5.2 test/import/test_boujou_import.rb
tracksperanto-3.5.1 test/import/test_boujou_import.rb
tracksperanto-3.5.0 test/import/test_boujou_import.rb
tracksperanto-3.4.1 test/import/test_boujou_import.rb
tracksperanto-3.4.0 test/import/test_boujou_import.rb
tracksperanto-3.3.13 test/import/test_boujou_import.rb
tracksperanto-3.3.12 test/import/test_boujou_import.rb
tracksperanto-3.3.11 test/import/test_boujou_import.rb
tracksperanto-3.3.10 test/import/test_boujou_import.rb
tracksperanto-3.3.9 test/import/test_boujou_import.rb
tracksperanto-3.3.8 test/import/test_boujou_import.rb
tracksperanto-3.3.7 test/import/test_boujou_import.rb
tracksperanto-3.3.6 test/import/test_boujou_import.rb
tracksperanto-3.3.0.pre test/import/test_boujou_import.rb